diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/ShaderProgram.kt b/src/main/kotlin/ShaderProgram.kt new file mode 100644 index 0000000..1db78f2 --- /dev/null +++ b/src/main/kotlin/ShaderProgram.kt @@ -0,0 +1,114 @@ +import org.khronos.webgl.* + +/** + * User: rnentjes + * Date: 17-4-16 + * Time: 15:15 + */ + +class VertextAttributeInfo(val locationName: String, val numElements: Int) { + var location = 0 + var offset = 0 +} + +class ShaderProgram( + val webgl: WebGLRenderingContext, + val drawType: Int, + vertexShaderSource: String, + fragmentShaderSource: String, + val vainfo: Array, + val setter: (program: ShaderProgram, data: T) -> Unit) { + + var shaderProgram: WebGLProgram + var vertex: WebGLShader + var fragment: WebGLShader + + var verticesBlockSize = 0 + var drawLength = 0 + + init { + vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) + fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) + + shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") + webgl.attachShader(shaderProgram, vertex) + webgl.attachShader(shaderProgram, fragment) + webgl.linkProgram(shaderProgram) + + if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { + //println(webgl.getProgramInfoLog(shaderProgram)) + throw IllegalStateException("Unable to compile shader program!") + } + + webgl.useProgram(shaderProgram) + + this.verticesBlockSize = 0; + + // set attribute locations... + for (info in vainfo.iterator()) { + info.location = webgl.getAttribLocation(shaderProgram, info.locationName) + info.offset = verticesBlockSize; + + verticesBlockSize += info.numElements; + //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); + } + + when(drawType) { + WebGLRenderingContext.TRIANGLES -> { + drawLength = verticesBlockSize * 3 + } + else -> { + drawLength = verticesBlockSize + } + } + + //println("verticesBlockSize $verticesBlockSize"); + + //println("ShaderProgram constructor done"); + } + + private fun compileShader(source: String, type: Int): WebGLShader { + val result: WebGLShader + + result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") + webgl.shaderSource(result, source) + webgl.compileShader(result) + + if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { + throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") + } + + return result; + } + + fun begin(attribBuffer: WebGLBuffer, userdata: T) { + webgl.useProgram(shaderProgram); + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + + // set attribute locations... + for (info in vainfo.iterator()) { + webgl.enableVertexAttribArray(info.location); + webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); + } + + setter(this, userdata) + } + + fun end() { + for (info in vainfo.iterator()) { + webgl.disableVertexAttribArray(info.location); + } + webgl.useProgram(null) + } + + fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); + + fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); + + fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } + fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } + fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } + fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } + fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } + +} diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/ShaderProgram.kt b/src/main/kotlin/ShaderProgram.kt new file mode 100644 index 0000000..1db78f2 --- /dev/null +++ b/src/main/kotlin/ShaderProgram.kt @@ -0,0 +1,114 @@ +import org.khronos.webgl.* + +/** + * User: rnentjes + * Date: 17-4-16 + * Time: 15:15 + */ + +class VertextAttributeInfo(val locationName: String, val numElements: Int) { + var location = 0 + var offset = 0 +} + +class ShaderProgram( + val webgl: WebGLRenderingContext, + val drawType: Int, + vertexShaderSource: String, + fragmentShaderSource: String, + val vainfo: Array, + val setter: (program: ShaderProgram, data: T) -> Unit) { + + var shaderProgram: WebGLProgram + var vertex: WebGLShader + var fragment: WebGLShader + + var verticesBlockSize = 0 + var drawLength = 0 + + init { + vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) + fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) + + shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") + webgl.attachShader(shaderProgram, vertex) + webgl.attachShader(shaderProgram, fragment) + webgl.linkProgram(shaderProgram) + + if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { + //println(webgl.getProgramInfoLog(shaderProgram)) + throw IllegalStateException("Unable to compile shader program!") + } + + webgl.useProgram(shaderProgram) + + this.verticesBlockSize = 0; + + // set attribute locations... + for (info in vainfo.iterator()) { + info.location = webgl.getAttribLocation(shaderProgram, info.locationName) + info.offset = verticesBlockSize; + + verticesBlockSize += info.numElements; + //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); + } + + when(drawType) { + WebGLRenderingContext.TRIANGLES -> { + drawLength = verticesBlockSize * 3 + } + else -> { + drawLength = verticesBlockSize + } + } + + //println("verticesBlockSize $verticesBlockSize"); + + //println("ShaderProgram constructor done"); + } + + private fun compileShader(source: String, type: Int): WebGLShader { + val result: WebGLShader + + result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") + webgl.shaderSource(result, source) + webgl.compileShader(result) + + if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { + throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") + } + + return result; + } + + fun begin(attribBuffer: WebGLBuffer, userdata: T) { + webgl.useProgram(shaderProgram); + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + + // set attribute locations... + for (info in vainfo.iterator()) { + webgl.enableVertexAttribArray(info.location); + webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); + } + + setter(this, userdata) + } + + fun end() { + for (info in vainfo.iterator()) { + webgl.disableVertexAttribArray(info.location); + } + webgl.useProgram(null) + } + + fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); + + fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); + + fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } + fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } + fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } + fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } + fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } + +} diff --git a/src/main/resources/index.html b/src/main/resources/index.html new file mode 100644 index 0000000..3f08116 --- /dev/null +++ b/src/main/resources/index.html @@ -0,0 +1,28 @@ + + + + + Julia + + + + + + + diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/ShaderProgram.kt b/src/main/kotlin/ShaderProgram.kt new file mode 100644 index 0000000..1db78f2 --- /dev/null +++ b/src/main/kotlin/ShaderProgram.kt @@ -0,0 +1,114 @@ +import org.khronos.webgl.* + +/** + * User: rnentjes + * Date: 17-4-16 + * Time: 15:15 + */ + +class VertextAttributeInfo(val locationName: String, val numElements: Int) { + var location = 0 + var offset = 0 +} + +class ShaderProgram( + val webgl: WebGLRenderingContext, + val drawType: Int, + vertexShaderSource: String, + fragmentShaderSource: String, + val vainfo: Array, + val setter: (program: ShaderProgram, data: T) -> Unit) { + + var shaderProgram: WebGLProgram + var vertex: WebGLShader + var fragment: WebGLShader + + var verticesBlockSize = 0 + var drawLength = 0 + + init { + vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) + fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) + + shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") + webgl.attachShader(shaderProgram, vertex) + webgl.attachShader(shaderProgram, fragment) + webgl.linkProgram(shaderProgram) + + if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { + //println(webgl.getProgramInfoLog(shaderProgram)) + throw IllegalStateException("Unable to compile shader program!") + } + + webgl.useProgram(shaderProgram) + + this.verticesBlockSize = 0; + + // set attribute locations... + for (info in vainfo.iterator()) { + info.location = webgl.getAttribLocation(shaderProgram, info.locationName) + info.offset = verticesBlockSize; + + verticesBlockSize += info.numElements; + //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); + } + + when(drawType) { + WebGLRenderingContext.TRIANGLES -> { + drawLength = verticesBlockSize * 3 + } + else -> { + drawLength = verticesBlockSize + } + } + + //println("verticesBlockSize $verticesBlockSize"); + + //println("ShaderProgram constructor done"); + } + + private fun compileShader(source: String, type: Int): WebGLShader { + val result: WebGLShader + + result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") + webgl.shaderSource(result, source) + webgl.compileShader(result) + + if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { + throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") + } + + return result; + } + + fun begin(attribBuffer: WebGLBuffer, userdata: T) { + webgl.useProgram(shaderProgram); + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + + // set attribute locations... + for (info in vainfo.iterator()) { + webgl.enableVertexAttribArray(info.location); + webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); + } + + setter(this, userdata) + } + + fun end() { + for (info in vainfo.iterator()) { + webgl.disableVertexAttribArray(info.location); + } + webgl.useProgram(null) + } + + fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); + + fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); + + fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } + fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } + fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } + fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } + fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } + +} diff --git a/src/main/resources/index.html b/src/main/resources/index.html new file mode 100644 index 0000000..3f08116 --- /dev/null +++ b/src/main/resources/index.html @@ -0,0 +1,28 @@ + + + + + Julia + + + + + + + diff --git a/web/index.html b/web/index.html deleted file mode 100644 index f2b66c5..0000000 --- a/web/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Julia - - - - - - - - - diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/ShaderProgram.kt b/src/main/kotlin/ShaderProgram.kt new file mode 100644 index 0000000..1db78f2 --- /dev/null +++ b/src/main/kotlin/ShaderProgram.kt @@ -0,0 +1,114 @@ +import org.khronos.webgl.* + +/** + * User: rnentjes + * Date: 17-4-16 + * Time: 15:15 + */ + +class VertextAttributeInfo(val locationName: String, val numElements: Int) { + var location = 0 + var offset = 0 +} + +class ShaderProgram( + val webgl: WebGLRenderingContext, + val drawType: Int, + vertexShaderSource: String, + fragmentShaderSource: String, + val vainfo: Array, + val setter: (program: ShaderProgram, data: T) -> Unit) { + + var shaderProgram: WebGLProgram + var vertex: WebGLShader + var fragment: WebGLShader + + var verticesBlockSize = 0 + var drawLength = 0 + + init { + vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) + fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) + + shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") + webgl.attachShader(shaderProgram, vertex) + webgl.attachShader(shaderProgram, fragment) + webgl.linkProgram(shaderProgram) + + if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { + //println(webgl.getProgramInfoLog(shaderProgram)) + throw IllegalStateException("Unable to compile shader program!") + } + + webgl.useProgram(shaderProgram) + + this.verticesBlockSize = 0; + + // set attribute locations... + for (info in vainfo.iterator()) { + info.location = webgl.getAttribLocation(shaderProgram, info.locationName) + info.offset = verticesBlockSize; + + verticesBlockSize += info.numElements; + //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); + } + + when(drawType) { + WebGLRenderingContext.TRIANGLES -> { + drawLength = verticesBlockSize * 3 + } + else -> { + drawLength = verticesBlockSize + } + } + + //println("verticesBlockSize $verticesBlockSize"); + + //println("ShaderProgram constructor done"); + } + + private fun compileShader(source: String, type: Int): WebGLShader { + val result: WebGLShader + + result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") + webgl.shaderSource(result, source) + webgl.compileShader(result) + + if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { + throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") + } + + return result; + } + + fun begin(attribBuffer: WebGLBuffer, userdata: T) { + webgl.useProgram(shaderProgram); + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + + // set attribute locations... + for (info in vainfo.iterator()) { + webgl.enableVertexAttribArray(info.location); + webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); + } + + setter(this, userdata) + } + + fun end() { + for (info in vainfo.iterator()) { + webgl.disableVertexAttribArray(info.location); + } + webgl.useProgram(null) + } + + fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); + + fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); + + fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } + fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } + fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } + fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } + fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } + +} diff --git a/src/main/resources/index.html b/src/main/resources/index.html new file mode 100644 index 0000000..3f08116 --- /dev/null +++ b/src/main/resources/index.html @@ -0,0 +1,28 @@ + + + + + Julia + + + + + + + diff --git a/web/index.html b/web/index.html deleted file mode 100644 index f2b66c5..0000000 --- a/web/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Julia - - - - - - - - - diff --git a/web/js/generated/mandelbrot.js b/web/js/generated/mandelbrot.js deleted file mode 100644 index 0fd9983..0000000 --- a/web/js/generated/mandelbrot.js +++ /dev/null @@ -1,344 +0,0 @@ -(function (Kotlin) { - 'use strict'; - var _ = Kotlin.defineRootPackage(function () { - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = 0.0;\n float yy = 0.0;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float it = mod(float(iteration) * 13.0, 768.0);\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0);\n float blue = max(0.0, min(it, 767.0) - 512.0);\n gl_FragColor = vec4( red, green, blue, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + v_coord.x;\n yy = 2.0*xx*yy + v_coord.y;\n xx = xt;\n }\n }\n'; - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n uniform vec2 u_julia;\n uniform float u_iteratorOffset;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = v_coord.x;\n float yy = v_coord.y;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n if (xx*xx + yy*yy < 4.0) {\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0);\n //mu = sqrt(mu);\n\n float it = mod(mu * 23.0, 768.0);\n\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0) / 255.0;\n float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0;\n\n gl_FragColor = vec4( blue, green, red, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + u_julia.x;\n yy = 2.0*xx*yy + u_julia.y;\n xx = xt;\n }\n }\n }\n'; - }, /** @lends _ */ { - com: Kotlin.definePackage(null, /** @lends _.com */ { - persesgames: Kotlin.definePackage(null, /** @lends _.com.persesgames */ { - shader: Kotlin.definePackage(null, /** @lends _.com.persesgames.shader */ { - VertextAttributeInfo: Kotlin.createClass(null, function (locationName, numElements) { - this.locationName = locationName; - this.numElements = numElements; - this.location = 0; - this.offset = 0; - }), - ShaderProgram: Kotlin.createClass(null, function (webgl, drawType, vertexShaderSource, fragmentShaderSource, vainfo, setter) { - var tmp$0, tmp$1, tmp$2; - this.webgl = webgl; - this.drawType = drawType; - this.vainfo = vainfo; - this.setter = setter; - this.verticesBlockSize = 0; - this.drawLength = 0; - this.vertex = this.compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER); - this.fragment = this.compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER); - tmp$0 = this.webgl.createProgram(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader program from webgl context!'); - this.shaderProgram = tmp$0; - this.webgl.attachShader(this.shaderProgram, this.vertex); - this.webgl.attachShader(this.shaderProgram, this.fragment); - this.webgl.linkProgram(this.shaderProgram); - if (Kotlin.equals(this.webgl.getProgramParameter(this.shaderProgram, WebGLRenderingContext.LINK_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader program!'); - } - this.webgl.useProgram(this.shaderProgram); - this.verticesBlockSize = 0; - tmp$1 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$1.hasNext()) { - var info = tmp$1.next(); - info.location = this.webgl.getAttribLocation(this.shaderProgram, info.locationName); - info.offset = this.verticesBlockSize; - this.verticesBlockSize += info.numElements; - } - tmp$2 = this.drawType; - if (tmp$2 === WebGLRenderingContext.TRIANGLES) - this.drawLength = this.verticesBlockSize * 3; - else { - this.drawLength = this.verticesBlockSize; - } - }, /** @lends _.com.persesgames.shader.ShaderProgram.prototype */ { - compileShader: function (source, type) { - var tmp$0; - var result; - tmp$0 = this.webgl.createShader(type); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader from webgl context!'); - result = tmp$0; - this.webgl.shaderSource(result, source); - this.webgl.compileShader(result); - if (Kotlin.equals(this.webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader!' + '\n' + source + '\n' + '\n' + Kotlin.toString(this.webgl.getShaderInfoLog(result))); - } - return result; - }, - begin_t0l48p$: function (attribBuffer, userdata) { - var tmp$0; - this.webgl.useProgram(this.shaderProgram); - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.enableVertexAttribArray(info.location); - this.webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, this.verticesBlockSize * 4, info.offset * 4); - } - this.setter(this, userdata); - }, - end: function () { - var tmp$0; - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.disableVertexAttribArray(info.location); - } - this.webgl.useProgram(null); - }, - getAttribLocation_61zpoe$: function (location) { - return this.webgl.getAttribLocation(this.shaderProgram, location); - }, - getUniformLocation_61zpoe$: function (location) { - return this.webgl.getUniformLocation(this.shaderProgram, location); - }, - setUniform1f_9sobi5$: function (location, value) { - this.webgl.uniform1f(this.getUniformLocation_61zpoe$(location), value); - }, - setUniform2f_9xt0da$: function (location, v1, v2) { - this.webgl.uniform2f(this.getUniformLocation_61zpoe$(location), v1, v2); - }, - setUniform4f_kjn4ou$: function (location, v1, v2, v3, v4) { - this.webgl.uniform4f(this.getUniformLocation_61zpoe$(location), v1, v2, v3, v4); - }, - setUniform1i_bm4lxs$: function (location, value) { - this.webgl.uniform1i(this.getUniformLocation_61zpoe$(location), value); - }, - setUniformMatrix4fv_pphpxd$: function (location, value) { - this.webgl.uniformMatrix4fv(this.getUniformLocation_61zpoe$(location), false, value); - } - }) - }) - }) - }), - ShaderData: Kotlin.createClass(null, function () { - this.offsetX = 0.0; - this.offsetY = 0.0; - }), - MandelBrot: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.ShaderData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.MandelBrot.MandelBrot$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.MandelBrot.prototype */ { - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 1000.0; - this.data.offsetX = Math.sin(time); - this.data.offsetY = Math.cos(time); - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.MandelBrot.render$f(this)); - } - }, /** @lends _.MandelBrot */ { - render$f: function (this$MandelBrot) { - return function (it) { - this$MandelBrot.render(); - }; - }, - MandelBrot$f: function (program, data) { - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, 0.0, 0.0); - } - }), - HTMLElements: Kotlin.createClass(null, function () { - var tmp$0, tmp$1, tmp$2, tmp$3; - this.windowWidth = 0; - this.windowHeight = 0; - this.container = Kotlin.isType(tmp$0 = document.createElement('div'), HTMLElement) ? tmp$0 : Kotlin.throwCCE(); - this.canvas = Kotlin.isType(tmp$1 = document.createElement('canvas'), HTMLCanvasElement) ? tmp$1 : Kotlin.throwCCE(); - this.container.setAttribute('style', 'position: relative;'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;'); - ((tmp$2 = document.body) != null ? tmp$2 : Kotlin.throwNPE()).appendChild(this.container); - this.container.appendChild(this.canvas); - this.webgl = Kotlin.isType(tmp$3 = this.canvas.getContext('webgl'), WebGLRenderingContext) ? tmp$3 : Kotlin.throwCCE(); - }, /** @lends _.HTMLElements.prototype */ { - resize: function () { - var windowWidth = window.innerWidth | 0; - var windowHeight = window.innerHeight | 0; - if (this.windowWidth !== windowWidth || this.windowHeight !== windowHeight) { - this.windowWidth = windowWidth; - this.windowHeight = windowHeight; - this.canvas.setAttribute('width', windowWidth.toString() + 'px'); - this.canvas.setAttribute('height', windowHeight.toString() + 'px'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 5; width: ' + windowWidth + 'px; height: ' + windowHeight + 'px;'); - this.webgl.viewport(0, 0, windowWidth, windowHeight); - } - }, - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - drawMandel: function () { - var tmp$0, tmp$1; - var xs; - var ys; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 767; - var halfWindowHeight = this.windowHeight / 2 | 0; - var red; - var green; - var blue; - var fillStyle; - var mu; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xs = 4.0 / this.windowWidth * x - 2.0; - ys = 4.0 - 4.0 / this.windowHeight * y - 2.0; - xx = 0.0; - yy = 0.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xs; - yy = 2 * xx * yy + ys; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 13 % 768; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - drawJulia_lu1900$: function (xc, yc) { - var tmp$0, tmp$1; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 511; - var red; - var green; - var blue; - var fillStyle; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xx = 4.0 / this.windowWidth * x - 2.0; - yy = 4.0 - 4.0 / this.windowHeight * y - 2.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xc; - yy = 2 * xx * yy + yc; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 31 % 512; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - render: function () { - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - } - }), - main_kand9s$: function (args) { - var html = new _.HTMLElements(); - var mandelBrot = new _.MandelBrot(html); - var julia = new _.Julia(html); - julia.render(); - }, - JuliaData: Kotlin.createClass(null, function () { - this.juliaX = 0.0; - this.juliaY = 0.0; - this.offsetX = 0.0; - this.offsetY = 0.0; - this.scaleX = 1.0; - this.scaleY = 1.0; - this.iteratorOffset = 0.0; - }), - Julia: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.JuliaData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.Julia.Julia$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.Julia.prototype */ { - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 500.0; - this.data.juliaX = 0.2800000011920929 + Math.sin(time / 31) / 100.0; - this.data.juliaY = 0.00800000037997961 + Math.cos(time / 23.07) / 100.0; - this.data.scaleX = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.scaleY = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.iteratorOffset = 0.0; - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.Julia.render$f(this)); - } - }, /** @lends _.Julia */ { - render$f: function (this$Julia) { - return function (it) { - this$Julia.render(); - }; - }, - Julia$f: function (program, data) { - program.setUniform2f_9xt0da$('u_julia', data.juliaX, data.juliaY); - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, data.scaleX, data.scaleY); - program.setUniform1f_9sobi5$('u_iteratorOffset', data.iteratorOffset); - } - }) - }); - Kotlin.defineModule('mandelbrot', _); - _.main_kand9s$([]); -}(Kotlin)); diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/ShaderProgram.kt b/src/main/kotlin/ShaderProgram.kt new file mode 100644 index 0000000..1db78f2 --- /dev/null +++ b/src/main/kotlin/ShaderProgram.kt @@ -0,0 +1,114 @@ +import org.khronos.webgl.* + +/** + * User: rnentjes + * Date: 17-4-16 + * Time: 15:15 + */ + +class VertextAttributeInfo(val locationName: String, val numElements: Int) { + var location = 0 + var offset = 0 +} + +class ShaderProgram( + val webgl: WebGLRenderingContext, + val drawType: Int, + vertexShaderSource: String, + fragmentShaderSource: String, + val vainfo: Array, + val setter: (program: ShaderProgram, data: T) -> Unit) { + + var shaderProgram: WebGLProgram + var vertex: WebGLShader + var fragment: WebGLShader + + var verticesBlockSize = 0 + var drawLength = 0 + + init { + vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) + fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) + + shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") + webgl.attachShader(shaderProgram, vertex) + webgl.attachShader(shaderProgram, fragment) + webgl.linkProgram(shaderProgram) + + if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { + //println(webgl.getProgramInfoLog(shaderProgram)) + throw IllegalStateException("Unable to compile shader program!") + } + + webgl.useProgram(shaderProgram) + + this.verticesBlockSize = 0; + + // set attribute locations... + for (info in vainfo.iterator()) { + info.location = webgl.getAttribLocation(shaderProgram, info.locationName) + info.offset = verticesBlockSize; + + verticesBlockSize += info.numElements; + //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); + } + + when(drawType) { + WebGLRenderingContext.TRIANGLES -> { + drawLength = verticesBlockSize * 3 + } + else -> { + drawLength = verticesBlockSize + } + } + + //println("verticesBlockSize $verticesBlockSize"); + + //println("ShaderProgram constructor done"); + } + + private fun compileShader(source: String, type: Int): WebGLShader { + val result: WebGLShader + + result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") + webgl.shaderSource(result, source) + webgl.compileShader(result) + + if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { + throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") + } + + return result; + } + + fun begin(attribBuffer: WebGLBuffer, userdata: T) { + webgl.useProgram(shaderProgram); + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + + // set attribute locations... + for (info in vainfo.iterator()) { + webgl.enableVertexAttribArray(info.location); + webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); + } + + setter(this, userdata) + } + + fun end() { + for (info in vainfo.iterator()) { + webgl.disableVertexAttribArray(info.location); + } + webgl.useProgram(null) + } + + fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); + + fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); + + fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } + fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } + fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } + fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } + fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } + +} diff --git a/src/main/resources/index.html b/src/main/resources/index.html new file mode 100644 index 0000000..3f08116 --- /dev/null +++ b/src/main/resources/index.html @@ -0,0 +1,28 @@ + + + + + Julia + + + + + + + diff --git a/web/index.html b/web/index.html deleted file mode 100644 index f2b66c5..0000000 --- a/web/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Julia - - - - - - - - - diff --git a/web/js/generated/mandelbrot.js b/web/js/generated/mandelbrot.js deleted file mode 100644 index 0fd9983..0000000 --- a/web/js/generated/mandelbrot.js +++ /dev/null @@ -1,344 +0,0 @@ -(function (Kotlin) { - 'use strict'; - var _ = Kotlin.defineRootPackage(function () { - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = 0.0;\n float yy = 0.0;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float it = mod(float(iteration) * 13.0, 768.0);\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0);\n float blue = max(0.0, min(it, 767.0) - 512.0);\n gl_FragColor = vec4( red, green, blue, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + v_coord.x;\n yy = 2.0*xx*yy + v_coord.y;\n xx = xt;\n }\n }\n'; - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n uniform vec2 u_julia;\n uniform float u_iteratorOffset;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = v_coord.x;\n float yy = v_coord.y;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n if (xx*xx + yy*yy < 4.0) {\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0);\n //mu = sqrt(mu);\n\n float it = mod(mu * 23.0, 768.0);\n\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0) / 255.0;\n float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0;\n\n gl_FragColor = vec4( blue, green, red, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + u_julia.x;\n yy = 2.0*xx*yy + u_julia.y;\n xx = xt;\n }\n }\n }\n'; - }, /** @lends _ */ { - com: Kotlin.definePackage(null, /** @lends _.com */ { - persesgames: Kotlin.definePackage(null, /** @lends _.com.persesgames */ { - shader: Kotlin.definePackage(null, /** @lends _.com.persesgames.shader */ { - VertextAttributeInfo: Kotlin.createClass(null, function (locationName, numElements) { - this.locationName = locationName; - this.numElements = numElements; - this.location = 0; - this.offset = 0; - }), - ShaderProgram: Kotlin.createClass(null, function (webgl, drawType, vertexShaderSource, fragmentShaderSource, vainfo, setter) { - var tmp$0, tmp$1, tmp$2; - this.webgl = webgl; - this.drawType = drawType; - this.vainfo = vainfo; - this.setter = setter; - this.verticesBlockSize = 0; - this.drawLength = 0; - this.vertex = this.compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER); - this.fragment = this.compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER); - tmp$0 = this.webgl.createProgram(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader program from webgl context!'); - this.shaderProgram = tmp$0; - this.webgl.attachShader(this.shaderProgram, this.vertex); - this.webgl.attachShader(this.shaderProgram, this.fragment); - this.webgl.linkProgram(this.shaderProgram); - if (Kotlin.equals(this.webgl.getProgramParameter(this.shaderProgram, WebGLRenderingContext.LINK_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader program!'); - } - this.webgl.useProgram(this.shaderProgram); - this.verticesBlockSize = 0; - tmp$1 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$1.hasNext()) { - var info = tmp$1.next(); - info.location = this.webgl.getAttribLocation(this.shaderProgram, info.locationName); - info.offset = this.verticesBlockSize; - this.verticesBlockSize += info.numElements; - } - tmp$2 = this.drawType; - if (tmp$2 === WebGLRenderingContext.TRIANGLES) - this.drawLength = this.verticesBlockSize * 3; - else { - this.drawLength = this.verticesBlockSize; - } - }, /** @lends _.com.persesgames.shader.ShaderProgram.prototype */ { - compileShader: function (source, type) { - var tmp$0; - var result; - tmp$0 = this.webgl.createShader(type); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader from webgl context!'); - result = tmp$0; - this.webgl.shaderSource(result, source); - this.webgl.compileShader(result); - if (Kotlin.equals(this.webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader!' + '\n' + source + '\n' + '\n' + Kotlin.toString(this.webgl.getShaderInfoLog(result))); - } - return result; - }, - begin_t0l48p$: function (attribBuffer, userdata) { - var tmp$0; - this.webgl.useProgram(this.shaderProgram); - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.enableVertexAttribArray(info.location); - this.webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, this.verticesBlockSize * 4, info.offset * 4); - } - this.setter(this, userdata); - }, - end: function () { - var tmp$0; - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.disableVertexAttribArray(info.location); - } - this.webgl.useProgram(null); - }, - getAttribLocation_61zpoe$: function (location) { - return this.webgl.getAttribLocation(this.shaderProgram, location); - }, - getUniformLocation_61zpoe$: function (location) { - return this.webgl.getUniformLocation(this.shaderProgram, location); - }, - setUniform1f_9sobi5$: function (location, value) { - this.webgl.uniform1f(this.getUniformLocation_61zpoe$(location), value); - }, - setUniform2f_9xt0da$: function (location, v1, v2) { - this.webgl.uniform2f(this.getUniformLocation_61zpoe$(location), v1, v2); - }, - setUniform4f_kjn4ou$: function (location, v1, v2, v3, v4) { - this.webgl.uniform4f(this.getUniformLocation_61zpoe$(location), v1, v2, v3, v4); - }, - setUniform1i_bm4lxs$: function (location, value) { - this.webgl.uniform1i(this.getUniformLocation_61zpoe$(location), value); - }, - setUniformMatrix4fv_pphpxd$: function (location, value) { - this.webgl.uniformMatrix4fv(this.getUniformLocation_61zpoe$(location), false, value); - } - }) - }) - }) - }), - ShaderData: Kotlin.createClass(null, function () { - this.offsetX = 0.0; - this.offsetY = 0.0; - }), - MandelBrot: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.ShaderData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.MandelBrot.MandelBrot$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.MandelBrot.prototype */ { - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 1000.0; - this.data.offsetX = Math.sin(time); - this.data.offsetY = Math.cos(time); - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.MandelBrot.render$f(this)); - } - }, /** @lends _.MandelBrot */ { - render$f: function (this$MandelBrot) { - return function (it) { - this$MandelBrot.render(); - }; - }, - MandelBrot$f: function (program, data) { - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, 0.0, 0.0); - } - }), - HTMLElements: Kotlin.createClass(null, function () { - var tmp$0, tmp$1, tmp$2, tmp$3; - this.windowWidth = 0; - this.windowHeight = 0; - this.container = Kotlin.isType(tmp$0 = document.createElement('div'), HTMLElement) ? tmp$0 : Kotlin.throwCCE(); - this.canvas = Kotlin.isType(tmp$1 = document.createElement('canvas'), HTMLCanvasElement) ? tmp$1 : Kotlin.throwCCE(); - this.container.setAttribute('style', 'position: relative;'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;'); - ((tmp$2 = document.body) != null ? tmp$2 : Kotlin.throwNPE()).appendChild(this.container); - this.container.appendChild(this.canvas); - this.webgl = Kotlin.isType(tmp$3 = this.canvas.getContext('webgl'), WebGLRenderingContext) ? tmp$3 : Kotlin.throwCCE(); - }, /** @lends _.HTMLElements.prototype */ { - resize: function () { - var windowWidth = window.innerWidth | 0; - var windowHeight = window.innerHeight | 0; - if (this.windowWidth !== windowWidth || this.windowHeight !== windowHeight) { - this.windowWidth = windowWidth; - this.windowHeight = windowHeight; - this.canvas.setAttribute('width', windowWidth.toString() + 'px'); - this.canvas.setAttribute('height', windowHeight.toString() + 'px'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 5; width: ' + windowWidth + 'px; height: ' + windowHeight + 'px;'); - this.webgl.viewport(0, 0, windowWidth, windowHeight); - } - }, - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - drawMandel: function () { - var tmp$0, tmp$1; - var xs; - var ys; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 767; - var halfWindowHeight = this.windowHeight / 2 | 0; - var red; - var green; - var blue; - var fillStyle; - var mu; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xs = 4.0 / this.windowWidth * x - 2.0; - ys = 4.0 - 4.0 / this.windowHeight * y - 2.0; - xx = 0.0; - yy = 0.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xs; - yy = 2 * xx * yy + ys; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 13 % 768; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - drawJulia_lu1900$: function (xc, yc) { - var tmp$0, tmp$1; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 511; - var red; - var green; - var blue; - var fillStyle; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xx = 4.0 / this.windowWidth * x - 2.0; - yy = 4.0 - 4.0 / this.windowHeight * y - 2.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xc; - yy = 2 * xx * yy + yc; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 31 % 512; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - render: function () { - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - } - }), - main_kand9s$: function (args) { - var html = new _.HTMLElements(); - var mandelBrot = new _.MandelBrot(html); - var julia = new _.Julia(html); - julia.render(); - }, - JuliaData: Kotlin.createClass(null, function () { - this.juliaX = 0.0; - this.juliaY = 0.0; - this.offsetX = 0.0; - this.offsetY = 0.0; - this.scaleX = 1.0; - this.scaleY = 1.0; - this.iteratorOffset = 0.0; - }), - Julia: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.JuliaData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.Julia.Julia$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.Julia.prototype */ { - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 500.0; - this.data.juliaX = 0.2800000011920929 + Math.sin(time / 31) / 100.0; - this.data.juliaY = 0.00800000037997961 + Math.cos(time / 23.07) / 100.0; - this.data.scaleX = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.scaleY = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.iteratorOffset = 0.0; - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.Julia.render$f(this)); - } - }, /** @lends _.Julia */ { - render$f: function (this$Julia) { - return function (it) { - this$Julia.render(); - }; - }, - Julia$f: function (program, data) { - program.setUniform2f_9xt0da$('u_julia', data.juliaX, data.juliaY); - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, data.scaleX, data.scaleY); - program.setUniform1f_9sobi5$('u_iteratorOffset', data.iteratorOffset); - } - }) - }); - Kotlin.defineModule('mandelbrot', _); - _.main_kand9s$([]); -}(Kotlin)); diff --git a/web/js/generated/mandelbrot.meta.js b/web/js/generated/mandelbrot.meta.js deleted file mode 100644 index ecbef71..0000000 --- a/web/js/generated/mandelbrot.meta.js +++ /dev/null @@ -1 +0,0 @@ -// Kotlin.kotlin_module_metadata(3, "mandelbrot", "H4sIAAAAAAAAAOPS4xKJd0lNSyzNKQlITM5OTE/Vy84qzhUSkxIRYJBiMmA04hFgluIQYhFiMmA2YOLK41JOgSjXLYCpzy/JycyLLy4pysxLjy9JTMpJFXLX5GLJTczM42KDyHKxhOZllnCxJBalF3OxOhYVJVZysQWDdchwMQkwcrFxMAgwSTCAaRYozSrBAAB2qhMjoAAAAA=="); diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/ShaderProgram.kt b/src/main/kotlin/ShaderProgram.kt new file mode 100644 index 0000000..1db78f2 --- /dev/null +++ b/src/main/kotlin/ShaderProgram.kt @@ -0,0 +1,114 @@ +import org.khronos.webgl.* + +/** + * User: rnentjes + * Date: 17-4-16 + * Time: 15:15 + */ + +class VertextAttributeInfo(val locationName: String, val numElements: Int) { + var location = 0 + var offset = 0 +} + +class ShaderProgram( + val webgl: WebGLRenderingContext, + val drawType: Int, + vertexShaderSource: String, + fragmentShaderSource: String, + val vainfo: Array, + val setter: (program: ShaderProgram, data: T) -> Unit) { + + var shaderProgram: WebGLProgram + var vertex: WebGLShader + var fragment: WebGLShader + + var verticesBlockSize = 0 + var drawLength = 0 + + init { + vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) + fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) + + shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") + webgl.attachShader(shaderProgram, vertex) + webgl.attachShader(shaderProgram, fragment) + webgl.linkProgram(shaderProgram) + + if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { + //println(webgl.getProgramInfoLog(shaderProgram)) + throw IllegalStateException("Unable to compile shader program!") + } + + webgl.useProgram(shaderProgram) + + this.verticesBlockSize = 0; + + // set attribute locations... + for (info in vainfo.iterator()) { + info.location = webgl.getAttribLocation(shaderProgram, info.locationName) + info.offset = verticesBlockSize; + + verticesBlockSize += info.numElements; + //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); + } + + when(drawType) { + WebGLRenderingContext.TRIANGLES -> { + drawLength = verticesBlockSize * 3 + } + else -> { + drawLength = verticesBlockSize + } + } + + //println("verticesBlockSize $verticesBlockSize"); + + //println("ShaderProgram constructor done"); + } + + private fun compileShader(source: String, type: Int): WebGLShader { + val result: WebGLShader + + result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") + webgl.shaderSource(result, source) + webgl.compileShader(result) + + if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { + throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") + } + + return result; + } + + fun begin(attribBuffer: WebGLBuffer, userdata: T) { + webgl.useProgram(shaderProgram); + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + + // set attribute locations... + for (info in vainfo.iterator()) { + webgl.enableVertexAttribArray(info.location); + webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); + } + + setter(this, userdata) + } + + fun end() { + for (info in vainfo.iterator()) { + webgl.disableVertexAttribArray(info.location); + } + webgl.useProgram(null) + } + + fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); + + fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); + + fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } + fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } + fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } + fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } + fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } + +} diff --git a/src/main/resources/index.html b/src/main/resources/index.html new file mode 100644 index 0000000..3f08116 --- /dev/null +++ b/src/main/resources/index.html @@ -0,0 +1,28 @@ + + + + + Julia + + + + + + + diff --git a/web/index.html b/web/index.html deleted file mode 100644 index f2b66c5..0000000 --- a/web/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Julia - - - - - - - - - diff --git a/web/js/generated/mandelbrot.js b/web/js/generated/mandelbrot.js deleted file mode 100644 index 0fd9983..0000000 --- a/web/js/generated/mandelbrot.js +++ /dev/null @@ -1,344 +0,0 @@ -(function (Kotlin) { - 'use strict'; - var _ = Kotlin.defineRootPackage(function () { - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = 0.0;\n float yy = 0.0;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float it = mod(float(iteration) * 13.0, 768.0);\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0);\n float blue = max(0.0, min(it, 767.0) - 512.0);\n gl_FragColor = vec4( red, green, blue, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + v_coord.x;\n yy = 2.0*xx*yy + v_coord.y;\n xx = xt;\n }\n }\n'; - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n uniform vec2 u_julia;\n uniform float u_iteratorOffset;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = v_coord.x;\n float yy = v_coord.y;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n if (xx*xx + yy*yy < 4.0) {\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0);\n //mu = sqrt(mu);\n\n float it = mod(mu * 23.0, 768.0);\n\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0) / 255.0;\n float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0;\n\n gl_FragColor = vec4( blue, green, red, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + u_julia.x;\n yy = 2.0*xx*yy + u_julia.y;\n xx = xt;\n }\n }\n }\n'; - }, /** @lends _ */ { - com: Kotlin.definePackage(null, /** @lends _.com */ { - persesgames: Kotlin.definePackage(null, /** @lends _.com.persesgames */ { - shader: Kotlin.definePackage(null, /** @lends _.com.persesgames.shader */ { - VertextAttributeInfo: Kotlin.createClass(null, function (locationName, numElements) { - this.locationName = locationName; - this.numElements = numElements; - this.location = 0; - this.offset = 0; - }), - ShaderProgram: Kotlin.createClass(null, function (webgl, drawType, vertexShaderSource, fragmentShaderSource, vainfo, setter) { - var tmp$0, tmp$1, tmp$2; - this.webgl = webgl; - this.drawType = drawType; - this.vainfo = vainfo; - this.setter = setter; - this.verticesBlockSize = 0; - this.drawLength = 0; - this.vertex = this.compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER); - this.fragment = this.compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER); - tmp$0 = this.webgl.createProgram(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader program from webgl context!'); - this.shaderProgram = tmp$0; - this.webgl.attachShader(this.shaderProgram, this.vertex); - this.webgl.attachShader(this.shaderProgram, this.fragment); - this.webgl.linkProgram(this.shaderProgram); - if (Kotlin.equals(this.webgl.getProgramParameter(this.shaderProgram, WebGLRenderingContext.LINK_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader program!'); - } - this.webgl.useProgram(this.shaderProgram); - this.verticesBlockSize = 0; - tmp$1 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$1.hasNext()) { - var info = tmp$1.next(); - info.location = this.webgl.getAttribLocation(this.shaderProgram, info.locationName); - info.offset = this.verticesBlockSize; - this.verticesBlockSize += info.numElements; - } - tmp$2 = this.drawType; - if (tmp$2 === WebGLRenderingContext.TRIANGLES) - this.drawLength = this.verticesBlockSize * 3; - else { - this.drawLength = this.verticesBlockSize; - } - }, /** @lends _.com.persesgames.shader.ShaderProgram.prototype */ { - compileShader: function (source, type) { - var tmp$0; - var result; - tmp$0 = this.webgl.createShader(type); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader from webgl context!'); - result = tmp$0; - this.webgl.shaderSource(result, source); - this.webgl.compileShader(result); - if (Kotlin.equals(this.webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader!' + '\n' + source + '\n' + '\n' + Kotlin.toString(this.webgl.getShaderInfoLog(result))); - } - return result; - }, - begin_t0l48p$: function (attribBuffer, userdata) { - var tmp$0; - this.webgl.useProgram(this.shaderProgram); - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.enableVertexAttribArray(info.location); - this.webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, this.verticesBlockSize * 4, info.offset * 4); - } - this.setter(this, userdata); - }, - end: function () { - var tmp$0; - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.disableVertexAttribArray(info.location); - } - this.webgl.useProgram(null); - }, - getAttribLocation_61zpoe$: function (location) { - return this.webgl.getAttribLocation(this.shaderProgram, location); - }, - getUniformLocation_61zpoe$: function (location) { - return this.webgl.getUniformLocation(this.shaderProgram, location); - }, - setUniform1f_9sobi5$: function (location, value) { - this.webgl.uniform1f(this.getUniformLocation_61zpoe$(location), value); - }, - setUniform2f_9xt0da$: function (location, v1, v2) { - this.webgl.uniform2f(this.getUniformLocation_61zpoe$(location), v1, v2); - }, - setUniform4f_kjn4ou$: function (location, v1, v2, v3, v4) { - this.webgl.uniform4f(this.getUniformLocation_61zpoe$(location), v1, v2, v3, v4); - }, - setUniform1i_bm4lxs$: function (location, value) { - this.webgl.uniform1i(this.getUniformLocation_61zpoe$(location), value); - }, - setUniformMatrix4fv_pphpxd$: function (location, value) { - this.webgl.uniformMatrix4fv(this.getUniformLocation_61zpoe$(location), false, value); - } - }) - }) - }) - }), - ShaderData: Kotlin.createClass(null, function () { - this.offsetX = 0.0; - this.offsetY = 0.0; - }), - MandelBrot: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.ShaderData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.MandelBrot.MandelBrot$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.MandelBrot.prototype */ { - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 1000.0; - this.data.offsetX = Math.sin(time); - this.data.offsetY = Math.cos(time); - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.MandelBrot.render$f(this)); - } - }, /** @lends _.MandelBrot */ { - render$f: function (this$MandelBrot) { - return function (it) { - this$MandelBrot.render(); - }; - }, - MandelBrot$f: function (program, data) { - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, 0.0, 0.0); - } - }), - HTMLElements: Kotlin.createClass(null, function () { - var tmp$0, tmp$1, tmp$2, tmp$3; - this.windowWidth = 0; - this.windowHeight = 0; - this.container = Kotlin.isType(tmp$0 = document.createElement('div'), HTMLElement) ? tmp$0 : Kotlin.throwCCE(); - this.canvas = Kotlin.isType(tmp$1 = document.createElement('canvas'), HTMLCanvasElement) ? tmp$1 : Kotlin.throwCCE(); - this.container.setAttribute('style', 'position: relative;'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;'); - ((tmp$2 = document.body) != null ? tmp$2 : Kotlin.throwNPE()).appendChild(this.container); - this.container.appendChild(this.canvas); - this.webgl = Kotlin.isType(tmp$3 = this.canvas.getContext('webgl'), WebGLRenderingContext) ? tmp$3 : Kotlin.throwCCE(); - }, /** @lends _.HTMLElements.prototype */ { - resize: function () { - var windowWidth = window.innerWidth | 0; - var windowHeight = window.innerHeight | 0; - if (this.windowWidth !== windowWidth || this.windowHeight !== windowHeight) { - this.windowWidth = windowWidth; - this.windowHeight = windowHeight; - this.canvas.setAttribute('width', windowWidth.toString() + 'px'); - this.canvas.setAttribute('height', windowHeight.toString() + 'px'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 5; width: ' + windowWidth + 'px; height: ' + windowHeight + 'px;'); - this.webgl.viewport(0, 0, windowWidth, windowHeight); - } - }, - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - drawMandel: function () { - var tmp$0, tmp$1; - var xs; - var ys; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 767; - var halfWindowHeight = this.windowHeight / 2 | 0; - var red; - var green; - var blue; - var fillStyle; - var mu; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xs = 4.0 / this.windowWidth * x - 2.0; - ys = 4.0 - 4.0 / this.windowHeight * y - 2.0; - xx = 0.0; - yy = 0.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xs; - yy = 2 * xx * yy + ys; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 13 % 768; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - drawJulia_lu1900$: function (xc, yc) { - var tmp$0, tmp$1; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 511; - var red; - var green; - var blue; - var fillStyle; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xx = 4.0 / this.windowWidth * x - 2.0; - yy = 4.0 - 4.0 / this.windowHeight * y - 2.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xc; - yy = 2 * xx * yy + yc; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 31 % 512; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - render: function () { - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - } - }), - main_kand9s$: function (args) { - var html = new _.HTMLElements(); - var mandelBrot = new _.MandelBrot(html); - var julia = new _.Julia(html); - julia.render(); - }, - JuliaData: Kotlin.createClass(null, function () { - this.juliaX = 0.0; - this.juliaY = 0.0; - this.offsetX = 0.0; - this.offsetY = 0.0; - this.scaleX = 1.0; - this.scaleY = 1.0; - this.iteratorOffset = 0.0; - }), - Julia: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.JuliaData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.Julia.Julia$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.Julia.prototype */ { - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 500.0; - this.data.juliaX = 0.2800000011920929 + Math.sin(time / 31) / 100.0; - this.data.juliaY = 0.00800000037997961 + Math.cos(time / 23.07) / 100.0; - this.data.scaleX = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.scaleY = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.iteratorOffset = 0.0; - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.Julia.render$f(this)); - } - }, /** @lends _.Julia */ { - render$f: function (this$Julia) { - return function (it) { - this$Julia.render(); - }; - }, - Julia$f: function (program, data) { - program.setUniform2f_9xt0da$('u_julia', data.juliaX, data.juliaY); - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, data.scaleX, data.scaleY); - program.setUniform1f_9sobi5$('u_iteratorOffset', data.iteratorOffset); - } - }) - }); - Kotlin.defineModule('mandelbrot', _); - _.main_kand9s$([]); -}(Kotlin)); diff --git a/web/js/generated/mandelbrot.meta.js b/web/js/generated/mandelbrot.meta.js deleted file mode 100644 index ecbef71..0000000 --- a/web/js/generated/mandelbrot.meta.js +++ /dev/null @@ -1 +0,0 @@ -// Kotlin.kotlin_module_metadata(3, "mandelbrot", "H4sIAAAAAAAAAOPS4xKJd0lNSyzNKQlITM5OTE/Vy84qzhUSkxIRYJBiMmA04hFgluIQYhFiMmA2YOLK41JOgSjXLYCpzy/JycyLLy4pysxLjy9JTMpJFXLX5GLJTczM42KDyHKxhOZllnCxJBalF3OxOhYVJVZysQWDdchwMQkwcrFxMAgwSTCAaRYozSrBAAB2qhMjoAAAAA=="); diff --git a/web/js/kotlin/kotlin.js b/web/js/kotlin/kotlin.js deleted file mode 100644 index bf7f1a6..0000000 --- a/web/js/kotlin/kotlin.js +++ /dev/null @@ -1,23870 +0,0 @@ -'use strict';var Kotlin = {}; -(function(Kotlin) { - function toArray(obj) { - var array; - if (obj == null) { - array = []; - } else { - if (!Array.isArray(obj)) { - array = [obj]; - } else { - array = obj; - } - } - return array; - } - function copyProperties(to, from) { - if (to == null || from == null) { - return; - } - for (var p in from) { - if (from.hasOwnProperty(p)) { - to[p] = from[p]; - } - } - } - function getClass(basesArray) { - for (var i = 0;i < basesArray.length;i++) { - if (isNativeClass(basesArray[i]) || basesArray[i].$metadata$.type === Kotlin.TYPE.CLASS) { - return basesArray[i]; - } - } - return null; - } - var emptyFunction = function() { - return function() { - }; - }; - Kotlin.TYPE = {CLASS:"class", TRAIT:"trait", OBJECT:"object", INIT_FUN:"init fun"}; - Kotlin.classCount = 0; - Kotlin.newClassIndex = function() { - var tmp = Kotlin.classCount; - Kotlin.classCount++; - return tmp; - }; - function isNativeClass(obj) { - return!(obj == null) && obj.$metadata$ == null; - } - function applyExtension(current, bases, baseGetter) { - for (var i = 0;i < bases.length;i++) { - if (isNativeClass(bases[i])) { - continue; - } - var base = baseGetter(bases[i]); - for (var p in base) { - if (base.hasOwnProperty(p)) { - if (!current.hasOwnProperty(p) || current[p].$classIndex$ < base[p].$classIndex$) { - current[p] = base[p]; - } - } - } - } - } - function computeMetadata(bases, properties, staticProperties) { - var metadata = {}; - var p, property; - metadata.baseClasses = toArray(bases); - metadata.baseClass = getClass(metadata.baseClasses); - metadata.classIndex = Kotlin.newClassIndex(); - metadata.functions = {}; - metadata.properties = {}; - metadata.types = {}; - metadata.staticMembers = {}; - if (!(properties == null)) { - for (p in properties) { - if (properties.hasOwnProperty(p)) { - property = properties[p]; - property.$classIndex$ = metadata.classIndex; - if (typeof property === "function") { - metadata.functions[p] = property; - } else { - metadata.properties[p] = property; - } - } - } - } - if (typeof staticProperties !== "undefined") { - for (p in staticProperties) { - property = staticProperties[p]; - if (typeof property === "function" && property.type === Kotlin.TYPE.INIT_FUN) { - metadata.types[p] = property; - } else { - metadata.staticMembers[p] = property; - } - } - } - applyExtension(metadata.functions, metadata.baseClasses, function(it) { - return it.$metadata$.functions; - }); - applyExtension(metadata.properties, metadata.baseClasses, function(it) { - return it.$metadata$.properties; - }); - return metadata; - } - Kotlin.createClassNow = function(bases, constructor, properties, staticProperties) { - if (constructor == null) { - constructor = emptyFunction(); - } - var metadata = computeMetadata(bases, properties, staticProperties); - metadata.type = Kotlin.TYPE.CLASS; - copyProperties(constructor, metadata.staticMembers); - var prototypeObj; - if (metadata.baseClass !== null) { - prototypeObj = Object.create(metadata.baseClass.prototype); - } else { - prototypeObj = {}; - } - Object.defineProperties(prototypeObj, metadata.properties); - copyProperties(prototypeObj, metadata.functions); - prototypeObj.constructor = constructor; - defineNestedTypes(constructor, metadata.types); - if (metadata.baseClass != null) { - constructor.baseInitializer = metadata.baseClass; - } - constructor.$metadata$ = metadata; - constructor.prototype = prototypeObj; - return constructor; - }; - function defineNestedTypes(constructor, types) { - for (var innerTypeName in types) { - var innerType = types[innerTypeName]; - innerType.className = innerTypeName; - Object.defineProperty(constructor, innerTypeName, {get:innerType, configurable:true}); - } - } - Kotlin.createTraitNow = function(bases, properties, staticProperties) { - var obj = function() { - }; - obj.$metadata$ = computeMetadata(bases, properties, staticProperties); - obj.$metadata$.type = Kotlin.TYPE.TRAIT; - copyProperties(obj, obj.$metadata$.staticMembers); - obj.prototype = {}; - Object.defineProperties(obj.prototype, obj.$metadata$.properties); - copyProperties(obj.prototype, obj.$metadata$.functions); - defineNestedTypes(obj, obj.$metadata$.types); - return obj; - }; - function getBases(basesFun) { - if (typeof basesFun === "function") { - return basesFun(); - } else { - return basesFun; - } - } - Kotlin.createClass = function(basesFun, constructor, properties, staticProperties) { - function $o() { - var klass = Kotlin.createClassNow(getBases(basesFun), constructor, properties, staticProperties); - Object.defineProperty(this, $o.className, {value:klass}); - if (staticProperties && staticProperties.object_initializer$) { - staticProperties.object_initializer$(klass); - } - return klass; - } - $o.type = Kotlin.TYPE.INIT_FUN; - return $o; - }; - Kotlin.createEnumClass = function(basesFun, constructor, enumEntries, properties, staticProperties) { - staticProperties = staticProperties || {}; - staticProperties.object_initializer$ = function(cls) { - var enumEntryList = enumEntries(); - var i = 0; - var values = []; - for (var entryName in enumEntryList) { - if (enumEntryList.hasOwnProperty(entryName)) { - var entryFactory = enumEntryList[entryName]; - values.push(entryName); - var entryObject; - if (typeof entryFactory === "function" && entryFactory.type === Kotlin.TYPE.INIT_FUN) { - entryFactory.className = entryName; - entryObject = entryFactory.apply(cls); - } else { - entryObject = entryFactory(); - } - entryObject.ordinal$ = i++; - entryObject.name$ = entryName; - cls[entryName] = entryObject; - } - } - cls.valuesNames$ = values; - cls.values$ = null; - }; - staticProperties.values = function() { - if (this.values$ == null) { - this.values$ = []; - for (var i = 0;i < this.valuesNames$.length;++i) { - this.values$.push(this[this.valuesNames$[i]]); - } - } - return this.values$; - }; - staticProperties.valueOf_61zpoe$ = function(name) { - return this[name]; - }; - return Kotlin.createClass(basesFun, constructor, properties, staticProperties); - }; - Kotlin.createTrait = function(basesFun, properties, staticProperties) { - function $o() { - var klass = Kotlin.createTraitNow(getBases(basesFun), properties, staticProperties); - Object.defineProperty(this, $o.className, {value:klass}); - return klass; - } - $o.type = Kotlin.TYPE.INIT_FUN; - return $o; - }; - Kotlin.createObject = function(basesFun, constructor, functions, staticProperties) { - constructor = constructor || function() { - }; - function $o() { - var klass = Kotlin.createClassNow(getBases(basesFun), null, functions, staticProperties); - var obj = new klass; - var metadata = klass.$metadata$; - metadata.type = Kotlin.TYPE.OBJECT; - Object.defineProperty(this, $o.className, {value:obj}); - defineNestedTypes(obj, klass.$metadata$.types); - copyProperties(obj, metadata.staticMembers); - if (metadata.baseClass != null) { - constructor.baseInitializer = metadata.baseClass; - } - constructor.apply(obj); - return obj; - } - $o.type = Kotlin.TYPE.INIT_FUN; - return $o; - }; - Kotlin.callGetter = function(thisObject, klass, propertyName) { - return klass.$metadata$.properties[propertyName].get.call(thisObject); - }; - Kotlin.callSetter = function(thisObject, klass, propertyName, value) { - klass.$metadata$.properties[propertyName].set.call(thisObject, value); - }; - function isInheritanceFromTrait(objConstructor, trait) { - if (isNativeClass(objConstructor) || objConstructor.$metadata$.classIndex < trait.$metadata$.classIndex) { - return false; - } - var baseClasses = objConstructor.$metadata$.baseClasses; - var i; - for (i = 0;i < baseClasses.length;i++) { - if (baseClasses[i] === trait) { - return true; - } - } - for (i = 0;i < baseClasses.length;i++) { - if (isInheritanceFromTrait(baseClasses[i], trait)) { - return true; - } - } - return false; - } - Kotlin.isType = function(object, klass) { - if (object == null || klass == null) { - return false; - } else { - if (object instanceof klass) { - return true; - } else { - if (isNativeClass(klass) || klass.$metadata$.type == Kotlin.TYPE.CLASS) { - return false; - } else { - return isInheritanceFromTrait(object.constructor, klass); - } - } - } - }; - Kotlin.getCallableRefForMemberFunction = function(klass, memberName) { - return function() { - var args = [].slice.call(arguments); - var instance = args.shift(); - return instance[memberName].apply(instance, args); - }; - }; - Kotlin.getCallableRefForExtensionFunction = function(extFun) { - return function() { - return extFun.apply(null, arguments); - }; - }; - Kotlin.getCallableRefForLocalExtensionFunction = function(extFun) { - return function() { - var args = [].slice.call(arguments); - var instance = args.shift(); - return extFun.apply(instance, args); - }; - }; - Kotlin.getCallableRefForConstructor = function(klass) { - return function() { - var obj = Object.create(klass.prototype); - klass.apply(obj, arguments); - return obj; - }; - }; - Kotlin.getCallableRefForTopLevelProperty = function(packageName, name, isVar) { - var obj = {}; - obj.name = name; - obj.get = function() { - return packageName[name]; - }; - if (isVar) { - obj.set_za3rmp$ = function(value) { - packageName[name] = value; - }; - } - return obj; - }; - Kotlin.getCallableRefForMemberProperty = function(name, isVar) { - var obj = {}; - obj.name = name; - obj.get_za3rmp$ = function(receiver) { - return receiver[name]; - }; - if (isVar) { - obj.set_wn2jw4$ = function(receiver, value) { - receiver[name] = value; - }; - } - return obj; - }; - Kotlin.getCallableRefForExtensionProperty = function(name, getFun, setFun) { - var obj = {}; - obj.name = name; - obj.get_za3rmp$ = getFun; - if (typeof setFun === "function") { - obj.set_wn2jw4$ = setFun; - } - return obj; - }; - Kotlin.modules = {}; - function createPackageGetter(instance, initializer) { - return function() { - if (initializer !== null) { - var tmp = initializer; - initializer = null; - tmp.call(instance); - } - return instance; - }; - } - function createDefinition(members, definition) { - if (typeof definition === "undefined") { - definition = {}; - } - if (members == null) { - return definition; - } - for (var p in members) { - if (members.hasOwnProperty(p)) { - if (typeof members[p] === "function") { - if (members[p].type === Kotlin.TYPE.INIT_FUN) { - members[p].className = p; - Object.defineProperty(definition, p, {get:members[p], configurable:true}); - } else { - definition[p] = members[p]; - } - } else { - Object.defineProperty(definition, p, members[p]); - } - } - } - return definition; - } - Kotlin.createDefinition = createDefinition; - Kotlin.definePackage = function(initializer, members) { - var definition = createDefinition(members); - if (initializer === null) { - return{value:definition}; - } else { - var getter = createPackageGetter(definition, initializer); - return{get:getter}; - } - }; - Kotlin.defineRootPackage = function(initializer, members) { - var definition = createDefinition(members); - if (initializer === null) { - definition.$initializer$ = emptyFunction(); - } else { - definition.$initializer$ = initializer; - } - return definition; - }; - Kotlin.defineModule = function(id, declaration) { - if (id in Kotlin.modules) { - throw new Error("Module " + id + " is already defined"); - } - declaration.$initializer$.call(declaration); - Object.defineProperty(Kotlin.modules, id, {value:declaration}); - }; - Kotlin.defineInlineFunction = function(tag, fun) { - return fun; - }; - Kotlin.isTypeOf = function(type) { - return function(object) { - return typeof object === type; - }; - }; - Kotlin.isInstanceOf = function(klass) { - return function(object) { - return Kotlin.isType(object, klass); - }; - }; - Kotlin.orNull = function(fn) { - return function(object) { - return object == null || fn(object); - }; - }; - Kotlin.isAny = function() { - return function(object) { - return object != null; - }; - }; - Kotlin.andPredicate = function(a, b) { - return function(object) { - return a(object) && b(object); - }; - }; - Kotlin.kotlinModuleMetadata = function(abiVersion, moduleName, data) { - }; -})(Kotlin); -(function(Kotlin) { - var CharSequence = Kotlin.createTraitNow(null); - if (typeof String.prototype.startsWith === "undefined") { - String.prototype.startsWith = function(searchString, position) { - position = position || 0; - return this.lastIndexOf(searchString, position) === position; - }; - } - if (typeof String.prototype.endsWith === "undefined") { - String.prototype.endsWith = function(searchString, position) { - var subjectString = this.toString(); - if (position === undefined || position > subjectString.length) { - position = subjectString.length; - } - position -= searchString.length; - var lastIndex = subjectString.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; - }; - } - String.prototype.contains = function(s) { - return this.indexOf(s) !== -1; - }; - Kotlin.equals = function(obj1, obj2) { - if (obj1 == null) { - return obj2 == null; - } - if (obj2 == null) { - return false; - } - if (Array.isArray(obj1)) { - return Kotlin.arrayEquals(obj1, obj2); - } - if (typeof obj1 == "object" && typeof obj1.equals_za3rmp$ === "function") { - return obj1.equals_za3rmp$(obj2); - } - return obj1 === obj2; - }; - Kotlin.hashCode = function(obj) { - if (obj == null) { - return 0; - } - if ("function" == typeof obj.hashCode) { - return obj.hashCode(); - } - var objType = typeof obj; - if ("object" == objType || "function" == objType) { - return getObjectHashCode(obj); - } else { - if ("number" == objType) { - return obj | 0; - } - } - if ("boolean" == objType) { - return Number(obj); - } - var str = String(obj); - return getStringHashCode(str); - }; - Kotlin.toString = function(o) { - if (o == null) { - return "null"; - } else { - if (Array.isArray(o)) { - return Kotlin.arrayToString(o); - } else { - return o.toString(); - } - } - }; - Kotlin.arrayToString = function(a) { - return "[" + a.map(Kotlin.toString).join(", ") + "]"; - }; - Kotlin.compareTo = function(a, b) { - var typeA = typeof a; - var typeB = typeof a; - if (Kotlin.isChar(a) && typeB == "number") { - return Kotlin.primitiveCompareTo(a.charCodeAt(0), b); - } - if (typeA == "number" && Kotlin.isChar(b)) { - return Kotlin.primitiveCompareTo(a, b.charCodeAt(0)); - } - if (typeA == "number" || typeA == "string") { - return a < b ? -1 : a > b ? 1 : 0; - } - return a.compareTo_za3rmp$(b); - }; - Kotlin.primitiveCompareTo = function(a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }; - Kotlin.isNumber = function(a) { - return typeof a == "number" || a instanceof Kotlin.Long; - }; - Kotlin.isChar = function(value) { - return typeof value == "string" && value.length == 1; - }; - Kotlin.isComparable = function(value) { - var type = typeof value; - return type === "string" || (type === "boolean" || (Kotlin.isNumber(value) || Kotlin.isType(value, Kotlin.Comparable))); - }; - Kotlin.isCharSequence = function(value) { - return typeof value === "string" || Kotlin.isType(value, CharSequence); - }; - Kotlin.charInc = function(value) { - return String.fromCharCode(value.charCodeAt(0) + 1); - }; - Kotlin.charDec = function(value) { - return String.fromCharCode(value.charCodeAt(0) - 1); - }; - Kotlin.toShort = function(a) { - return(a & 65535) << 16 >> 16; - }; - Kotlin.toByte = function(a) { - return(a & 255) << 24 >> 24; - }; - Kotlin.toChar = function(a) { - return String.fromCharCode(((a | 0) % 65536 & 65535) << 16 >>> 16); - }; - Kotlin.numberToLong = function(a) { - return a instanceof Kotlin.Long ? a : Kotlin.Long.fromNumber(a); - }; - Kotlin.numberToInt = function(a) { - return a instanceof Kotlin.Long ? a.toInt() : a | 0; - }; - Kotlin.numberToShort = function(a) { - return Kotlin.toShort(Kotlin.numberToInt(a)); - }; - Kotlin.numberToByte = function(a) { - return Kotlin.toByte(Kotlin.numberToInt(a)); - }; - Kotlin.numberToDouble = function(a) { - return+a; - }; - Kotlin.numberToChar = function(a) { - return Kotlin.toChar(Kotlin.numberToInt(a)); - }; - Kotlin.intUpto = function(from, to) { - return new Kotlin.NumberRange(from, to); - }; - Kotlin.intDownto = function(from, to) { - return new Kotlin.Progression(from, to, -1); - }; - Kotlin.Throwable = Error; - function createClassNowWithMessage(base) { - return Kotlin.createClassNow(base, function(message) { - this.message = message !== void 0 ? message : null; - }); - } - Kotlin.Error = createClassNowWithMessage(Kotlin.Throwable); - Kotlin.Exception = createClassNowWithMessage(Kotlin.Throwable); - Kotlin.RuntimeException = createClassNowWithMessage(Kotlin.Exception); - Kotlin.NullPointerException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.NoSuchElementException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IllegalArgumentException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IllegalStateException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.UnsupportedOperationException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IndexOutOfBoundsException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.ClassCastException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IOException = createClassNowWithMessage(Kotlin.Exception); - Kotlin.AssertionError = createClassNowWithMessage(Kotlin.Error); - Kotlin.throwNPE = function(message) { - throw new Kotlin.NullPointerException(message); - }; - Kotlin.throwCCE = function() { - throw new Kotlin.ClassCastException("Illegal cast"); - }; - function throwAbstractFunctionInvocationError(funName) { - return function() { - var message; - if (funName !== void 0) { - message = "Function " + funName + " is abstract"; - } else { - message = "Function is abstract"; - } - throw new TypeError(message); - }; - } - var POW_2_32 = 4294967296; - var OBJECT_HASH_CODE_PROPERTY_NAME = "kotlinHashCodeValue$"; - function getObjectHashCode(obj) { - if (!(OBJECT_HASH_CODE_PROPERTY_NAME in obj)) { - var hash = Math.random() * POW_2_32 | 0; - Object.defineProperty(obj, OBJECT_HASH_CODE_PROPERTY_NAME, {value:hash, enumerable:false}); - } - return obj[OBJECT_HASH_CODE_PROPERTY_NAME]; - } - function getStringHashCode(str) { - var hash = 0; - for (var i = 0;i < str.length;i++) { - var code = str.charCodeAt(i); - hash = hash * 31 + code | 0; - } - return hash; - } - var lazyInitClasses = {}; - lazyInitClasses.ArrayIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableIterator]; - }, function(array) { - this.array = array; - this.index = 0; - }, {next:function() { - return this.array[this.index++]; - }, hasNext:function() { - return this.index < this.array.length; - }, remove:function() { - if (this.index < 0 || this.index > this.array.length) { - throw new RangeError; - } - this.index--; - this.array.splice(this.index, 1); - }}); - lazyInitClasses.ListIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.ListIterator]; - }, function(list, index) { - this.list = list; - this.size = list.size; - this.index = index === undefined ? 0 : index; - }, {hasNext:function() { - return this.index < this.size; - }, nextIndex:function() { - return this.index; - }, next:function() { - var index = this.index; - var result = this.list.get_za3lpa$(index); - this.index = index + 1; - return result; - }, hasPrevious:function() { - return this.index > 0; - }, previousIndex:function() { - return this.index - 1; - }, previous:function() { - var index = this.index - 1; - var result = this.list.get_za3lpa$(index); - this.index = index; - return result; - }}); - Kotlin.Enum = Kotlin.createClassNow(null, function() { - this.name$ = void 0; - this.ordinal$ = void 0; - }, {name:{get:function() { - return this.name$; - }}, ordinal:{get:function() { - return this.ordinal$; - }}, equals_za3rmp$:function(o) { - return this === o; - }, hashCode:function() { - return getObjectHashCode(this); - }, compareTo_za3rmp$:function(o) { - return this.ordinal$ < o.ordinal$ ? -1 : this.ordinal$ > o.ordinal$ ? 1 : 0; - }, toString:function() { - return this.name; - }}); - Kotlin.RandomAccess = Kotlin.createTraitNow(null); - Kotlin.PropertyMetadata = Kotlin.createClassNow(null, function(name) { - this.name = name; - }); - lazyInitClasses.AbstractCollection = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableCollection]; - }, null, {addAll_wtfk93$:function(collection) { - var modified = false; - var it = collection.iterator(); - while (it.hasNext()) { - if (this.add_za3rmp$(it.next())) { - modified = true; - } - } - return modified; - }, removeAll_wtfk93$:function(c) { - var modified = false; - var it = this.iterator(); - while (it.hasNext()) { - if (c.contains_za3rmp$(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - }, retainAll_wtfk93$:function(c) { - var modified = false; - var it = this.iterator(); - while (it.hasNext()) { - if (!c.contains_za3rmp$(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - }, clear:function() { - throw new Kotlin.NotImplementedError("Not implemented yet, see KT-7809"); - }, containsAll_wtfk93$:function(c) { - var it = c.iterator(); - while (it.hasNext()) { - if (!this.contains_za3rmp$(it.next())) { - return false; - } - } - return true; - }, isEmpty:function() { - return this.size === 0; - }, iterator:function() { - return new Kotlin.ArrayIterator(this.toArray()); - }, equals_za3rmp$:function(o) { - if (this.size !== o.size) { - return false; - } - var iterator1 = this.iterator(); - var iterator2 = o.iterator(); - var i = this.size; - while (i-- > 0) { - if (!Kotlin.equals(iterator1.next(), iterator2.next())) { - return false; - } - } - return true; - }, toString:function() { - var builder = "["; - var iterator = this.iterator(); - var first = true; - var i = this.size; - while (i-- > 0) { - if (first) { - first = false; - } else { - builder += ", "; - } - builder += Kotlin.toString(iterator.next()); - } - builder += "]"; - return builder; - }, toJSON:function() { - return this.toArray(); - }}); - lazyInitClasses.AbstractList = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableList, Kotlin.AbstractCollection]; - }, null, {iterator:function() { - return new Kotlin.ListIterator(this); - }, listIterator:function() { - return new Kotlin.ListIterator(this); - }, listIterator_za3lpa$:function(index) { - if (index < 0 || index > this.size) { - throw new Kotlin.IndexOutOfBoundsException("Index: " + index + ", size: " + this.size); - } - return new Kotlin.ListIterator(this, index); - }, add_za3rmp$:function(element) { - this.add_vux3hl$(this.size, element); - return true; - }, addAll_j97iir$:function(index, collection) { - throw new Kotlin.NotImplementedError("Not implemented yet, see KT-7809"); - }, remove_za3rmp$:function(o) { - var index = this.indexOf_za3rmp$(o); - if (index !== -1) { - this.removeAt_za3lpa$(index); - return true; - } - return false; - }, clear:function() { - throw new Kotlin.NotImplementedError("Not implemented yet, see KT-7809"); - }, contains_za3rmp$:function(o) { - return this.indexOf_za3rmp$(o) !== -1; - }, indexOf_za3rmp$:function(o) { - var i = this.listIterator(); - while (i.hasNext()) { - if (Kotlin.equals(i.next(), o)) { - return i.previousIndex(); - } - } - return-1; - }, lastIndexOf_za3rmp$:function(o) { - var i = this.listIterator_za3lpa$(this.size); - while (i.hasPrevious()) { - if (Kotlin.equals(i.previous(), o)) { - return i.nextIndex(); - } - } - return-1; - }, subList_vux9f0$:function(fromIndex, toIndex) { - if (fromIndex < 0 || toIndex > this.size) { - throw new Kotlin.IndexOutOfBoundsException; - } - if (fromIndex > toIndex) { - throw new Kotlin.IllegalArgumentException; - } - return new Kotlin.SubList(this, fromIndex, toIndex); - }, hashCode:function() { - var result = 1; - var i = this.iterator(); - while (i.hasNext()) { - var obj = i.next(); - result = 31 * result + Kotlin.hashCode(obj) | 0; - } - return result; - }}); - lazyInitClasses.SubList = Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function(list, fromIndex, toIndex) { - this.list = list; - this.offset = fromIndex; - this._size = toIndex - fromIndex; - }, {get_za3lpa$:function(index) { - this.checkRange(index); - return this.list.get_za3lpa$(index + this.offset); - }, set_vux3hl$:function(index, value) { - this.checkRange(index); - this.list.set_vux3hl$(index + this.offset, value); - }, size:{get:function() { - return this._size; - }}, add_vux3hl$:function(index, element) { - if (index < 0 || index > this.size) { - throw new Kotlin.IndexOutOfBoundsException; - } - this.list.add_vux3hl$(index + this.offset, element); - }, removeAt_za3lpa$:function(index) { - this.checkRange(index); - var result = this.list.removeAt_za3lpa$(index + this.offset); - this._size--; - return result; - }, checkRange:function(index) { - if (index < 0 || index >= this._size) { - throw new Kotlin.IndexOutOfBoundsException; - } - }}); - lazyInitClasses.ArrayList = Kotlin.createClass(function() { - return[Kotlin.AbstractList, Kotlin.RandomAccess]; - }, function() { - this.array = []; - }, {get_za3lpa$:function(index) { - this.checkRange(index); - return this.array[index]; - }, set_vux3hl$:function(index, value) { - this.checkRange(index); - this.array[index] = value; - }, size:{get:function() { - return this.array.length; - }}, iterator:function() { - return Kotlin.arrayIterator(this.array); - }, add_za3rmp$:function(element) { - this.array.push(element); - return true; - }, add_vux3hl$:function(index, element) { - this.array.splice(index, 0, element); - }, addAll_wtfk93$:function(collection) { - if (collection.size == 0) { - return false; - } - var it = collection.iterator(); - for (var i = this.array.length, n = collection.size;n-- > 0;) { - this.array[i++] = it.next(); - } - return true; - }, removeAt_za3lpa$:function(index) { - this.checkRange(index); - return this.array.splice(index, 1)[0]; - }, clear:function() { - this.array.length = 0; - }, indexOf_za3rmp$:function(o) { - for (var i = 0;i < this.array.length;i++) { - if (Kotlin.equals(this.array[i], o)) { - return i; - } - } - return-1; - }, lastIndexOf_za3rmp$:function(o) { - for (var i = this.array.length - 1;i >= 0;i--) { - if (Kotlin.equals(this.array[i], o)) { - return i; - } - } - return-1; - }, toArray:function() { - return this.array.slice(0); - }, toString:function() { - return Kotlin.arrayToString(this.array); - }, toJSON:function() { - return this.array; - }, checkRange:function(index) { - if (index < 0 || index >= this.array.length) { - throw new Kotlin.IndexOutOfBoundsException; - } - }}); - Kotlin.Runnable = Kotlin.createClassNow(null, null, {run:throwAbstractFunctionInvocationError("Runnable#run")}); - Kotlin.Comparable = Kotlin.createClassNow(null, null, {compareTo:throwAbstractFunctionInvocationError("Comparable#compareTo")}); - Kotlin.Appendable = Kotlin.createClassNow(null, null, {append:throwAbstractFunctionInvocationError("Appendable#append")}); - Kotlin.Closeable = Kotlin.createClassNow(null, null, {close:throwAbstractFunctionInvocationError("Closeable#close")}); - Kotlin.safeParseInt = function(str) { - var r = parseInt(str, 10); - return isNaN(r) ? null : r; - }; - Kotlin.safeParseDouble = function(str) { - var r = parseFloat(str); - return isNaN(r) ? null : r; - }; - Kotlin.arrayEquals = function(a, b) { - if (a === b) { - return true; - } - if (!Array.isArray(b) || a.length !== b.length) { - return false; - } - for (var i = 0, n = a.length;i < n;i++) { - if (!Kotlin.equals(a[i], b[i])) { - return false; - } - } - return true; - }; - var BaseOutput = Kotlin.createClassNow(null, null, {println:function(a) { - if (typeof a !== "undefined") { - this.print(a); - } - this.print("\n"); - }, flush:function() { - }}); - Kotlin.NodeJsOutput = Kotlin.createClassNow(BaseOutput, function(outputStream) { - this.outputStream = outputStream; - }, {print:function(a) { - this.outputStream.write(a); - }}); - Kotlin.OutputToConsoleLog = Kotlin.createClassNow(BaseOutput, null, {print:function(a) { - console.log(a); - }, println:function(a) { - this.print(typeof a !== "undefined" ? a : ""); - }}); - Kotlin.BufferedOutput = Kotlin.createClassNow(BaseOutput, function() { - this.buffer = ""; - }, {print:function(a) { - this.buffer += String(a); - }, flush:function() { - this.buffer = ""; - }}); - Kotlin.BufferedOutputToConsoleLog = Kotlin.createClassNow(Kotlin.BufferedOutput, function() { - Kotlin.BufferedOutput.call(this); - }, {print:function(a) { - var s = String(a); - var i = s.lastIndexOf("\n"); - if (i != -1) { - this.buffer += s.substr(0, i); - this.flush(); - s = s.substr(i + 1); - } - this.buffer += s; - }, flush:function() { - console.log(this.buffer); - this.buffer = ""; - }}); - Kotlin.out = function() { - var isNode = typeof process !== "undefined" && (process.versions && !!process.versions.node); - if (isNode) { - return new Kotlin.NodeJsOutput(process.stdout); - } - return new Kotlin.BufferedOutputToConsoleLog; - }(); - Kotlin.println = function(s) { - Kotlin.out.println(s); - }; - Kotlin.print = function(s) { - Kotlin.out.print(s); - }; - lazyInitClasses.RangeIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(start, end, step) { - this.start = start; - this.end = end; - this.step = step; - this.i = start; - }, {next:function() { - var value = this.i; - this.i = this.i + this.step; - return value; - }, hasNext:function() { - if (this.step > 0) { - return this.i <= this.end; - } else { - return this.i >= this.end; - } - }}); - function isSameNotNullRanges(other) { - var classObject = this.constructor; - if (this instanceof classObject && other instanceof classObject) { - return this.isEmpty() && other.isEmpty() || this.first === other.first && (this.last === other.last && this.step === other.step); - } - return false; - } - function isSameLongRanges(other) { - var classObject = this.constructor; - if (this instanceof classObject && other instanceof classObject) { - return this.isEmpty() && other.isEmpty() || this.first.equals_za3rmp$(other.first) && (this.last.equals_za3rmp$(other.last) && this.step.equals_za3rmp$(other.step)); - } - return false; - } - function getProgressionFinalElement(start, end, step) { - function mod(a, b) { - var mod = a % b; - return mod >= 0 ? mod : mod + b; - } - function differenceModulo(a, b, c) { - return mod(mod(a, c) - mod(b, c), c); - } - if (step > 0) { - return end - differenceModulo(end, start, step); - } else { - if (step < 0) { - return end + differenceModulo(start, end, -step); - } else { - throw new Kotlin.IllegalArgumentException("Step is zero."); - } - } - } - function getProgressionFinalElementLong(start, end, step) { - function mod(a, b) { - var mod = a.modulo(b); - return!mod.isNegative() ? mod : mod.add(b); - } - function differenceModulo(a, b, c) { - return mod(mod(a, c).subtract(mod(b, c)), c); - } - var diff; - if (step.compareTo_za3rmp$(Kotlin.Long.ZERO) > 0) { - diff = differenceModulo(end, start, step); - return diff.isZero() ? end : end.subtract(diff); - } else { - if (step.compareTo_za3rmp$(Kotlin.Long.ZERO) < 0) { - diff = differenceModulo(start, end, step.unaryMinus()); - return diff.isZero() ? end : end.add(diff); - } else { - throw new Kotlin.IllegalArgumentException("Step is zero."); - } - } - } - lazyInitClasses.NumberProgression = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(start, end, step) { - this.first = start; - this.last = getProgressionFinalElement(start, end, step); - this.step = step; - if (this.step === 0) { - throw new Kotlin.IllegalArgumentException("Step must be non-zero"); - } - }, {iterator:function() { - return new Kotlin.RangeIterator(this.first, this.last, this.step); - }, isEmpty:function() { - return this.step > 0 ? this.first > this.last : this.first < this.last; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * (31 * this.first + this.last) + this.step; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.step > 0 ? this.first.toString() + ".." + this.last + " step " + this.step : this.first.toString() + " downTo " + this.last + " step " + -this.step; - }}); - lazyInitClasses.NumberRange = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange, Kotlin.NumberProgression]; - }, function $fun(start, endInclusive) { - $fun.baseInitializer.call(this, start, endInclusive, 1); - this.start = start; - this.endInclusive = endInclusive; - }, {contains_htax2k$:function(item) { - return this.start <= item && item <= this.endInclusive; - }, isEmpty:function() { - return this.start > this.endInclusive; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * this.start + this.endInclusive; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.start.toString() + ".." + this.endInclusive; - }}, {Companion:Kotlin.createObject(null, function() { - this.EMPTY = new Kotlin.NumberRange(1, 0); - })}); - lazyInitClasses.LongRangeIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(start, end, step) { - this.start = start; - this.end = end; - this.step = step; - this.i = start; - }, {next:function() { - var value = this.i; - this.i = this.i.add(this.step); - return value; - }, hasNext:function() { - if (this.step.isNegative()) { - return this.i.compare(this.end) >= 0; - } else { - return this.i.compare(this.end) <= 0; - } - }}); - lazyInitClasses.LongProgression = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(start, end, step) { - this.first = start; - this.last = getProgressionFinalElementLong(start, end, step); - this.step = step; - if (this.step.isZero()) { - throw new Kotlin.IllegalArgumentException("Step must be non-zero"); - } - }, {iterator:function() { - return new Kotlin.LongRangeIterator(this.first, this.last, this.step); - }, isEmpty:function() { - return this.step.isNegative() ? this.first.compare(this.last) < 0 : this.first.compare(this.last) > 0; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * (31 * this.first.toInt() + this.last.toInt()) + this.step.toInt(); - }, equals_za3rmp$:isSameLongRanges, toString:function() { - return!this.step.isNegative() ? this.first.toString() + ".." + this.last + " step " + this.step : this.first.toString() + " downTo " + this.last + " step " + this.step.unaryMinus(); - }}); - lazyInitClasses.LongRange = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange, Kotlin.LongProgression]; - }, function $fun(start, endInclusive) { - $fun.baseInitializer.call(this, start, endInclusive, Kotlin.Long.ONE); - this.start = start; - this.endInclusive = endInclusive; - }, {contains_htax2k$:function(item) { - return this.start.compareTo_za3rmp$(item) <= 0 && item.compareTo_za3rmp$(this.endInclusive) <= 0; - }, isEmpty:function() { - return this.start.compare(this.endInclusive) > 0; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * this.start.toInt() + this.endInclusive.toInt(); - }, equals_za3rmp$:isSameLongRanges, toString:function() { - return this.start.toString() + ".." + this.endInclusive; - }}, {Companion:Kotlin.createObject(null, function() { - this.EMPTY = new Kotlin.LongRange(Kotlin.Long.ONE, Kotlin.Long.ZERO); - })}); - lazyInitClasses.CharRangeIterator = Kotlin.createClass(function() { - return[Kotlin.RangeIterator]; - }, function(start, end, step) { - Kotlin.RangeIterator.call(this, start, end, step); - }, {next:function() { - var value = this.i; - this.i = this.i + this.step; - return String.fromCharCode(value); - }}); - lazyInitClasses.CharProgression = Kotlin.createClassNow(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(start, end, step) { - this.first = start; - this.startCode = start.charCodeAt(0); - this.endCode = getProgressionFinalElement(this.startCode, end.charCodeAt(0), step); - this.last = String.fromCharCode(this.endCode); - this.step = step; - if (this.step === 0) { - throw new Kotlin.IllegalArgumentException("Increment must be non-zero"); - } - }, {iterator:function() { - return new Kotlin.CharRangeIterator(this.startCode, this.endCode, this.step); - }, isEmpty:function() { - return this.step > 0 ? this.startCode > this.endCode : this.startCode < this.endCode; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * (31 * this.startCode | 0 + this.endCode | 0) + this.step | 0; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.step > 0 ? this.first.toString() + ".." + this.last + " step " + this.step : this.first.toString() + " downTo " + this.last + " step " + -this.step; - }}); - lazyInitClasses.CharRange = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange, Kotlin.CharProgression]; - }, function $fun(start, endInclusive) { - $fun.baseInitializer.call(this, start, endInclusive, 1); - this.start = start; - this.endInclusive = endInclusive; - }, {contains_htax2k$:function(item) { - return this.start <= item && item <= this.endInclusive; - }, isEmpty:function() { - return this.start > this.endInclusive; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * this.startCode | 0 + this.endCode | 0; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.start.toString() + ".." + this.endInclusive; - }}, {Companion:Kotlin.createObject(null, function() { - this.EMPTY = new Kotlin.CharRange(Kotlin.toChar(1), Kotlin.toChar(0)); - })}); - Kotlin.Comparator = Kotlin.createClassNow(null, null, {compare:throwAbstractFunctionInvocationError("Comparator#compare")}); - Kotlin.collectionsMax = function(c, comp) { - if (c.isEmpty()) { - throw new Error; - } - var it = c.iterator(); - var max = it.next(); - while (it.hasNext()) { - var el = it.next(); - if (comp.compare(max, el) < 0) { - max = el; - } - } - return max; - }; - Kotlin.collectionsSort = function(mutableList, comparator) { - var boundComparator = void 0; - if (comparator !== void 0) { - boundComparator = comparator.compare.bind(comparator); - } - if (mutableList instanceof Array) { - mutableList.sort(boundComparator); - } - if (mutableList.size > 1) { - var array = Kotlin.copyToArray(mutableList); - array.sort(boundComparator); - for (var i = 0, n = array.length;i < n;i++) { - mutableList.set_vux3hl$(i, array[i]); - } - } - }; - Kotlin.primitiveArraySort = function(array) { - array.sort(Kotlin.primitiveCompareTo); - }; - Kotlin.copyToArray = function(collection) { - if (typeof collection.toArray !== "undefined") { - return collection.toArray(); - } - var array = []; - var it = collection.iterator(); - while (it.hasNext()) { - array.push(it.next()); - } - return array; - }; - Kotlin.StringBuilder = Kotlin.createClassNow([CharSequence], function(content) { - this.string = typeof content == "string" ? content : ""; - }, {length:{get:function() { - return this.string.length; - }}, substring:function(start, end) { - return this.string.substring(start, end); - }, charAt:function(index) { - return this.string.charAt(index); - }, append:function(obj, from, to) { - if (from == void 0 && to == void 0) { - this.string = this.string + obj.toString(); - } else { - if (to == void 0) { - this.string = this.string + obj.toString().substring(from); - } else { - this.string = this.string + obj.toString().substring(from, to); - } - } - return this; - }, reverse:function() { - this.string = this.string.split("").reverse().join(""); - return this; - }, toString:function() { - return this.string; - }}); - Kotlin.splitString = function(str, regex, limit) { - return str.split(new RegExp(regex), limit); - }; - Kotlin.nullArray = function(size) { - var res = []; - var i = size; - while (i > 0) { - res[--i] = null; - } - return res; - }; - Kotlin.numberArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return 0; - }); - }; - Kotlin.charArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return "\x00"; - }); - }; - Kotlin.booleanArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return false; - }); - }; - Kotlin.longArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return Kotlin.Long.ZERO; - }); - }; - Kotlin.arrayFromFun = function(size, initFun) { - var result = new Array(size); - for (var i = 0;i < size;i++) { - result[i] = initFun(i); - } - return result; - }; - Kotlin.arrayIterator = function(array) { - return new Kotlin.ArrayIterator(array); - }; - Kotlin.jsonAddProperties = function(obj1, obj2) { - for (var p in obj2) { - if (obj2.hasOwnProperty(p)) { - obj1[p] = obj2[p]; - } - } - return obj1; - }; - Kotlin.createDefinition(lazyInitClasses, Kotlin); -})(Kotlin); -(function(Kotlin) { - function Entry(key, value) { - this.key = key; - this.value = value; - } - Entry.prototype.getKey = function() { - return this.key; - }; - Entry.prototype.getValue = function() { - return this.value; - }; - Entry.prototype.hashCode = function() { - return mapEntryHashCode(this.key, this.value); - }; - Entry.prototype.equals_za3rmp$ = function(o) { - return o instanceof Entry && (Kotlin.equals(this.key, o.getKey()) && Kotlin.equals(this.value, o.getValue())); - }; - Entry.prototype.toString = function() { - return Kotlin.toString(this.key) + "\x3d" + Kotlin.toString(this.value); - }; - function hashMapPutAll(fromMap) { - var entries = fromMap.entries; - var it = entries.iterator(); - while (it.hasNext()) { - var e = it.next(); - this.put_wn2jw4$(e.getKey(), e.getValue()); - } - } - function hashSetEquals(o) { - if (o == null || this.size !== o.size) { - return false; - } - return this.containsAll_wtfk93$(o); - } - function hashSetHashCode() { - var h = 0; - var i = this.iterator(); - while (i.hasNext()) { - var obj = i.next(); - h += Kotlin.hashCode(obj); - } - return h; - } - function convertKeyToString(key) { - return key; - } - function convertKeyToNumber(key) { - return+key; - } - function convertKeyToBoolean(key) { - return key == "true"; - } - var FUNCTION = "function"; - var arrayRemoveAt = typeof Array.prototype.splice == FUNCTION ? function(arr, idx) { - arr.splice(idx, 1); - } : function(arr, idx) { - var itemsAfterDeleted, i, len; - if (idx === arr.length - 1) { - arr.length = idx; - } else { - itemsAfterDeleted = arr.slice(idx + 1); - arr.length = idx; - for (i = 0, len = itemsAfterDeleted.length;i < len;++i) { - arr[idx + i] = itemsAfterDeleted[i]; - } - } - }; - function hashObject(obj) { - if (obj == null) { - return ""; - } - var hashCode; - if (typeof obj == "string") { - return obj; - } else { - if (typeof obj.hashCode == FUNCTION) { - hashCode = obj.hashCode(); - return typeof hashCode == "string" ? hashCode : hashObject(hashCode); - } else { - if (typeof obj.toString == FUNCTION) { - return obj.toString(); - } else { - try { - return String(obj); - } catch (ex) { - return Object.prototype.toString.call(obj); - } - } - } - } - } - function mapEntryHashCode(key, value) { - return Kotlin.hashCode(key) ^ Kotlin.hashCode(value); - } - function equals_fixedValueHasEquals(fixedValue, variableValue) { - return fixedValue.equals_za3rmp$(variableValue); - } - function equals_fixedValueNoEquals(fixedValue, variableValue) { - return variableValue != null && typeof variableValue.equals_za3rmp$ == FUNCTION ? variableValue.equals_za3rmp$(fixedValue) : fixedValue === variableValue; - } - function Bucket(hash, firstKey, firstValue, equalityFunction) { - this[0] = hash; - this.entries = []; - this.addEntry(firstKey, firstValue); - if (equalityFunction !== null) { - this.getEqualityFunction = function() { - return equalityFunction; - }; - } - } - var EXISTENCE = 0, ENTRY = 1, ENTRY_INDEX_AND_VALUE = 2; - function createBucketSearcher(mode) { - return function(key) { - var i = this.entries.length, entry, equals = this.getEqualityFunction(key); - while (i--) { - entry = this.entries[i]; - if (equals(key, entry[0])) { - switch(mode) { - case EXISTENCE: - return true; - case ENTRY: - return entry; - case ENTRY_INDEX_AND_VALUE: - return[i, entry[1]]; - } - } - } - return false; - }; - } - function createBucketLister(entryProperty) { - return function(aggregatedArr) { - var startIndex = aggregatedArr.length; - for (var i = 0, len = this.entries.length;i < len;++i) { - aggregatedArr[startIndex + i] = this.entries[i][entryProperty]; - } - }; - } - Bucket.prototype = {getEqualityFunction:function(searchValue) { - return searchValue != null && typeof searchValue.equals_za3rmp$ == FUNCTION ? equals_fixedValueHasEquals : equals_fixedValueNoEquals; - }, getEntryForKey:createBucketSearcher(ENTRY), getEntryAndIndexForKey:createBucketSearcher(ENTRY_INDEX_AND_VALUE), removeEntryForKey:function(key) { - var result = this.getEntryAndIndexForKey(key); - if (result) { - arrayRemoveAt(this.entries, result[0]); - return result; - } - return null; - }, addEntry:function(key, value) { - this.entries[this.entries.length] = [key, value]; - }, keys:createBucketLister(0), values:createBucketLister(1), getEntries:function(entries) { - var startIndex = entries.length; - for (var i = 0, len = this.entries.length;i < len;++i) { - entries[startIndex + i] = this.entries[i].slice(0); - } - }, containsKey_za3rmp$:createBucketSearcher(EXISTENCE), containsValue_za3rmp$:function(value) { - var i = this.entries.length; - while (i--) { - if (value === this.entries[i][1]) { - return true; - } - } - return false; - }}; - function searchBuckets(buckets, hash) { - var i = buckets.length, bucket; - while (i--) { - bucket = buckets[i]; - if (hash === bucket[0]) { - return i; - } - } - return null; - } - function getBucketForHash(bucketsByHash, hash) { - var bucket = bucketsByHash[hash]; - return bucket && bucket instanceof Bucket ? bucket : null; - } - var Hashtable = function(hashingFunctionParam, equalityFunctionParam) { - var that = this; - var buckets = []; - var bucketsByHash = {}; - var hashingFunction = typeof hashingFunctionParam == FUNCTION ? hashingFunctionParam : hashObject; - var equalityFunction = typeof equalityFunctionParam == FUNCTION ? equalityFunctionParam : null; - this.put_wn2jw4$ = function(key, value) { - var hash = hashingFunction(key), bucket, bucketEntry, oldValue = null; - bucket = getBucketForHash(bucketsByHash, hash); - if (bucket) { - bucketEntry = bucket.getEntryForKey(key); - if (bucketEntry) { - oldValue = bucketEntry[1]; - bucketEntry[1] = value; - } else { - bucket.addEntry(key, value); - } - } else { - bucket = new Bucket(hash, key, value, equalityFunction); - buckets[buckets.length] = bucket; - bucketsByHash[hash] = bucket; - } - return oldValue; - }; - this.get_za3rmp$ = function(key) { - var hash = hashingFunction(key); - var bucket = getBucketForHash(bucketsByHash, hash); - if (bucket) { - var bucketEntry = bucket.getEntryForKey(key); - if (bucketEntry) { - return bucketEntry[1]; - } - } - return null; - }; - this.containsKey_za3rmp$ = function(key) { - var bucketKey = hashingFunction(key); - var bucket = getBucketForHash(bucketsByHash, bucketKey); - return bucket ? bucket.containsKey_za3rmp$(key) : false; - }; - this.containsValue_za3rmp$ = function(value) { - var i = buckets.length; - while (i--) { - if (buckets[i].containsValue_za3rmp$(value)) { - return true; - } - } - return false; - }; - this.clear = function() { - buckets.length = 0; - bucketsByHash = {}; - }; - this.isEmpty = function() { - return!buckets.length; - }; - var createBucketAggregator = function(bucketFuncName) { - return function() { - var aggregated = [], i = buckets.length; - while (i--) { - buckets[i][bucketFuncName](aggregated); - } - return aggregated; - }; - }; - this._keys = createBucketAggregator("keys"); - this._values = createBucketAggregator("values"); - this._entries = createBucketAggregator("getEntries"); - Object.defineProperty(this, "values", {get:function() { - var values = this._values(); - var i = values.length; - var result = new Kotlin.ArrayList; - while (i--) { - result.add_za3rmp$(values[i]); - } - return result; - }, configurable:true}); - this.remove_za3rmp$ = function(key) { - var hash = hashingFunction(key), bucketIndex, oldValue = null, result = null; - var bucket = getBucketForHash(bucketsByHash, hash); - if (bucket) { - result = bucket.removeEntryForKey(key); - if (result !== null) { - oldValue = result[1]; - if (!bucket.entries.length) { - bucketIndex = searchBuckets(buckets, hash); - arrayRemoveAt(buckets, bucketIndex); - delete bucketsByHash[hash]; - } - } - } - return oldValue; - }; - Object.defineProperty(this, "size", {get:function() { - var total = 0, i = buckets.length; - while (i--) { - total += buckets[i].entries.length; - } - return total; - }}); - this.each = function(callback) { - var entries = that._entries(), i = entries.length, entry; - while (i--) { - entry = entries[i]; - callback(entry[0], entry[1]); - } - }; - this.putAll_r12sna$ = hashMapPutAll; - this.clone = function() { - var clone = new Hashtable(hashingFunctionParam, equalityFunctionParam); - clone.putAll_r12sna$(that); - return clone; - }; - Object.defineProperty(this, "keys", {get:function() { - var res = new Kotlin.ComplexHashSet; - var keys = this._keys(); - var i = keys.length; - while (i--) { - res.add_za3rmp$(keys[i]); - } - return res; - }, configurable:true}); - Object.defineProperty(this, "entries", {get:function() { - var result = new Kotlin.ComplexHashSet; - var entries = this._entries(); - var i = entries.length; - while (i--) { - var entry = entries[i]; - result.add_za3rmp$(new Entry(entry[0], entry[1])); - } - return result; - }, configurable:true}); - this.hashCode = function() { - var h = 0; - var entries = this._entries(); - var i = entries.length; - while (i--) { - var entry = entries[i]; - h += mapEntryHashCode(entry[0], entry[1]); - } - return h; - }; - this.equals_za3rmp$ = function(o) { - if (o == null || this.size !== o.size) { - return false; - } - var entries = this._entries(); - var i = entries.length; - while (i--) { - var entry = entries[i]; - var key = entry[0]; - var value = entry[1]; - if (value == null) { - if (!(o.get_za3rmp$(key) == null && o.contains_za3rmp$(key))) { - return false; - } - } else { - if (!Kotlin.equals(value, o.get_za3rmp$(key))) { - return false; - } - } - } - return true; - }; - this.toString = function() { - var entries = this._entries(); - var length = entries.length; - if (length === 0) { - return "{}"; - } - var builder = "{"; - for (var i = 0;;) { - var entry = entries[i]; - var key = entry[0]; - var value = entry[1]; - builder += (key === this ? "(this Map)" : Kotlin.toString(key)) + "\x3d" + (value === this ? "(this Map)" : Kotlin.toString(value)); - if (++i >= length) { - return builder + "}"; - } - builder += ", "; - } - }; - }; - Kotlin.HashTable = Hashtable; - var lazyInitClasses = {}; - lazyInitClasses.HashMap = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableMap]; - }, function() { - Kotlin.HashTable.call(this); - }); - Object.defineProperty(Kotlin, "ComplexHashMap", {get:function() { - return Kotlin.HashMap; - }}); - lazyInitClasses.PrimitiveHashMapValuesIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(map, keys) { - this.map = map; - this.keys = keys; - this.size = keys.length; - this.index = 0; - }, {next:function() { - if (!this.hasNext()) { - throw new Kotlin.NoSuchElementException; - } - return this.map[this.keys[this.index++]]; - }, hasNext:function() { - return this.index < this.size; - }}); - lazyInitClasses.PrimitiveHashMapValues = Kotlin.createClass(function() { - return[Kotlin.AbstractCollection]; - }, function(map) { - this.map = map; - }, {iterator:function() { - return new Kotlin.PrimitiveHashMapValuesIterator(this.map.map, Object.keys(this.map.map)); - }, isEmpty:function() { - return this.map.isEmpty(); - }, size:{get:function() { - return this.map.size; - }}, contains_za3rmp$:function(o) { - return this.map.containsValue_za3rmp$(o); - }}); - lazyInitClasses.AbstractPrimitiveHashMap = Kotlin.createClass(function() { - return[Kotlin.HashMap]; - }, function() { - this.$size = 0; - this.map = Object.create(null); - }, {size:{get:function() { - return this.$size; - }}, isEmpty:function() { - return this.$size === 0; - }, containsKey_za3rmp$:function(key) { - return this.map[key] !== void 0; - }, containsValue_za3rmp$:function(value) { - var map = this.map; - for (var key in map) { - if (map[key] === value) { - return true; - } - } - return false; - }, get_za3rmp$:function(key) { - return this.map[key]; - }, put_wn2jw4$:function(key, value) { - var prevValue = this.map[key]; - this.map[key] = value === void 0 ? null : value; - if (prevValue === void 0) { - this.$size++; - } - return prevValue; - }, remove_za3rmp$:function(key) { - var prevValue = this.map[key]; - if (prevValue !== void 0) { - delete this.map[key]; - this.$size--; - } - return prevValue; - }, clear:function() { - this.$size = 0; - this.map = {}; - }, putAll_r12sna$:hashMapPutAll, entries:{get:function() { - var result = new Kotlin.ComplexHashSet; - var map = this.map; - for (var key in map) { - result.add_za3rmp$(new Entry(this.convertKeyToKeyType(key), map[key])); - } - return result; - }}, getKeySetClass:function() { - throw new Error("Kotlin.AbstractPrimitiveHashMap.getKetSetClass is abstract"); - }, convertKeyToKeyType:function(key) { - throw new Error("Kotlin.AbstractPrimitiveHashMap.convertKeyToKeyType is abstract"); - }, keys:{get:function() { - var result = new (this.getKeySetClass()); - var map = this.map; - for (var key in map) { - result.add_za3rmp$(key); - } - return result; - }}, values:{get:function() { - return new Kotlin.PrimitiveHashMapValues(this); - }}, toJSON:function() { - return this.map; - }, toString:function() { - if (this.isEmpty()) { - return "{}"; - } - var map = this.map; - var isFirst = true; - var builder = "{"; - for (var key in map) { - var value = map[key]; - builder += (isFirst ? "" : ", ") + Kotlin.toString(key) + "\x3d" + (value === this ? "(this Map)" : Kotlin.toString(value)); - isFirst = false; - } - return builder + "}"; - }, equals_za3rmp$:function(o) { - if (o == null || this.size !== o.size) { - return false; - } - var map = this.map; - for (var key in map) { - var key_ = this.convertKeyToKeyType(key); - var value = map[key]; - if (value == null) { - if (!(o.get_za3rmp$(key_) == null && o.contains_za3rmp$(key_))) { - return false; - } - } else { - if (!Kotlin.equals(value, o.get_za3rmp$(key_))) { - return false; - } - } - } - return true; - }, hashCode:function() { - var h = 0; - var map = this.map; - for (var key in map) { - h += mapEntryHashCode(this.convertKeyToKeyType(key), map[key]); - } - return h; - }}); - lazyInitClasses.DefaultPrimitiveHashMap = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashMap]; - }, function() { - Kotlin.AbstractPrimitiveHashMap.call(this); - }, {getKeySetClass:function() { - return Kotlin.DefaultPrimitiveHashSet; - }, convertKeyToKeyType:convertKeyToString}); - lazyInitClasses.PrimitiveNumberHashMap = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashMap]; - }, function() { - Kotlin.AbstractPrimitiveHashMap.call(this); - this.$keySetClass$ = Kotlin.PrimitiveNumberHashSet; - }, {getKeySetClass:function() { - return Kotlin.PrimitiveNumberHashSet; - }, convertKeyToKeyType:convertKeyToNumber}); - lazyInitClasses.PrimitiveBooleanHashMap = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashMap]; - }, function() { - Kotlin.AbstractPrimitiveHashMap.call(this); - }, {getKeySetClass:function() { - return Kotlin.PrimitiveBooleanHashSet; - }, convertKeyToKeyType:convertKeyToBoolean}); - function LinkedHashMap() { - Kotlin.ComplexHashMap.call(this); - this.orderedKeys = []; - this.super_put_wn2jw4$ = this.put_wn2jw4$; - this.put_wn2jw4$ = function(key, value) { - if (!this.containsKey_za3rmp$(key)) { - this.orderedKeys.push(key); - } - return this.super_put_wn2jw4$(key, value); - }; - this.super_remove_za3rmp$ = this.remove_za3rmp$; - this.remove_za3rmp$ = function(key) { - var i = this.orderedKeys.indexOf(key); - if (i != -1) { - this.orderedKeys.splice(i, 1); - } - return this.super_remove_za3rmp$(key); - }; - this.super_clear = this.clear; - this.clear = function() { - this.super_clear(); - this.orderedKeys = []; - }; - Object.defineProperty(this, "keys", {get:function() { - var set = new Kotlin.LinkedHashSet; - set.map = this; - return set; - }}); - Object.defineProperty(this, "entries", {get:function() { - var result = new Kotlin.ArrayList; - for (var i = 0, c = this.orderedKeys, l = c.length;i < l;i++) { - result.add_za3rmp$(this.get_za3rmp$(c[i])); - } - return result; - }}); - Object.defineProperty(this, "entries", {get:function() { - var set = new Kotlin.LinkedHashSet; - for (var i = 0, c = this.orderedKeys, l = c.length;i < l;i++) { - set.add_za3rmp$(new Entry(c[i], this.get_za3rmp$(c[i]))); - } - return set; - }}); - } - lazyInitClasses.LinkedHashMap = Kotlin.createClass(function() { - return[Kotlin.ComplexHashMap]; - }, function() { - LinkedHashMap.call(this); - }); - lazyInitClasses.LinkedHashSet = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableSet, Kotlin.HashSet]; - }, function() { - this.map = new Kotlin.LinkedHashMap; - }, {equals_za3rmp$:hashSetEquals, hashCode:hashSetHashCode, size:{get:function() { - return this.map.size; - }}, contains_za3rmp$:function(element) { - return this.map.containsKey_za3rmp$(element); - }, iterator:function() { - return new Kotlin.SetIterator(this); - }, add_za3rmp$:function(element) { - return this.map.put_wn2jw4$(element, true) == null; - }, remove_za3rmp$:function(element) { - return this.map.remove_za3rmp$(element) != null; - }, clear:function() { - this.map.clear(); - }, toArray:function() { - return this.map.orderedKeys.slice(); - }}); - lazyInitClasses.SetIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableIterator]; - }, function(set) { - this.set = set; - this.keys = set.toArray(); - this.index = 0; - }, {next:function() { - if (!this.hasNext()) { - throw new Kotlin.NoSuchElementException; - } - return this.keys[this.index++]; - }, hasNext:function() { - return this.index < this.keys.length; - }, remove:function() { - if (this.index === 0) { - throw Kotlin.IllegalStateException(); - } - this.set.remove_za3rmp$(this.keys[this.index - 1]); - }}); - lazyInitClasses.AbstractPrimitiveHashSet = Kotlin.createClass(function() { - return[Kotlin.HashSet]; - }, function() { - this.$size = 0; - this.map = Object.create(null); - }, {equals_za3rmp$:hashSetEquals, hashCode:hashSetHashCode, size:{get:function() { - return this.$size; - }}, contains_za3rmp$:function(key) { - return this.map[key] === true; - }, iterator:function() { - return new Kotlin.SetIterator(this); - }, add_za3rmp$:function(element) { - var prevElement = this.map[element]; - this.map[element] = true; - if (prevElement === true) { - return false; - } else { - this.$size++; - return true; - } - }, remove_za3rmp$:function(element) { - if (this.map[element] === true) { - delete this.map[element]; - this.$size--; - return true; - } else { - return false; - } - }, clear:function() { - this.$size = 0; - this.map = {}; - }, convertKeyToKeyType:function(key) { - throw new Error("Kotlin.AbstractPrimitiveHashSet.convertKeyToKeyType is abstract"); - }, toArray:function() { - var result = Object.keys(this.map); - for (var i = 0;i < result.length;i++) { - result[i] = this.convertKeyToKeyType(result[i]); - } - return result; - }}); - lazyInitClasses.DefaultPrimitiveHashSet = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashSet]; - }, function() { - Kotlin.AbstractPrimitiveHashSet.call(this); - }, {toArray:function() { - return Object.keys(this.map); - }, convertKeyToKeyType:convertKeyToString}); - lazyInitClasses.PrimitiveNumberHashSet = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashSet]; - }, function() { - Kotlin.AbstractPrimitiveHashSet.call(this); - }, {convertKeyToKeyType:convertKeyToNumber}); - lazyInitClasses.PrimitiveBooleanHashSet = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashSet]; - }, function() { - Kotlin.AbstractPrimitiveHashSet.call(this); - }, {convertKeyToKeyType:convertKeyToBoolean}); - function HashSet(hashingFunction, equalityFunction) { - var hashTable = new Kotlin.HashTable(hashingFunction, equalityFunction); - this.addAll_wtfk93$ = Kotlin.AbstractCollection.prototype.addAll_wtfk93$; - this.removeAll_wtfk93$ = Kotlin.AbstractCollection.prototype.removeAll_wtfk93$; - this.retainAll_wtfk93$ = Kotlin.AbstractCollection.prototype.retainAll_wtfk93$; - this.containsAll_wtfk93$ = Kotlin.AbstractCollection.prototype.containsAll_wtfk93$; - this.add_za3rmp$ = function(o) { - return!hashTable.put_wn2jw4$(o, true); - }; - this.toArray = function() { - return hashTable._keys(); - }; - this.iterator = function() { - return new Kotlin.SetIterator(this); - }; - this.remove_za3rmp$ = function(o) { - return hashTable.remove_za3rmp$(o) != null; - }; - this.contains_za3rmp$ = function(o) { - return hashTable.containsKey_za3rmp$(o); - }; - this.clear = function() { - hashTable.clear(); - }; - Object.defineProperty(this, "size", {get:function() { - return hashTable.size; - }}); - this.isEmpty = function() { - return hashTable.isEmpty(); - }; - this.clone = function() { - var h = new HashSet(hashingFunction, equalityFunction); - h.addAll_wtfk93$(hashTable.keys()); - return h; - }; - this.equals_za3rmp$ = hashSetEquals; - this.toString = function() { - var builder = "["; - var iter = this.iterator(); - var first = true; - while (iter.hasNext()) { - if (first) { - first = false; - } else { - builder += ", "; - } - builder += iter.next(); - } - builder += "]"; - return builder; - }; - this.intersection = function(hashSet) { - var intersection = new HashSet(hashingFunction, equalityFunction); - var values = hashSet.values, i = values.length, val; - while (i--) { - val = values[i]; - if (hashTable.containsKey_za3rmp$(val)) { - intersection.add_za3rmp$(val); - } - } - return intersection; - }; - this.union = function(hashSet) { - var union = this.clone(); - var values = hashSet.values, i = values.length, val; - while (i--) { - val = values[i]; - if (!hashTable.containsKey_za3rmp$(val)) { - union.add_za3rmp$(val); - } - } - return union; - }; - this.isSubsetOf = function(hashSet) { - var values = hashTable.keys(), i = values.length; - while (i--) { - if (!hashSet.contains_za3rmp$(values[i])) { - return false; - } - } - return true; - }; - this.hashCode = hashSetHashCode; - } - lazyInitClasses.HashSet = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableSet, Kotlin.AbstractCollection]; - }, function() { - HashSet.call(this); - }); - Object.defineProperty(Kotlin, "ComplexHashSet", {get:function() { - return Kotlin.HashSet; - }}); - Kotlin.createDefinition(lazyInitClasses, Kotlin); -})(Kotlin); -(function(Kotlin) { - Kotlin.Long = function(low, high) { - this.low_ = low | 0; - this.high_ = high | 0; - }; - Kotlin.Long.IntCache_ = {}; - Kotlin.Long.fromInt = function(value) { - if (-128 <= value && value < 128) { - var cachedObj = Kotlin.Long.IntCache_[value]; - if (cachedObj) { - return cachedObj; - } - } - var obj = new Kotlin.Long(value | 0, value < 0 ? -1 : 0); - if (-128 <= value && value < 128) { - Kotlin.Long.IntCache_[value] = obj; - } - return obj; - }; - Kotlin.Long.fromNumber = function(value) { - if (isNaN(value) || !isFinite(value)) { - return Kotlin.Long.ZERO; - } else { - if (value <= -Kotlin.Long.TWO_PWR_63_DBL_) { - return Kotlin.Long.MIN_VALUE; - } else { - if (value + 1 >= Kotlin.Long.TWO_PWR_63_DBL_) { - return Kotlin.Long.MAX_VALUE; - } else { - if (value < 0) { - return Kotlin.Long.fromNumber(-value).negate(); - } else { - return new Kotlin.Long(value % Kotlin.Long.TWO_PWR_32_DBL_ | 0, value / Kotlin.Long.TWO_PWR_32_DBL_ | 0); - } - } - } - } - }; - Kotlin.Long.fromBits = function(lowBits, highBits) { - return new Kotlin.Long(lowBits, highBits); - }; - Kotlin.Long.fromString = function(str, opt_radix) { - if (str.length == 0) { - throw Error("number format error: empty string"); - } - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error("radix out of range: " + radix); - } - if (str.charAt(0) == "-") { - return Kotlin.Long.fromString(str.substring(1), radix).negate(); - } else { - if (str.indexOf("-") >= 0) { - throw Error('number format error: interior "-" character: ' + str); - } - } - var radixToPower = Kotlin.Long.fromNumber(Math.pow(radix, 8)); - var result = Kotlin.Long.ZERO; - for (var i = 0;i < str.length;i += 8) { - var size = Math.min(8, str.length - i); - var value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = Kotlin.Long.fromNumber(Math.pow(radix, size)); - result = result.multiply(power).add(Kotlin.Long.fromNumber(value)); - } else { - result = result.multiply(radixToPower); - result = result.add(Kotlin.Long.fromNumber(value)); - } - } - return result; - }; - Kotlin.Long.TWO_PWR_16_DBL_ = 1 << 16; - Kotlin.Long.TWO_PWR_24_DBL_ = 1 << 24; - Kotlin.Long.TWO_PWR_32_DBL_ = Kotlin.Long.TWO_PWR_16_DBL_ * Kotlin.Long.TWO_PWR_16_DBL_; - Kotlin.Long.TWO_PWR_31_DBL_ = Kotlin.Long.TWO_PWR_32_DBL_ / 2; - Kotlin.Long.TWO_PWR_48_DBL_ = Kotlin.Long.TWO_PWR_32_DBL_ * Kotlin.Long.TWO_PWR_16_DBL_; - Kotlin.Long.TWO_PWR_64_DBL_ = Kotlin.Long.TWO_PWR_32_DBL_ * Kotlin.Long.TWO_PWR_32_DBL_; - Kotlin.Long.TWO_PWR_63_DBL_ = Kotlin.Long.TWO_PWR_64_DBL_ / 2; - Kotlin.Long.ZERO = Kotlin.Long.fromInt(0); - Kotlin.Long.ONE = Kotlin.Long.fromInt(1); - Kotlin.Long.NEG_ONE = Kotlin.Long.fromInt(-1); - Kotlin.Long.MAX_VALUE = Kotlin.Long.fromBits(4294967295 | 0, 2147483647 | 0); - Kotlin.Long.MIN_VALUE = Kotlin.Long.fromBits(0, 2147483648 | 0); - Kotlin.Long.TWO_PWR_24_ = Kotlin.Long.fromInt(1 << 24); - Kotlin.Long.prototype.toInt = function() { - return this.low_; - }; - Kotlin.Long.prototype.toNumber = function() { - return this.high_ * Kotlin.Long.TWO_PWR_32_DBL_ + this.getLowBitsUnsigned(); - }; - Kotlin.Long.prototype.toString = function(opt_radix) { - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error("radix out of range: " + radix); - } - if (this.isZero()) { - return "0"; - } - if (this.isNegative()) { - if (this.equals(Kotlin.Long.MIN_VALUE)) { - var radixLong = Kotlin.Long.fromNumber(radix); - var div = this.div(radixLong); - var rem = div.multiply(radixLong).subtract(this); - return div.toString(radix) + rem.toInt().toString(radix); - } else { - return "-" + this.negate().toString(radix); - } - } - var radixToPower = Kotlin.Long.fromNumber(Math.pow(radix, 6)); - var rem = this; - var result = ""; - while (true) { - var remDiv = rem.div(radixToPower); - var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); - var digits = intval.toString(radix); - rem = remDiv; - if (rem.isZero()) { - return digits + result; - } else { - while (digits.length < 6) { - digits = "0" + digits; - } - result = "" + digits + result; - } - } - }; - Kotlin.Long.prototype.getHighBits = function() { - return this.high_; - }; - Kotlin.Long.prototype.getLowBits = function() { - return this.low_; - }; - Kotlin.Long.prototype.getLowBitsUnsigned = function() { - return this.low_ >= 0 ? this.low_ : Kotlin.Long.TWO_PWR_32_DBL_ + this.low_; - }; - Kotlin.Long.prototype.getNumBitsAbs = function() { - if (this.isNegative()) { - if (this.equals(Kotlin.Long.MIN_VALUE)) { - return 64; - } else { - return this.negate().getNumBitsAbs(); - } - } else { - var val = this.high_ != 0 ? this.high_ : this.low_; - for (var bit = 31;bit > 0;bit--) { - if ((val & 1 << bit) != 0) { - break; - } - } - return this.high_ != 0 ? bit + 33 : bit + 1; - } - }; - Kotlin.Long.prototype.isZero = function() { - return this.high_ == 0 && this.low_ == 0; - }; - Kotlin.Long.prototype.isNegative = function() { - return this.high_ < 0; - }; - Kotlin.Long.prototype.isOdd = function() { - return(this.low_ & 1) == 1; - }; - Kotlin.Long.prototype.equals = function(other) { - return this.high_ == other.high_ && this.low_ == other.low_; - }; - Kotlin.Long.prototype.notEquals = function(other) { - return this.high_ != other.high_ || this.low_ != other.low_; - }; - Kotlin.Long.prototype.lessThan = function(other) { - return this.compare(other) < 0; - }; - Kotlin.Long.prototype.lessThanOrEqual = function(other) { - return this.compare(other) <= 0; - }; - Kotlin.Long.prototype.greaterThan = function(other) { - return this.compare(other) > 0; - }; - Kotlin.Long.prototype.greaterThanOrEqual = function(other) { - return this.compare(other) >= 0; - }; - Kotlin.Long.prototype.compare = function(other) { - if (this.equals(other)) { - return 0; - } - var thisNeg = this.isNegative(); - var otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) { - return-1; - } - if (!thisNeg && otherNeg) { - return 1; - } - if (this.subtract(other).isNegative()) { - return-1; - } else { - return 1; - } - }; - Kotlin.Long.prototype.negate = function() { - if (this.equals(Kotlin.Long.MIN_VALUE)) { - return Kotlin.Long.MIN_VALUE; - } else { - return this.not().add(Kotlin.Long.ONE); - } - }; - Kotlin.Long.prototype.add = function(other) { - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 65535; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 65535; - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 65535; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 65535; - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 65535; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 65535; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 65535; - c48 += a48 + b48; - c48 &= 65535; - return Kotlin.Long.fromBits(c16 << 16 | c00, c48 << 16 | c32); - }; - Kotlin.Long.prototype.subtract = function(other) { - return this.add(other.negate()); - }; - Kotlin.Long.prototype.multiply = function(other) { - if (this.isZero()) { - return Kotlin.Long.ZERO; - } else { - if (other.isZero()) { - return Kotlin.Long.ZERO; - } - } - if (this.equals(Kotlin.Long.MIN_VALUE)) { - return other.isOdd() ? Kotlin.Long.MIN_VALUE : Kotlin.Long.ZERO; - } else { - if (other.equals(Kotlin.Long.MIN_VALUE)) { - return this.isOdd() ? Kotlin.Long.MIN_VALUE : Kotlin.Long.ZERO; - } - } - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().multiply(other.negate()); - } else { - return this.negate().multiply(other).negate(); - } - } else { - if (other.isNegative()) { - return this.multiply(other.negate()).negate(); - } - } - if (this.lessThan(Kotlin.Long.TWO_PWR_24_) && other.lessThan(Kotlin.Long.TWO_PWR_24_)) { - return Kotlin.Long.fromNumber(this.toNumber() * other.toNumber()); - } - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 65535; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 65535; - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 65535; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 65535; - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 65535; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 65535; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 65535; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 65535; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 65535; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 65535; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 65535; - return Kotlin.Long.fromBits(c16 << 16 | c00, c48 << 16 | c32); - }; - Kotlin.Long.prototype.div = function(other) { - if (other.isZero()) { - throw Error("division by zero"); - } else { - if (this.isZero()) { - return Kotlin.Long.ZERO; - } - } - if (this.equals(Kotlin.Long.MIN_VALUE)) { - if (other.equals(Kotlin.Long.ONE) || other.equals(Kotlin.Long.NEG_ONE)) { - return Kotlin.Long.MIN_VALUE; - } else { - if (other.equals(Kotlin.Long.MIN_VALUE)) { - return Kotlin.Long.ONE; - } else { - var halfThis = this.shiftRight(1); - var approx = halfThis.div(other).shiftLeft(1); - if (approx.equals(Kotlin.Long.ZERO)) { - return other.isNegative() ? Kotlin.Long.ONE : Kotlin.Long.NEG_ONE; - } else { - var rem = this.subtract(other.multiply(approx)); - var result = approx.add(rem.div(other)); - return result; - } - } - } - } else { - if (other.equals(Kotlin.Long.MIN_VALUE)) { - return Kotlin.Long.ZERO; - } - } - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().div(other.negate()); - } else { - return this.negate().div(other).negate(); - } - } else { - if (other.isNegative()) { - return this.div(other.negate()).negate(); - } - } - var res = Kotlin.Long.ZERO; - var rem = this; - while (rem.greaterThanOrEqual(other)) { - var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); - var log2 = Math.ceil(Math.log(approx) / Math.LN2); - var delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48); - var approxRes = Kotlin.Long.fromNumber(approx); - var approxRem = approxRes.multiply(other); - while (approxRem.isNegative() || approxRem.greaterThan(rem)) { - approx -= delta; - approxRes = Kotlin.Long.fromNumber(approx); - approxRem = approxRes.multiply(other); - } - if (approxRes.isZero()) { - approxRes = Kotlin.Long.ONE; - } - res = res.add(approxRes); - rem = rem.subtract(approxRem); - } - return res; - }; - Kotlin.Long.prototype.modulo = function(other) { - return this.subtract(this.div(other).multiply(other)); - }; - Kotlin.Long.prototype.not = function() { - return Kotlin.Long.fromBits(~this.low_, ~this.high_); - }; - Kotlin.Long.prototype.and = function(other) { - return Kotlin.Long.fromBits(this.low_ & other.low_, this.high_ & other.high_); - }; - Kotlin.Long.prototype.or = function(other) { - return Kotlin.Long.fromBits(this.low_ | other.low_, this.high_ | other.high_); - }; - Kotlin.Long.prototype.xor = function(other) { - return Kotlin.Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_); - }; - Kotlin.Long.prototype.shiftLeft = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var low = this.low_; - if (numBits < 32) { - var high = this.high_; - return Kotlin.Long.fromBits(low << numBits, high << numBits | low >>> 32 - numBits); - } else { - return Kotlin.Long.fromBits(0, low << numBits - 32); - } - } - }; - Kotlin.Long.prototype.shiftRight = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return Kotlin.Long.fromBits(low >>> numBits | high << 32 - numBits, high >> numBits); - } else { - return Kotlin.Long.fromBits(high >> numBits - 32, high >= 0 ? 0 : -1); - } - } - }; - Kotlin.Long.prototype.shiftRightUnsigned = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return Kotlin.Long.fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits); - } else { - if (numBits == 32) { - return Kotlin.Long.fromBits(high, 0); - } else { - return Kotlin.Long.fromBits(high >>> numBits - 32, 0); - } - } - } - }; - Kotlin.Long.prototype.equals_za3rmp$ = function(other) { - return other instanceof Kotlin.Long && this.equals(other); - }; - Kotlin.Long.prototype.compareTo_za3rmp$ = Kotlin.Long.prototype.compare; - Kotlin.Long.prototype.inc = function() { - return this.add(Kotlin.Long.ONE); - }; - Kotlin.Long.prototype.dec = function() { - return this.add(Kotlin.Long.NEG_ONE); - }; - Kotlin.Long.prototype.valueOf = function() { - return this.toNumber(); - }; - Kotlin.Long.prototype.unaryPlus = function() { - return this; - }; - Kotlin.Long.prototype.unaryMinus = Kotlin.Long.prototype.negate; - Kotlin.Long.prototype.inv = Kotlin.Long.prototype.not; - Kotlin.Long.prototype.rangeTo = function(other) { - return new Kotlin.LongRange(this, other); - }; -})(Kotlin); -(function(Kotlin) { - var _ = Kotlin.defineRootPackage(null, {kotlin:Kotlin.definePackage(null, {collections:Kotlin.definePackage(null, {Iterable:Kotlin.createTrait(null), MutableIterable:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterable]; - }), Collection:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterable]; - }), MutableCollection:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableIterable, _.kotlin.collections.Collection]; - }), List:Kotlin.createTrait(function() { - return[_.kotlin.collections.Collection]; - }), MutableList:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableCollection, _.kotlin.collections.List]; - }), Set:Kotlin.createTrait(function() { - return[_.kotlin.collections.Collection]; - }), MutableSet:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableCollection, _.kotlin.collections.Set]; - }), Map:Kotlin.createTrait(null, null, {Entry:Kotlin.createTrait(null)}), MutableMap:Kotlin.createTrait(function() { - return[_.kotlin.collections.Map]; - }, null, {MutableEntry:Kotlin.createTrait(function() { - return[_.kotlin.collections.Map.Entry]; - })}), Iterator:Kotlin.createTrait(null), MutableIterator:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterator]; - }), ListIterator:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterator]; - }), MutableListIterator:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableIterator, _.kotlin.collections.ListIterator]; - }), ByteIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextByte(); - }}), CharIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextChar(); - }}), ShortIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextShort(); - }}), IntIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextInt(); - }}), LongIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextLong(); - }}), FloatIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextFloat(); - }}), DoubleIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextDouble(); - }}), BooleanIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextBoolean(); - }})}), Function:Kotlin.createTrait(null), ranges:Kotlin.definePackage(null, {ClosedRange:Kotlin.createTrait(null, {contains_htax2k$:function(value) { - return Kotlin.compareTo(value, this.start) >= 0 && Kotlin.compareTo(value, this.endInclusive) <= 0; - }, isEmpty:function() { - return Kotlin.compareTo(this.start, this.endInclusive) > 0; - }})}), annotation:Kotlin.definePackage(null, {AnnotationTarget:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, ANNOTATION_CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FIELD:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, LOCAL_VARIABLE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, VALUE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, CONSTRUCTOR:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FUNCTION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_GETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_SETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, EXPRESSION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FILE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }}; - }), AnnotationRetention:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{SOURCE:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, BINARY:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, RUNTIME:function() { - return new _.kotlin.annotation.AnnotationRetention; - }}; - }), Target:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(allowedTargets) { - this.allowedTargets = allowedTargets; - }), Retention:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(value) { - if (value === void 0) { - value = _.kotlin.annotation.AnnotationRetention.RUNTIME; - } - this.value = value; - }), Repeatable:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), MustBeDocumented:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)})})}); - Kotlin.defineModule("builtins", _); -})(Kotlin); -(function(Kotlin) { - var _ = Kotlin.defineRootPackage(null, {kotlin:Kotlin.definePackage(null, {js:Kotlin.definePackage(null, {jsTypeOf_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.js.jsTypeOf_za3rmp$", function(a) { - return typeof a; - }), asDynamic_s8jyvl$:Kotlin.defineInlineFunction("stdlib.kotlin.js.asDynamic_s8jyvl$", function($receiver) { - return $receiver; - }), iterator_s8jyvl$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var r = $receiver; - if ($receiver["iterator"] != null) { - tmp$2 = $receiver["iterator"](); - } else { - if (Array.isArray(r)) { - tmp$2 = Kotlin.arrayIterator(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - } else { - tmp$2 = (Kotlin.isType(tmp$1 = r, Kotlin.modules["builtins"].kotlin.collections.Iterable) ? tmp$1 : Kotlin.throwCCE()).iterator(); - } - } - return tmp$2; - }, json_eoa9s7$:function(pairs) { - var tmp$1, tmp$2, tmp$3; - var res = {}; - tmp$1 = pairs, tmp$2 = tmp$1.length; - for (var tmp$3 = 0;tmp$3 !== tmp$2;++tmp$3) { - var tmp$0 = tmp$1[tmp$3], name = tmp$0.component1(), value = tmp$0.component2(); - res[name] = value; - } - return res; - }, internal:Kotlin.definePackage(null, {DoubleCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = Number.MIN_VALUE; - this.MAX_VALUE = Number.MAX_VALUE; - this.POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - this.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY; - this.NaN = Number.NaN; - }), FloatCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = Number.MIN_VALUE; - this.MAX_VALUE = Number.MAX_VALUE; - this.POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - this.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY; - this.NaN = Number.NaN; - }), IntCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = -2147483647 - 1; - this.MAX_VALUE = 2147483647; - }), LongCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = Kotlin.Long.MIN_VALUE; - this.MAX_VALUE = Kotlin.Long.MAX_VALUE; - }), ShortCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = -32768; - this.MAX_VALUE = 32767; - }), ByteCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = -128; - this.MAX_VALUE = 127; - }), CharCompanionObject:Kotlin.createObject(null, function() { - this.MIN_HIGH_SURROGATE = "\ud800"; - this.MAX_HIGH_SURROGATE = "\udbff"; - this.MIN_LOW_SURROGATE = "\udc00"; - this.MAX_LOW_SURROGATE = "\udfff"; - this.MIN_SURROGATE = this.MIN_HIGH_SURROGATE; - this.MAX_SURROGATE = this.MAX_LOW_SURROGATE; - }), StringCompanionObject:Kotlin.createObject(null, null), EnumCompanionObject:Kotlin.createObject(null, null)})}), jvm:Kotlin.definePackage(null, {JvmOverloads:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), JvmName:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(name) { - this.name = name; - }), JvmMultifileClass:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)}), text:Kotlin.definePackage(null, {isWhitespace_myv2d1$:function($receiver) { - var result = $receiver.toString().match("[\\s\\xA0]"); - return result != null && result.length > 0; - }, isHighSurrogate_myv2d1$:function($receiver) { - return(new Kotlin.CharRange(Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MIN_HIGH_SURROGATE, Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MAX_HIGH_SURROGATE)).contains_htax2k$($receiver); - }, isLowSurrogate_myv2d1$:function($receiver) { - return(new Kotlin.CharRange(Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MIN_LOW_SURROGATE, Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MAX_LOW_SURROGATE)).contains_htax2k$($receiver); - }, RegexOption:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun(value) { - $fun.baseInitializer.call(this); - this.value = value; - }, function() { - return{IGNORE_CASE:function() { - return new _.kotlin.text.RegexOption("i"); - }, MULTILINE:function() { - return new _.kotlin.text.RegexOption("m"); - }}; - }), MatchGroup:Kotlin.createClass(null, function(value) { - this.value = value; - }, {component1:function() { - return this.value; - }, copy_61zpoe$:function(value) { - return new _.kotlin.text.MatchGroup(value === void 0 ? this.value : value); - }, toString:function() { - return "MatchGroup(value\x3d" + Kotlin.toString(this.value) + ")"; - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.value) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.value, other.value))); - }}), Regex:Kotlin.createClass(null, function(pattern, options) { - this.pattern = pattern; - this.options = _.kotlin.collections.toSet_q5oq31$(options); - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault(options, 10)); - var tmp$0; - tmp$0 = options.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item.value); - } - this.nativePattern_ug9tz2$ = new RegExp(pattern, _.kotlin.collections.joinToString_ld60a2$(destination, "") + "g"); - }, {matches_6bul2c$:function(input) { - _.kotlin.text.js.reset_bckwes$(this.nativePattern_ug9tz2$); - var match = this.nativePattern_ug9tz2$.exec(input.toString()); - return match != null && (match.index === 0 && this.nativePattern_ug9tz2$.lastIndex === input.length); - }, containsMatchIn_6bul2c$:function(input) { - _.kotlin.text.js.reset_bckwes$(this.nativePattern_ug9tz2$); - return this.nativePattern_ug9tz2$.test(input.toString()); - }, hasMatch_6bul2c$:function(input) { - return this.containsMatchIn_6bul2c$(input); - }, find_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return _.kotlin.text.findNext(this.nativePattern_ug9tz2$, input.toString(), startIndex); - }, match_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return this.find_905azu$(input, startIndex); - }, findAll_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return _.kotlin.sequences.generateSequence_x7nywq$(_.kotlin.text.Regex.findAll_905azu$f(input, startIndex, this), _.kotlin.text.Regex.findAll_905azu$f_0); - }, matchAll_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return this.findAll_905azu$(input, startIndex); - }, matchEntire_6bul2c$:function(input) { - if (_.kotlin.text.startsWith_cjsvxq$(this.pattern, "^") && _.kotlin.text.endsWith_cjsvxq$(this.pattern, "$")) { - return this.find_905azu$(input); - } else { - return(new _.kotlin.text.Regex("^" + _.kotlin.text.trimEnd_1hgcu2$(_.kotlin.text.trimStart_1hgcu2$(this.pattern, ["^"]), ["$"]) + "$", this.options)).find_905azu$(input); - } - }, replace_x2uqeu$:function(input, replacement) { - return input.toString().replace(this.nativePattern_ug9tz2$, replacement); - }, replace_ftxfdg$:Kotlin.defineInlineFunction("stdlib.kotlin.text.Regex.replace_ftxfdg$", function(input, transform) { - var match = this.find_905azu$(input); - if (match == null) { - return input.toString(); - } - var lastStart = 0; - var length = input.length; - var sb = new Kotlin.StringBuilder; - do { - var foundMatch = match != null ? match : Kotlin.throwNPE(); - sb.append(input, lastStart, foundMatch.range.start); - sb.append(transform(foundMatch)); - lastStart = foundMatch.range.endInclusive + 1; - match = foundMatch.next(); - } while (lastStart < length && match != null); - if (lastStart < length) { - sb.append(input, lastStart, length); - } - return sb.toString(); - }), replaceFirst_x2uqeu$:function(input, replacement) { - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault(this.options, 10)); - var tmp$0; - tmp$0 = this.options.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item.value); - } - var nonGlobalOptions = _.kotlin.collections.joinToString_ld60a2$(destination, ""); - return input.toString().replace(new RegExp(this.pattern, nonGlobalOptions), replacement); - }, split_905azu$:function(input, limit) { - var matches; - var tmp$0; - if (limit === void 0) { - limit = 0; - } - if (!(limit >= 0)) { - var message = "Limit must be non-negative, but was " + limit; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var $receiver = this.findAll_905azu$(input); - matches = limit === 0 ? $receiver : _.kotlin.sequences.take_8xunab$($receiver, limit - 1); - var result = new Kotlin.ArrayList; - var lastStart = 0; - tmp$0 = matches.iterator(); - while (tmp$0.hasNext()) { - var match = tmp$0.next(); - result.add_za3rmp$(input.substring(lastStart, match.range.start).toString()); - lastStart = match.range.endInclusive + 1; - } - result.add_za3rmp$(input.substring(lastStart, input.length).toString()); - return result; - }, toString:function() { - return this.nativePattern_ug9tz2$.toString(); - }}, {findAll_905azu$f:function(closure$input, closure$startIndex, this$Regex) { - return function() { - return this$Regex.find_905azu$(closure$input, closure$startIndex); - }; - }, findAll_905azu$f_0:function(match) { - return match.next(); - }, Companion:Kotlin.createObject(null, function() { - _.kotlin.text.Regex.Companion.patternEscape_v9iwb0$ = new RegExp("[-\\\\^$*+?.()|[\\]{}]", "g"); - _.kotlin.text.Regex.Companion.replacementEscape_tq1d2u$ = new RegExp("\\$", "g"); - }, {fromLiteral_61zpoe$:function(literal) { - return _.kotlin.text.Regex_61zpoe$(_.kotlin.text.Regex.Companion.escape_61zpoe$(literal)); - }, escape_61zpoe$:function(literal) { - return literal.replace(_.kotlin.text.Regex.Companion.patternEscape_v9iwb0$, "\\$\x26"); - }, escapeReplacement_61zpoe$:function(literal) { - return literal.replace(_.kotlin.text.Regex.Companion.replacementEscape_tq1d2u$, "$$$$"); - }})}), Regex_sb3q2$:function(pattern, option) { - return new _.kotlin.text.Regex(pattern, _.kotlin.collections.setOf_za3rmp$(option)); - }, Regex_61zpoe$:function(pattern) { - return new _.kotlin.text.Regex(pattern, _.kotlin.collections.emptySet()); - }, findNext$f:Kotlin.createClass(function() { - return[_.kotlin.text.MatchResult]; - }, function(closure$match, this$findNext_0, closure$input_0, closure$range) { - this.closure$match_0 = closure$match; - this.this$findNext_0 = this$findNext_0; - this.closure$input_0 = closure$input_0; - this.closure$range_0 = closure$range; - this.$range_e5n1wm$ = closure$range; - this.$groups_7q1wp7$ = new _.kotlin.text.findNext$f.groups$f(closure$match); - this.groupValues__5s7w6t$ = null; - }, {range:{get:function() { - return this.$range_e5n1wm$; - }}, value:{get:function() { - var tmp$0; - return(tmp$0 = this.closure$match_0[0]) != null ? tmp$0 : Kotlin.throwNPE(); - }}, groups:{get:function() { - return this.$groups_7q1wp7$; - }}, groupValues:{get:function() { - var tmp$0; - if (this.groupValues__5s7w6t$ == null) { - this.groupValues__5s7w6t$ = new _.kotlin.text.findNext$f.f$f(this.closure$match_0); - } - return(tmp$0 = this.groupValues__5s7w6t$) != null ? tmp$0 : Kotlin.throwNPE(); - }}, next:function() { - return _.kotlin.text.findNext(this.this$findNext_0, this.closure$input_0, this.closure$range_0.isEmpty() ? this.closure$range_0.start + 1 : this.closure$range_0.endInclusive + 1); - }}, {f$f:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(closure$match_0) { - this.closure$match_0 = closure$match_0; - $fun.baseInitializer.call(this); - }, {size:{get:function() { - return this.closure$match_0.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - return(tmp$0 = this.closure$match_0[index]) != null ? tmp$0 : ""; - }}, {}), groups$f:Kotlin.createClass(function() { - return[_.kotlin.text.MatchGroupCollection]; - }, function(closure$match_0) { - this.closure$match_0 = closure$match_0; - }, {size:{get:function() { - return this.closure$match_0.length; - }}, isEmpty:function() { - return this.size === 0; - }, contains_za3rmp$:function(element) { - var tmp$0; - tmp$0 = this.iterator(); - while (tmp$0.hasNext()) { - var element_0 = tmp$0.next(); - if (Kotlin.equals(element_0, element)) { - return true; - } - } - return false; - }, containsAll_wtfk93$:function(elements) { - var tmp$0; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!this.contains_za3rmp$(element)) { - return false; - } - } - return true; - }, iterator:function() { - return _.kotlin.sequences.map_mzhnvn$(_.kotlin.collections.asSequence_q5oq31$(_.kotlin.collections.get_indices_mwto7b$(this)), _.kotlin.text.findNext$f.groups$f.iterator$f(this)).iterator(); - }, get_za3lpa$:function(index) { - var tmp$0; - return(tmp$0 = this.closure$match_0[index]) != null ? new _.kotlin.text.MatchGroup(tmp$0) : null; - }}, {iterator$f:function(this$) { - return function(it) { - return this$.get_za3lpa$(it); - }; - }})}), findNext:function($receiver, input, from) { - $receiver.lastIndex = from; - var match = $receiver.exec(input); - if (match == null) { - return null; - } - var range = new Kotlin.NumberRange(match.index, $receiver.lastIndex - 1); - return new _.kotlin.text.findNext$f(match, $receiver, input, range); - }, nativeIndexOf:function($receiver, ch, fromIndex) { - return $receiver.indexOf(ch.toString(), fromIndex); - }, nativeLastIndexOf:function($receiver, ch, fromIndex) { - return $receiver.lastIndexOf(ch.toString(), fromIndex); - }, startsWith_41xvrb$:function($receiver, prefix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase) { - return $receiver.startsWith(prefix, 0); - } else { - return _.kotlin.text.regionMatches_qb0ndp$($receiver, 0, prefix, 0, prefix.length, ignoreCase); - } - }, startsWith_rh6gah$:function($receiver, prefix, startIndex, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase) { - return $receiver.startsWith(prefix, startIndex); - } else { - return _.kotlin.text.regionMatches_qb0ndp$($receiver, startIndex, prefix, 0, prefix.length, ignoreCase); - } - }, endsWith_41xvrb$:function($receiver, suffix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase) { - return $receiver.endsWith(suffix); - } else { - return _.kotlin.text.regionMatches_qb0ndp$($receiver, $receiver.length - suffix.length, suffix, 0, suffix.length, ignoreCase); - } - }, matches_94jgcu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.matches_94jgcu$", function($receiver, regex) { - var result = $receiver.match(regex); - return result != null && result.length > 0; - }), isBlank_gw00vq$:function($receiver) { - var tmp$0 = $receiver.length === 0; - if (!tmp$0) { - var result = (typeof $receiver === "string" ? $receiver : $receiver.toString()).match("^[\\s\\xA0]+$"); - tmp$0 = result != null && result.length > 0; - } - return tmp$0; - }, equals_41xvrb$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver == null ? other == null : !ignoreCase ? Kotlin.equals($receiver, other) : other != null && Kotlin.equals($receiver.toLowerCase(), other.toLowerCase()); - }, regionMatches_qb0ndp$:function($receiver, thisOffset, other, otherOffset, length, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.regionMatchesImpl($receiver, thisOffset, other, otherOffset, length, ignoreCase); - }, capitalize_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.capitalize_pdl1w0$", function($receiver) { - return $receiver.length > 0 ? $receiver.substring(0, 1).toUpperCase() + $receiver.substring(1) : $receiver; - }), decapitalize_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.decapitalize_pdl1w0$", function($receiver) { - return $receiver.length > 0 ? $receiver.substring(0, 1).toLowerCase() + $receiver.substring(1) : $receiver; - }), repeat_kljjvw$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Count 'n' must be non-negative, but was " + n + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - tmp$0 = ""; - } else { - if (n === 1) { - tmp$0 = $receiver.toString(); - } else { - var result = ""; - if (!($receiver.length === 0)) { - var s = $receiver.toString(); - var count = n; - while (true) { - if ((count & 1) === 1) { - result += s; - } - count = count >>> 1; - if (count === 0) { - break; - } - s += s; - } - } - return result; - } - } - return tmp$0; - }, replace_dn5w6f$:function($receiver, oldValue, newValue, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldValue), ignoreCase ? "gi" : "g"), _.kotlin.text.Regex.Companion.escapeReplacement_61zpoe$(newValue)); - }, replace_bt3k83$:function($receiver, oldChar, newChar, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldChar.toString()), ignoreCase ? "gi" : "g"), newChar.toString()); - }, replaceFirstLiteral_dn5w6f$:function($receiver, oldValue, newValue, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldValue), ignoreCase ? "i" : ""), _.kotlin.text.Regex.Companion.escapeReplacement_61zpoe$(newValue)); - }, replaceFirst_dn5w6f$:function($receiver, oldValue, newValue, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldValue), ignoreCase ? "i" : ""), _.kotlin.text.Regex.Companion.escapeReplacement_61zpoe$(newValue)); - }, replaceFirst_bt3k83$:function($receiver, oldChar, newChar, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldChar.toString()), ignoreCase ? "i" : ""), newChar.toString()); - }, elementAt_kljjvw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.elementAt_kljjvw$", function($receiver, index) { - return $receiver.charAt(index); - }), elementAtOrElse_a9lqqp$:Kotlin.defineInlineFunction("stdlib.kotlin.text.elementAtOrElse_a9lqqp$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.text.get_lastIndex_gw00vq$($receiver) ? $receiver.charAt(index) : defaultValue(index); - }), elementAtOrNull_kljjvw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.elementAtOrNull_kljjvw$", function($receiver, index) { - return _.kotlin.text.getOrNull_kljjvw$($receiver, index); - }), find_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.find_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.findLast_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.charAt(index); - if (predicate(element)) { - return element; - } - } - return null; - }), first_gw00vq$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Char sequence is empty."); - } - return $receiver.charAt(0); - }, first_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.first_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Char sequence contains no character matching the predicate."); - }), firstOrNull_gw00vq$:function($receiver) { - return $receiver.length === 0 ? null : $receiver.charAt(0); - }, firstOrNull_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.firstOrNull_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), getOrElse_a9lqqp$:Kotlin.defineInlineFunction("stdlib.kotlin.text.getOrElse_a9lqqp$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.text.get_lastIndex_gw00vq$($receiver) ? $receiver.charAt(index) : defaultValue(index); - }), getOrNull_kljjvw$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.text.get_lastIndex_gw00vq$($receiver) ? $receiver.charAt(index) : null; - }, indexOfFirst_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.indexOfFirst_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver.charAt(index))) { - return index; - } - } - return-1; - }), indexOfLast_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.indexOfLast_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver.charAt(index))) { - return index; - } - } - return-1; - }), last_gw00vq$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Char sequence is empty."); - } - return $receiver.charAt(_.kotlin.text.get_lastIndex_gw00vq$($receiver)); - }, last_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.last_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.charAt(index); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Char sequence contains no character matching the predicate."); - }), lastOrNull_gw00vq$:function($receiver) { - return $receiver.length === 0 ? null : $receiver.charAt($receiver.length - 1); - }, lastOrNull_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.lastOrNull_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.charAt(index); - if (predicate(element)) { - return element; - } - } - return null; - }), single_gw00vq$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Char sequence is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver.charAt(0); - } else { - throw new Kotlin.IllegalArgumentException("Char sequence has more than one element."); - } - } - return tmp$1; - }, single_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.single_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Char sequence contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Char sequence contains no character matching the predicate."); - } - return Kotlin.isChar(tmp$1 = single) ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_gw00vq$:function($receiver) { - return $receiver.length === 1 ? $receiver.charAt(0) : null; - }, singleOrNull_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.singleOrNull_gwcya$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(_.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length), $receiver.length); - }, drop_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(_.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length)); - }, dropLast_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.text.take_kljjvw$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.text.take_n7iutu$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLastWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropLastWhile_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index + 1); - } - } - return ""; - }), dropLastWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropLastWhile_ggikb8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index + 1); - } - } - return ""; - }), dropWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropWhile_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }), dropWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropWhile_ggikb8$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index); - } - } - return ""; - }), filter_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filter_gwcya$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - var element = $receiver.charAt(index); - if (predicate(element)) { - destination.append(element); - } - } - return destination; - }), filter_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filter_ggikb8$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - var element = $receiver.charAt(index); - if (predicate(element)) { - destination.append(element); - } - } - return destination.toString(); - }), filterIndexed_ig59fr$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterIndexed_ig59fr$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.append(item); - } - } - return destination; - }), filterIndexed_kq57hd$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterIndexed_kq57hd$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.append(item); - } - } - return destination.toString(); - }), filterIndexedTo_ulxqbb$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterIndexedTo_ulxqbb$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.append(item); - } - } - return destination; - }), filterNot_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterNot_gwcya$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.append(element); - } - } - return destination; - }), filterNot_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterNot_ggikb8$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.append(element); - } - } - return destination.toString(); - }), filterNotTo_ppzoqm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterNotTo_ppzoqm$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.append(element); - } - } - return destination; - }), filterTo_ppzoqm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterTo_ppzoqm$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - var element = $receiver.charAt(index); - if (predicate(element)) { - destination.append(element); - } - } - return destination; - }), slice_2g2kgt$:function($receiver, indices) { - if (indices.isEmpty()) { - return ""; - } - return _.kotlin.text.subSequence_2g2kgt$($receiver, indices); - }, slice_590b93$:function($receiver, indices) { - if (indices.isEmpty()) { - return ""; - } - return _.kotlin.text.substring_590b93$($receiver, indices); - }, slice_8iyt66$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return ""; - } - var result = new Kotlin.StringBuilder; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var i = tmp$0.next(); - result.append($receiver.charAt(i)); - } - return result; - }, slice_fxv5mg$:Kotlin.defineInlineFunction("stdlib.kotlin.text.slice_fxv5mg$", function($receiver, indices) { - var tmp$0; - return _.kotlin.text.slice_8iyt66$($receiver, indices).toString(); - }), take_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(0, _.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length)); - }, take_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(0, _.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length)); - }, takeLast_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var length = $receiver.length; - return $receiver.substring(length - _.kotlin.ranges.coerceAtMost_rksjo2$(n, length), length); - }, takeLast_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var length = $receiver.length; - return $receiver.substring(length - _.kotlin.ranges.coerceAtMost_rksjo2$(n, length)); - }, takeLastWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeLastWhile_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.text.get_lastIndex_gw00vq$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index + 1, $receiver.length); - } - } - return $receiver.substring(0, $receiver.length); - }), takeLastWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeLastWhile_ggikb8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.text.get_lastIndex_gw00vq$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index + 1); - } - } - return $receiver; - }), takeWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeWhile_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index); - } - } - return $receiver.substring(0, $receiver.length); - }), takeWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeWhile_ggikb8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index); - } - } - return $receiver; - }), reversed_gw00vq$:function($receiver) { - return(new Kotlin.StringBuilder($receiver.toString())).reverse(); - }, reversed_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reversed_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.reversed_gw00vq$($receiver).toString(); - }), associate_1p4vo8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associate_1p4vo8$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateBy_g3n5bm$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_27fiyi$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateBy_27fiyi$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_cggu5g$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateByTo_cggu5g$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_bo8xay$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateByTo_bo8xay$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_vkk1fc$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateTo_vkk1fc$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_7095o1$:function($receiver, destination) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_gw00vq$:function($receiver) { - return _.kotlin.text.toCollection_7095o1$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toList_gw00vq$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver.charAt(0)); - } else { - tmp$1 = _.kotlin.text.toMutableList_gw00vq$($receiver); - } - } - return tmp$1; - }, toMutableList_gw00vq$:function($receiver) { - return _.kotlin.text.toCollection_7095o1$($receiver, new Kotlin.ArrayList($receiver.length)); - }, toSet_gw00vq$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver.charAt(0)); - } else { - tmp$1 = _.kotlin.text.toCollection_7095o1$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, flatMap_1mpcl3$:Kotlin.defineInlineFunction("stdlib.kotlin.text.flatMap_1mpcl3$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_qq0qxe$:Kotlin.defineInlineFunction("stdlib.kotlin.text.flatMapTo_qq0qxe$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), groupBy_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupBy_g3n5bm$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_27fiyi$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupBy_27fiyi$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_j5rwb5$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupByTo_j5rwb5$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_eemzmj$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupByTo_eemzmj$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.map_g3n5bm$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapIndexed_psxq2r$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexed_psxq2r$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedNotNull_psxq2r$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexedNotNull_psxq2r$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedNotNullTo_rct1as$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexedNotNullTo_rct1as$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedTo_rct1as$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexedTo_rct1as$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapNotNull_g3n5bm$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapNotNullTo_4sukax$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapNotNullTo_4sukax$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_4sukax$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapTo_4sukax$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_gw00vq$f:function(this$withIndex) { - return function() { - return _.kotlin.text.iterator_gw00vq$(this$withIndex); - }; - }, withIndex_gw00vq$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.text.withIndex_gw00vq$f($receiver)); - }, all_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.all_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_gw00vq$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.any_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.count_gw00vq$", function($receiver) { - return $receiver.length; - }), count_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.count_gwcya$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_u4nbyf$:Kotlin.defineInlineFunction("stdlib.kotlin.text.fold_u4nbyf$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_hj7gsc$:Kotlin.defineInlineFunction("stdlib.kotlin.text.foldIndexed_hj7gsc$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldRight_dr5uf3$:Kotlin.defineInlineFunction("stdlib.kotlin.text.foldRight_dr5uf3$", function($receiver, initial, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver.charAt(index--), accumulator); - } - return accumulator; - }), foldRightIndexed_qclpl6$:Kotlin.defineInlineFunction("stdlib.kotlin.text.foldRightIndexed_qclpl6$", function($receiver, initial, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver.charAt(index), accumulator); - --index; - } - return accumulator; - }), forEach_1m5ltu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.forEach_1m5ltu$", function($receiver, action) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_ivsfzd$:Kotlin.defineInlineFunction("stdlib.kotlin.text.forEachIndexed_ivsfzd$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_gw00vq$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (max < e) { - max = e; - } - } - return max; - }, maxBy_eowu5k$:Kotlin.defineInlineFunction("stdlib.kotlin.text.maxBy_eowu5k$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver.charAt(0); - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_ho1wg9$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_gw00vq$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (min > e) { - min = e; - } - } - return min; - }, minBy_eowu5k$:Kotlin.defineInlineFunction("stdlib.kotlin.text.minBy_eowu5k$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver.charAt(0); - var minValue = selector(minElem); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_ho1wg9$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_gw00vq$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.none_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_jbdc00$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduce_jbdc00$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver.charAt(index)); - } - return accumulator; - }), reduceIndexed_dv672j$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduceIndexed_dv672j$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver.charAt(index)); - } - return accumulator; - }), reduceRight_jbdc00$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduceRight_jbdc00$", function($receiver, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(index--); - while (index >= 0) { - accumulator = operation($receiver.charAt(index--), accumulator); - } - return accumulator; - }), reduceRightIndexed_dv672j$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduceRightIndexed_dv672j$", function($receiver, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(index--); - while (index >= 0) { - accumulator = operation(index, $receiver.charAt(index), accumulator); - --index; - } - return accumulator; - }), sumBy_g3i1jp$:Kotlin.defineInlineFunction("stdlib.kotlin.text.sumBy_g3i1jp$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_pj8hgv$:Kotlin.defineInlineFunction("stdlib.kotlin.text.sumByDouble_pj8hgv$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), partition_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.partition_gwcya$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.StringBuilder; - var second = new Kotlin.StringBuilder; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.append(element); - } else { - second.append(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.partition_ggikb8$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.StringBuilder; - var second = new Kotlin.StringBuilder; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.append(element); - } else { - second.append(element); - } - } - return new _.kotlin.Pair(first.toString(), second.toString()); - }), zip_4ewbza$:function($receiver, other) { - var tmp$0; - var length = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(length); - tmp$0 = length - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver.charAt(i), other.charAt(i))); - } - return list; - }, zip_3n5ypu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.zip_3n5ypu$", function($receiver, other, transform) { - var tmp$0; - var length = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(length); - tmp$0 = length - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver.charAt(i), other.charAt(i))); - } - return list; - }), asIterable_gw00vq$f:function(this$asIterable) { - return function() { - return _.kotlin.text.iterator_gw00vq$(this$asIterable); - }; - }, asIterable_gw00vq$:function($receiver) { - var tmp$0 = typeof $receiver === "string"; - if (tmp$0) { - tmp$0 = $receiver.length === 0; - } - if (tmp$0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.text.asIterable_gw00vq$f($receiver)); - }, asSequence_gw00vq$f:function(this$asSequence) { - return function() { - return _.kotlin.text.iterator_gw00vq$(this$asSequence); - }; - }, asSequence_gw00vq$:function($receiver) { - var tmp$0 = typeof $receiver === "string"; - if (tmp$0) { - tmp$0 = $receiver.length === 0; - } - if (tmp$0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.text.asSequence_gw00vq$f($receiver)); - }, plus_68uai5$:Kotlin.defineInlineFunction("stdlib.kotlin.text.plus_68uai5$", function($receiver, other) { - return $receiver.toString() + other; - }), equals_bapbyp$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if ($receiver === other) { - return true; - } - if (!ignoreCase) { - return false; - } - if ($receiver.toUpperCase() === other.toUpperCase()) { - return true; - } - if ($receiver.toLowerCase() === other.toLowerCase()) { - return true; - } - return false; - }, isSurrogate_myv2d1$:function($receiver) { - return(new Kotlin.CharRange(Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MIN_SURROGATE, Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MAX_SURROGATE)).contains_htax2k$($receiver); - }, trimMargin_94jgcu$:function($receiver, marginPrefix) { - if (marginPrefix === void 0) { - marginPrefix = "|"; - } - return _.kotlin.text.replaceIndentByMargin_ex0kps$($receiver, "", marginPrefix); - }, replaceIndentByMargin_ex0kps$:function($receiver, newIndent, marginPrefix) { - if (newIndent === void 0) { - newIndent = ""; - } - if (marginPrefix === void 0) { - marginPrefix = "|"; - } - if (!!_.kotlin.text.isBlank_gw00vq$(marginPrefix)) { - var message = "marginPrefix must be non-blank string."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var lines = _.kotlin.text.lines_gw00vq$($receiver); - var resultSizeEstimate = $receiver.length + newIndent.length * lines.size; - var indentAddFunction = _.kotlin.text.getIndentFunction(newIndent); - var lastIndex = _.kotlin.collections.get_lastIndex_a7ptmv$(lines); - var destination = new Kotlin.ArrayList; - var tmp$2; - var index = 0; - tmp$2 = lines.iterator(); - while (tmp$2.hasNext()) { - var item = tmp$2.next(); - var tmp$1; - var index_0 = index++; - var tmp$4, tmp$3; - var tmp$0; - if ((index_0 === 0 || index_0 === lastIndex) && _.kotlin.text.isBlank_gw00vq$(item)) { - tmp$0 = null; - } else { - var replaceIndentByMargin_ex0kps$f_0$result; - var firstNonWhitespaceIndex; - indexOfFirst_gwcya$break: { - var tmp$8, tmp$5, tmp$6, tmp$7; - tmp$8 = _.kotlin.text.get_indices_gw00vq$(item), tmp$5 = tmp$8.first, tmp$6 = tmp$8.last, tmp$7 = tmp$8.step; - for (var index_1 = tmp$5;index_1 <= tmp$6;index_1 += tmp$7) { - if (!_.kotlin.text.isWhitespace_myv2d1$(item.charAt(index_1))) { - firstNonWhitespaceIndex = index_1; - break indexOfFirst_gwcya$break; - } - } - firstNonWhitespaceIndex = -1; - } - if (firstNonWhitespaceIndex === -1) { - replaceIndentByMargin_ex0kps$f_0$result = null; - } else { - if (_.kotlin.text.startsWith_rh6gah$(item, marginPrefix, firstNonWhitespaceIndex)) { - replaceIndentByMargin_ex0kps$f_0$result = item.substring(firstNonWhitespaceIndex + marginPrefix.length); - } else { - replaceIndentByMargin_ex0kps$f_0$result = null; - } - } - tmp$0 = (tmp$3 = (tmp$4 = replaceIndentByMargin_ex0kps$f_0$result) != null ? indentAddFunction(tmp$4) : null) != null ? tmp$3 : item; - } - (tmp$1 = tmp$0) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return _.kotlin.collections.joinTo_euycuk$(destination, new Kotlin.StringBuilder, "\n").toString(); - }, trimIndent_pdl1w0$:function($receiver) { - return _.kotlin.text.replaceIndent_94jgcu$($receiver, ""); - }, replaceIndent_94jgcu$:function($receiver, newIndent) { - var tmp$0; - if (newIndent === void 0) { - newIndent = ""; - } - var lines = _.kotlin.text.lines_gw00vq$($receiver); - var destination = new Kotlin.ArrayList; - var tmp$1; - tmp$1 = lines.iterator(); - while (tmp$1.hasNext()) { - var element = tmp$1.next(); - if (!_.kotlin.text.isBlank_gw00vq$(element)) { - destination.add_za3rmp$(element); - } - } - var destination_0 = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault(destination, 10)); - var tmp$2; - tmp$2 = destination.iterator(); - while (tmp$2.hasNext()) { - var item = tmp$2.next(); - destination_0.add_za3rmp$(_.kotlin.text.indentWidth(item)); - } - var minCommonIndent = (tmp$0 = _.kotlin.collections.min_349qs3$(destination_0)) != null ? tmp$0 : 0; - var resultSizeEstimate = $receiver.length + newIndent.length * lines.size; - var indentAddFunction = _.kotlin.text.getIndentFunction(newIndent); - var lastIndex = _.kotlin.collections.get_lastIndex_a7ptmv$(lines); - var destination_1 = new Kotlin.ArrayList; - var tmp$4; - var index = 0; - tmp$4 = lines.iterator(); - while (tmp$4.hasNext()) { - var item_0 = tmp$4.next(); - var tmp$3; - var index_0 = index++; - var tmp$6, tmp$5; - (tmp$3 = (index_0 === 0 || index_0 === lastIndex) && _.kotlin.text.isBlank_gw00vq$(item_0) ? null : (tmp$5 = (tmp$6 = _.kotlin.text.drop_n7iutu$(item_0, minCommonIndent)) != null ? indentAddFunction(tmp$6) : null) != null ? tmp$5 : item_0) != null ? destination_1.add_za3rmp$(tmp$3) : null; - } - return _.kotlin.collections.joinTo_euycuk$(destination_1, new Kotlin.StringBuilder, "\n").toString(); - }, prependIndent_94jgcu$f:function(closure$indent) { - return function(it) { - if (_.kotlin.text.isBlank_gw00vq$(it)) { - if (it.length < closure$indent.length) { - return closure$indent; - } else { - return it; - } - } else { - return closure$indent + it; - } - }; - }, prependIndent_94jgcu$:function($receiver, indent) { - if (indent === void 0) { - indent = " "; - } - return _.kotlin.sequences.joinToString_mbzd5w$(_.kotlin.sequences.map_mzhnvn$(_.kotlin.text.lineSequence_gw00vq$($receiver), _.kotlin.text.prependIndent_94jgcu$f(indent)), "\n"); - }, indentWidth:function($receiver) { - var indexOfFirst_gwcya$result; - indexOfFirst_gwcya$break: { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index))) { - indexOfFirst_gwcya$result = index; - break indexOfFirst_gwcya$break; - } - } - indexOfFirst_gwcya$result = -1; - } - return indexOfFirst_gwcya$result === -1 ? $receiver.length : indexOfFirst_gwcya$result; - }, getIndentFunction$f:function(line) { - return line; - }, getIndentFunction$f_0:function(closure$indent) { - return function(line) { - return closure$indent + line; - }; - }, getIndentFunction:function(indent) { - if (indent.length === 0) { - return _.kotlin.text.getIndentFunction$f; - } else { - return _.kotlin.text.getIndentFunction$f_0(indent); - } - }, reindent:function($receiver, resultSizeEstimate, indentAddFunction, indentCutFunction) { - var lastIndex = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - var destination = new Kotlin.ArrayList; - var tmp$2; - var index = 0; - tmp$2 = $receiver.iterator(); - while (tmp$2.hasNext()) { - var item = tmp$2.next(); - var tmp$1; - var index_0 = index++; - var tmp$4, tmp$3; - (tmp$1 = (index_0 === 0 || index_0 === lastIndex) && _.kotlin.text.isBlank_gw00vq$(item) ? null : (tmp$3 = (tmp$4 = indentCutFunction(item)) != null ? indentAddFunction(tmp$4) : null) != null ? tmp$3 : item) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return _.kotlin.collections.joinTo_euycuk$(destination, new Kotlin.StringBuilder, "\n").toString(); - }, buildString_bb10bd$:Kotlin.defineInlineFunction("stdlib.kotlin.text.buildString_bb10bd$", function(builderAction) { - var $receiver = new Kotlin.StringBuilder; - builderAction.call($receiver); - return $receiver.toString(); - }), append_rjuq1o$:function($receiver, value) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = value, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - $receiver.append(item); - } - return $receiver; - }, append_7lvk3c$:function($receiver, value) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = value, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - $receiver.append(item); - } - return $receiver; - }, append_j3ibnd$:function($receiver, value) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = value, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - $receiver.append(item); - } - return $receiver; - }, trim_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trim_gwcya$", function($receiver, predicate) { - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = predicate($receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1); - }), trim_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trim_ggikb8$", function($receiver, predicate) { - var tmp$0; - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = predicate($receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1).toString(); - }), trimStart_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimStart_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }), trimStart_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimStart_ggikb8$", function($receiver, predicate) { - var tmp$0; - var trimStart_gwcya$result; - trimStart_gwcya$break: { - var tmp$4, tmp$1, tmp$2, tmp$3; - tmp$4 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$4.first, tmp$2 = tmp$4.last, tmp$3 = tmp$4.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - trimStart_gwcya$result = $receiver.substring(index, $receiver.length); - break trimStart_gwcya$break; - } - } - trimStart_gwcya$result = ""; - } - return trimStart_gwcya$result.toString(); - }), trimEnd_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimEnd_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index + 1).toString(); - } - } - return ""; - }), trimEnd_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimEnd_ggikb8$", function($receiver, predicate) { - var tmp$0; - var trimEnd_gwcya$result; - trimEnd_gwcya$break: { - var tmp$1; - tmp$1 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - if (!predicate($receiver.charAt(index))) { - trimEnd_gwcya$result = $receiver.substring(0, index + 1).toString(); - break trimEnd_gwcya$break; - } - } - trimEnd_gwcya$result = ""; - } - return trimEnd_gwcya$result.toString(); - }), trim_g0p4tc$:function($receiver, chars) { - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = _.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1); - }, trim_1hgcu2$:function($receiver, chars) { - var tmp$0; - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = _.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1).toString(); - }, trimStart_g0p4tc$:function($receiver, chars) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }, trimStart_1hgcu2$:function($receiver, chars) { - var tmp$0; - var trimStart_gwcya$result; - trimStart_gwcya$break: { - var tmp$4, tmp$1, tmp$2, tmp$3; - tmp$4 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$4.first, tmp$2 = tmp$4.last, tmp$3 = tmp$4.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - trimStart_gwcya$result = $receiver.substring(index, $receiver.length); - break trimStart_gwcya$break; - } - } - trimStart_gwcya$result = ""; - } - return trimStart_gwcya$result.toString(); - }, trimEnd_g0p4tc$:function($receiver, chars) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - return $receiver.substring(0, index + 1).toString(); - } - } - return ""; - }, trimEnd_1hgcu2$:function($receiver, chars) { - var tmp$0; - var trimEnd_gwcya$result; - trimEnd_gwcya$break: { - var tmp$1; - tmp$1 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - trimEnd_gwcya$result = $receiver.substring(0, index + 1).toString(); - break trimEnd_gwcya$break; - } - } - trimEnd_gwcya$result = ""; - } - return trimEnd_gwcya$result.toString(); - }, trim_gw00vq$:function($receiver) { - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = _.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1); - }, trim_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trim_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.trim_gw00vq$($receiver).toString(); - }), trimStart_gw00vq$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }, trimStart_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimStart_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.trimStart_gw00vq$($receiver).toString(); - }), trimEnd_gw00vq$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!_.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index))) { - return $receiver.substring(0, index + 1).toString(); - } - } - return ""; - }, trimEnd_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimEnd_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.trimEnd_gw00vq$($receiver).toString(); - }), padStart_dz660z$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - if (length < 0) { - throw new Kotlin.IllegalArgumentException("Desired length " + length + " is less than zero."); - } - if (length <= $receiver.length) { - return $receiver.substring(0, $receiver.length); - } - var sb = new Kotlin.StringBuilder; - tmp$0 = length - $receiver.length; - for (var i = 1;i <= tmp$0;i++) { - sb.append(padChar); - } - sb.append($receiver); - return sb; - }, padStart_b68f8p$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - return _.kotlin.text.padStart_dz660z$($receiver, length, padChar).toString(); - }, padEnd_dz660z$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - if (length < 0) { - throw new Kotlin.IllegalArgumentException("Desired length " + length + " is less than zero."); - } - if (length <= $receiver.length) { - return $receiver.substring(0, $receiver.length); - } - var sb = new Kotlin.StringBuilder; - sb.append($receiver); - tmp$0 = length - $receiver.length; - for (var i = 1;i <= tmp$0;i++) { - sb.append(padChar); - } - return sb; - }, padEnd_b68f8p$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - return _.kotlin.text.padEnd_dz660z$($receiver, length, padChar).toString(); - }, isNullOrEmpty_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNullOrEmpty_gw00vq$", function($receiver) { - return $receiver == null || $receiver.length === 0; - }), isEmpty_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isEmpty_gw00vq$", function($receiver) { - return $receiver.length === 0; - }), isNotEmpty_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNotEmpty_gw00vq$", function($receiver) { - return $receiver.length > 0; - }), isNotBlank_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNotBlank_gw00vq$", function($receiver) { - return!_.kotlin.text.isBlank_gw00vq$($receiver); - }), isNullOrBlank_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNullOrBlank_gw00vq$", function($receiver) { - return $receiver == null || _.kotlin.text.isBlank_gw00vq$($receiver); - }), iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.CharIterator]; - }, function $fun(this$iterator_0) { - this.this$iterator_0 = this$iterator_0; - $fun.baseInitializer.call(this); - this.index_1xj8pz$ = 0; - }, {nextChar:function() { - return this.this$iterator_0.charAt(this.index_1xj8pz$++); - }, hasNext:function() { - return this.index_1xj8pz$ < this.this$iterator_0.length; - }}, {}), iterator_gw00vq$:function($receiver) { - return new _.kotlin.text.iterator$f($receiver); - }, orEmpty_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.orEmpty_pdl1w0$", function($receiver) { - return $receiver != null ? $receiver : ""; - }), get_indices_gw00vq$:{value:function($receiver) { - return new Kotlin.NumberRange(0, $receiver.length - 1); - }}, get_lastIndex_gw00vq$:{value:function($receiver) { - return $receiver.length - 1; - }}, hasSurrogatePairAt_kljjvw$:function($receiver, index) { - return(new Kotlin.NumberRange(0, $receiver.length - 2)).contains_htax2k$(index) && (_.kotlin.text.isHighSurrogate_myv2d1$($receiver.charAt(index)) && _.kotlin.text.isLowSurrogate_myv2d1$($receiver.charAt(index + 1))); - }, substring_590b93$:function($receiver, range) { - return $receiver.substring(range.start, range.endInclusive + 1); - }, subSequence_2g2kgt$:function($receiver, range) { - return $receiver.substring(range.start, range.endInclusive + 1); - }, subSequence_78fvzw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.subSequence_78fvzw$", function($receiver, start, end) { - return $receiver.substring(start, end); - }), substring_7bp3tu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.substring_7bp3tu$", function($receiver, startIndex, endIndex) { - if (endIndex === void 0) { - endIndex = $receiver.length; - } - return $receiver.substring(startIndex, endIndex).toString(); - }), substring_2g2kgt$:function($receiver, range) { - return $receiver.substring(range.start, range.endInclusive + 1).toString(); - }, substringBefore_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringBefore_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringAfter_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + 1, $receiver.length); - }, substringAfter_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + delimiter.length, $receiver.length); - }, substringBeforeLast_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringBeforeLast_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringAfterLast_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + 1, $receiver.length); - }, substringAfterLast_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + delimiter.length, $receiver.length); - }, replaceRange_r7eg9y$:function($receiver, startIndex, endIndex, replacement) { - if (endIndex < startIndex) { - throw new Kotlin.IndexOutOfBoundsException("End index (" + endIndex + ") is less than start index (" + startIndex + ")."); - } - var sb = new Kotlin.StringBuilder; - sb.append($receiver, 0, startIndex); - sb.append(replacement); - sb.append($receiver, endIndex, $receiver.length); - return sb; - }, replaceRange_tb247g$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replaceRange_tb247g$", function($receiver, startIndex, endIndex, replacement) { - var tmp$0; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, startIndex, endIndex, replacement).toString(); - }), replaceRange_jrbvad$:function($receiver, range, replacement) { - return _.kotlin.text.replaceRange_r7eg9y$($receiver, range.start, range.endInclusive + 1, replacement); - }, replaceRange_dvlf5r$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replaceRange_dvlf5r$", function($receiver, range, replacement) { - var tmp$0; - return _.kotlin.text.replaceRange_jrbvad$($receiver, range, replacement).toString(); - }), removeRange_7bp3tu$:function($receiver, startIndex, endIndex) { - if (endIndex < startIndex) { - throw new Kotlin.IndexOutOfBoundsException("End index (" + endIndex + ") is less than start index (" + startIndex + ")."); - } - if (endIndex === startIndex) { - return $receiver.substring(0, $receiver.length); - } - var capacity = $receiver.length - (endIndex - startIndex); - var sb = new Kotlin.StringBuilder; - sb.append($receiver, 0, startIndex); - sb.append($receiver, endIndex, $receiver.length); - return sb; - }, removeRange_78fvzw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.removeRange_78fvzw$", function($receiver, startIndex, endIndex) { - var tmp$0; - return _.kotlin.text.removeRange_7bp3tu$($receiver, startIndex, endIndex).toString(); - }), removeRange_2g2kgt$:function($receiver, range) { - return _.kotlin.text.removeRange_7bp3tu$($receiver, range.start, range.endInclusive + 1); - }, removeRange_590b93$:Kotlin.defineInlineFunction("stdlib.kotlin.text.removeRange_590b93$", function($receiver, range) { - var tmp$0; - return _.kotlin.text.removeRange_2g2kgt$($receiver, range).toString(); - }), removePrefix_4ewbza$:function($receiver, prefix) { - if (_.kotlin.text.startsWith_kzp0od$($receiver, prefix)) { - return $receiver.substring(prefix.length, $receiver.length); - } - return $receiver.substring(0, $receiver.length); - }, removePrefix_a14n4c$:function($receiver, prefix) { - if (_.kotlin.text.startsWith_kzp0od$($receiver, prefix)) { - return $receiver.substring(prefix.length); - } - return $receiver; - }, removeSuffix_4ewbza$:function($receiver, suffix) { - if (_.kotlin.text.endsWith_kzp0od$($receiver, suffix)) { - return $receiver.substring(0, $receiver.length - suffix.length); - } - return $receiver.substring(0, $receiver.length); - }, removeSuffix_a14n4c$:function($receiver, suffix) { - if (_.kotlin.text.endsWith_kzp0od$($receiver, suffix)) { - return $receiver.substring(0, $receiver.length - suffix.length); - } - return $receiver; - }, removeSurrounding_9b5scy$:function($receiver, prefix, suffix) { - if ($receiver.length >= prefix.length + suffix.length && (_.kotlin.text.startsWith_kzp0od$($receiver, prefix) && _.kotlin.text.endsWith_kzp0od$($receiver, suffix))) { - return $receiver.substring(prefix.length, $receiver.length - suffix.length); - } - return $receiver.substring(0, $receiver.length); - }, removeSurrounding_f5o6fo$:function($receiver, prefix, suffix) { - if ($receiver.length >= prefix.length + suffix.length && (_.kotlin.text.startsWith_kzp0od$($receiver, prefix) && _.kotlin.text.endsWith_kzp0od$($receiver, suffix))) { - return $receiver.substring(prefix.length, $receiver.length - suffix.length); - } - return $receiver; - }, removeSurrounding_4ewbza$:function($receiver, delimiter) { - return _.kotlin.text.removeSurrounding_9b5scy$($receiver, delimiter, delimiter); - }, removeSurrounding_a14n4c$:function($receiver, delimiter) { - return _.kotlin.text.removeSurrounding_f5o6fo$($receiver, delimiter, delimiter); - }, replaceBefore_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replaceBefore_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replaceAfter_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + 1, $receiver.length, replacement).toString(); - } - }, replaceAfter_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + delimiter.length, $receiver.length, replacement).toString(); - } - }, replaceAfterLast_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + delimiter.length, $receiver.length, replacement).toString(); - } - }, replaceAfterLast_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + 1, $receiver.length, replacement).toString(); - } - }, replaceBeforeLast_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replaceBeforeLast_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replace_8h3bgl$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replace_8h3bgl$", function($receiver, regex, replacement) { - return regex.replace_x2uqeu$($receiver, replacement); - }), replace_c95is1$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replace_c95is1$", function($receiver, regex, transform) { - var match = regex.find_905azu$($receiver); - if (match == null) { - return $receiver.toString(); - } - var lastStart = 0; - var length = $receiver.length; - var sb = new Kotlin.StringBuilder; - do { - var foundMatch = match != null ? match : Kotlin.throwNPE(); - sb.append($receiver, lastStart, foundMatch.range.start); - sb.append(transform(foundMatch)); - lastStart = foundMatch.range.endInclusive + 1; - match = foundMatch.next(); - } while (lastStart < length && match != null); - if (lastStart < length) { - sb.append($receiver, lastStart, length); - } - return sb.toString(); - }), replaceFirst_8h3bgl$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replaceFirst_8h3bgl$", function($receiver, regex, replacement) { - return regex.replaceFirst_x2uqeu$($receiver, replacement); - }), matches_pg0hzr$:Kotlin.defineInlineFunction("stdlib.kotlin.text.matches_pg0hzr$", function($receiver, regex) { - return regex.matches_6bul2c$($receiver); - }), regionMatchesImpl:function($receiver, thisOffset, other, otherOffset, length, ignoreCase) { - var tmp$0; - if (otherOffset < 0 || (thisOffset < 0 || (thisOffset > $receiver.length - length || otherOffset > other.length - length))) { - return false; - } - tmp$0 = length - 1; - for (var index = 0;index <= tmp$0;index++) { - if (!_.kotlin.text.equals_bapbyp$($receiver.charAt(thisOffset + index), other.charAt(otherOffset + index), ignoreCase)) { - return false; - } - } - return true; - }, startsWith_cjsvxq$:function($receiver, char, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.length > 0 && _.kotlin.text.equals_bapbyp$($receiver.charAt(0), char, ignoreCase); - }, endsWith_cjsvxq$:function($receiver, char, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.length > 0 && _.kotlin.text.equals_bapbyp$($receiver.charAt(_.kotlin.text.get_lastIndex_gw00vq$($receiver)), char, ignoreCase); - }, startsWith_kzp0od$:function($receiver, prefix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase && (typeof $receiver === "string" && typeof prefix === "string")) { - return _.kotlin.text.startsWith_41xvrb$($receiver, prefix); - } else { - return _.kotlin.text.regionMatchesImpl($receiver, 0, prefix, 0, prefix.length, ignoreCase); - } - }, startsWith_q2992l$:function($receiver, prefix, startIndex, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase && (typeof $receiver === "string" && typeof prefix === "string")) { - return _.kotlin.text.startsWith_rh6gah$($receiver, prefix, startIndex); - } else { - return _.kotlin.text.regionMatchesImpl($receiver, startIndex, prefix, 0, prefix.length, ignoreCase); - } - }, endsWith_kzp0od$:function($receiver, suffix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase && (typeof $receiver === "string" && typeof suffix === "string")) { - return _.kotlin.text.endsWith_41xvrb$($receiver, suffix); - } else { - return _.kotlin.text.regionMatchesImpl($receiver, $receiver.length - suffix.length, suffix, 0, suffix.length, ignoreCase); - } - }, commonPrefixWith_kzp0od$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - var shortestLength = Math.min($receiver.length, other.length); - var i = 0; - while (i < shortestLength && _.kotlin.text.equals_bapbyp$($receiver.charAt(i), other.charAt(i), ignoreCase)) { - i++; - } - if (_.kotlin.text.hasSurrogatePairAt_kljjvw$($receiver, i - 1) || _.kotlin.text.hasSurrogatePairAt_kljjvw$(other, i - 1)) { - i--; - } - return $receiver.substring(0, i).toString(); - }, commonSuffixWith_kzp0od$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - var thisLength = $receiver.length; - var otherLength = other.length; - var shortestLength = Math.min(thisLength, otherLength); - var i = 0; - while (i < shortestLength && _.kotlin.text.equals_bapbyp$($receiver.charAt(thisLength - i - 1), other.charAt(otherLength - i - 1), ignoreCase)) { - i++; - } - if (_.kotlin.text.hasSurrogatePairAt_kljjvw$($receiver, thisLength - i - 1) || _.kotlin.text.hasSurrogatePairAt_kljjvw$(other, otherLength - i - 1)) { - i--; - } - return $receiver.substring(thisLength - i, thisLength).toString(); - }, findAnyOf:function($receiver, chars, startIndex, ignoreCase, last) { - var index; - var matchingCharIndex; - var tmp$0; - if (!ignoreCase && (chars.length === 1 && typeof $receiver === "string")) { - var char = _.kotlin.collections.single_355nu0$(chars); - index = !last ? $receiver.indexOf(char.toString(), startIndex) : $receiver.lastIndexOf(char.toString(), startIndex); - return index < 0 ? null : _.kotlin.to_l1ob02$(index, char); - } - var indices = !last ? new Kotlin.NumberRange(Math.max(startIndex, 0), _.kotlin.text.get_lastIndex_gw00vq$($receiver)) : _.kotlin.ranges.downTo_rksjo2$(Math.min(startIndex, _.kotlin.text.get_lastIndex_gw00vq$($receiver)), 0); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index_0 = tmp$0.next(); - var charAtIndex = $receiver.charAt(index_0); - indexOfFirst_mf0bwc$break: { - var tmp$5, tmp$2, tmp$3, tmp$4; - tmp$5 = _.kotlin.collections.get_indices_355nu0$(chars), tmp$2 = tmp$5.first, tmp$3 = tmp$5.last, tmp$4 = tmp$5.step; - for (var index_1 = tmp$2;index_1 <= tmp$3;index_1 += tmp$4) { - if (_.kotlin.text.equals_bapbyp$(chars[index_1], charAtIndex, ignoreCase)) { - matchingCharIndex = index_1; - break indexOfFirst_mf0bwc$break; - } - } - matchingCharIndex = -1; - } - if (matchingCharIndex >= 0) { - return _.kotlin.to_l1ob02$(index_0, chars[matchingCharIndex]); - } - } - return null; - }, indexOfAny_cfilrb$:function($receiver, chars, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf($receiver, chars, startIndex, ignoreCase, false)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, lastIndexOfAny_cfilrb$:function($receiver, chars, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf($receiver, chars, startIndex, ignoreCase, true)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, indexOf_1:function($receiver, other, startIndex, endIndex, ignoreCase, last) { - var tmp$0, tmp$1; - if (last === void 0) { - last = false; - } - var indices = !last ? new Kotlin.NumberRange(_.kotlin.ranges.coerceAtLeast_rksjo2$(startIndex, 0), _.kotlin.ranges.coerceAtMost_rksjo2$(endIndex, $receiver.length)) : _.kotlin.ranges.downTo_rksjo2$(_.kotlin.ranges.coerceAtMost_rksjo2$(startIndex, _.kotlin.text.get_lastIndex_gw00vq$($receiver)), _.kotlin.ranges.coerceAtLeast_rksjo2$(endIndex, 0)); - if (typeof $receiver === "string" && typeof other === "string") { - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (_.kotlin.text.regionMatches_qb0ndp$(other, 0, $receiver, index, other.length, ignoreCase)) { - return index; - } - } - } else { - tmp$1 = indices.iterator(); - while (tmp$1.hasNext()) { - var index_0 = tmp$1.next(); - if (_.kotlin.text.regionMatchesImpl(other, 0, $receiver, index_0, other.length, ignoreCase)) { - return index_0; - } - } - } - return-1; - }, findAnyOf_1:function($receiver, strings, startIndex, ignoreCase, last) { - var matchingString; - var matchingString_0; - var tmp$0, tmp$1; - if (!ignoreCase && strings.size === 1) { - var string = _.kotlin.collections.single_q5oq31$(strings); - var index = !last ? _.kotlin.text.indexOf_30chhv$($receiver, string, startIndex) : _.kotlin.text.lastIndexOf_30chhv$($receiver, string, startIndex); - return index < 0 ? null : _.kotlin.to_l1ob02$(index, string); - } - var indices = !last ? new Kotlin.NumberRange(_.kotlin.ranges.coerceAtLeast_rksjo2$(startIndex, 0), $receiver.length) : _.kotlin.ranges.downTo_rksjo2$(_.kotlin.ranges.coerceAtMost_rksjo2$(startIndex, _.kotlin.text.get_lastIndex_gw00vq$($receiver)), 0); - if (typeof $receiver === "string") { - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index_0 = tmp$0.next(); - firstOrNull_udlcbx$break: { - var tmp$2; - tmp$2 = strings.iterator(); - while (tmp$2.hasNext()) { - var element = tmp$2.next(); - if (_.kotlin.text.regionMatches_qb0ndp$(element, 0, $receiver, index_0, element.length, ignoreCase)) { - matchingString = element; - break firstOrNull_udlcbx$break; - } - } - matchingString = null; - } - if (matchingString != null) { - return _.kotlin.to_l1ob02$(index_0, matchingString); - } - } - } else { - tmp$1 = indices.iterator(); - while (tmp$1.hasNext()) { - var index_1 = tmp$1.next(); - firstOrNull_udlcbx$break_0: { - var tmp$3; - tmp$3 = strings.iterator(); - while (tmp$3.hasNext()) { - var element_0 = tmp$3.next(); - if (_.kotlin.text.regionMatchesImpl(element_0, 0, $receiver, index_1, element_0.length, ignoreCase)) { - matchingString_0 = element_0; - break firstOrNull_udlcbx$break_0; - } - } - matchingString_0 = null; - } - if (matchingString_0 != null) { - return _.kotlin.to_l1ob02$(index_1, matchingString_0); - } - } - } - return null; - }, findAnyOf_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, false); - }, findLastAnyOf_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, true); - }, indexOfAny_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, false)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, lastIndexOfAny_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, true)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, indexOf_ilfvta$:function($receiver, char, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.indexOfAny_cfilrb$($receiver, [char], startIndex, ignoreCase) : $receiver.indexOf(char.toString(), startIndex); - }, indexOf_30chhv$:function($receiver, string, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.indexOf_1($receiver, string, startIndex, $receiver.length, ignoreCase) : $receiver.indexOf(string, startIndex); - }, lastIndexOf_ilfvta$:function($receiver, char, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.lastIndexOfAny_cfilrb$($receiver, [char], startIndex, ignoreCase) : $receiver.lastIndexOf(char.toString(), startIndex); - }, lastIndexOf_30chhv$:function($receiver, string, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.indexOf_1($receiver, string, startIndex, 0, ignoreCase, true) : $receiver.lastIndexOf(string, startIndex); - }, contains_kzp0od$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return typeof other === "string" ? _.kotlin.text.indexOf_30chhv$($receiver, other, void 0, ignoreCase) >= 0 : _.kotlin.text.indexOf_1($receiver, other, 0, $receiver.length, ignoreCase) >= 0; - }, contains_cjsvxq$:function($receiver, char, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.indexOf_ilfvta$($receiver, char, void 0, ignoreCase) >= 0; - }, contains_pg0hzr$:Kotlin.defineInlineFunction("stdlib.kotlin.text.contains_pg0hzr$", function($receiver, regex) { - return regex.containsMatchIn_6bul2c$($receiver); - }), DelimitedRangesSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(input, startIndex, limit, getNextMatch) { - this.input_furd7s$ = input; - this.startIndex_82cxqa$ = startIndex; - this.limit_ft78vr$ = limit; - this.getNextMatch_1m429e$ = getNextMatch; - }, {iterator:function() { - return new _.kotlin.text.DelimitedRangesSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$DelimitedRangesSequence) { - this.this$DelimitedRangesSequence_0 = this$DelimitedRangesSequence; - this.nextState = -1; - this.currentStartIndex = Math.min(Math.max(this$DelimitedRangesSequence.startIndex_82cxqa$, 0), this$DelimitedRangesSequence.input_furd7s$.length); - this.nextSearchIndex = this.currentStartIndex; - this.nextItem = null; - this.counter = 0; - }, {calcNext:function() { - if (this.nextSearchIndex < 0) { - this.nextState = 0; - this.nextItem = null; - } else { - if (this.this$DelimitedRangesSequence_0.limit_ft78vr$ > 0 && ++this.counter >= this.this$DelimitedRangesSequence_0.limit_ft78vr$ || this.nextSearchIndex > this.this$DelimitedRangesSequence_0.input_furd7s$.length) { - this.nextItem = new Kotlin.NumberRange(this.currentStartIndex, _.kotlin.text.get_lastIndex_gw00vq$(this.this$DelimitedRangesSequence_0.input_furd7s$)); - this.nextSearchIndex = -1; - } else { - var match = this.this$DelimitedRangesSequence_0.getNextMatch_1m429e$.call(this.this$DelimitedRangesSequence_0.input_furd7s$, this.nextSearchIndex); - if (match == null) { - this.nextItem = new Kotlin.NumberRange(this.currentStartIndex, _.kotlin.text.get_lastIndex_gw00vq$(this.this$DelimitedRangesSequence_0.input_furd7s$)); - this.nextSearchIndex = -1; - } else { - var tmp$0 = match, index = tmp$0.component1(), length = tmp$0.component2(); - this.nextItem = new Kotlin.NumberRange(this.currentStartIndex, index - 1); - this.currentStartIndex = index + length; - this.nextSearchIndex = this.currentStartIndex + (length === 0 ? 1 : 0); - } - } - this.nextState = 1; - } - }, next:function() { - var tmp$0; - if (this.nextState === -1) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = Kotlin.isType(tmp$0 = this.nextItem, Kotlin.NumberRange) ? tmp$0 : Kotlin.throwCCE(); - this.nextItem = null; - this.nextState = -1; - return result; - }, hasNext:function() { - if (this.nextState === -1) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), rangesDelimitedBy_1$f_0:function(closure$delimiters, closure$ignoreCase) { - return function(startIndex) { - var tmp$0; - return(tmp$0 = _.kotlin.text.findAnyOf(this, closure$delimiters, startIndex, closure$ignoreCase, false)) != null ? _.kotlin.to_l1ob02$(tmp$0.first, 1) : null; - }; - }, rangesDelimitedBy_1:function($receiver, delimiters, startIndex, ignoreCase, limit) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - if (!(limit >= 0)) { - var message = "Limit must be non-negative, but was " + limit + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return new _.kotlin.text.DelimitedRangesSequence($receiver, startIndex, limit, _.kotlin.text.rangesDelimitedBy_1$f_0(delimiters, ignoreCase)); - }, rangesDelimitedBy$f_0:function(closure$delimitersList, closure$ignoreCase) { - return function(startIndex) { - var tmp$0; - return(tmp$0 = _.kotlin.text.findAnyOf_1(this, closure$delimitersList, startIndex, closure$ignoreCase, false)) != null ? _.kotlin.to_l1ob02$(tmp$0.first, tmp$0.second.length) : null; - }; - }, rangesDelimitedBy:function($receiver, delimiters, startIndex, ignoreCase, limit) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - if (!(limit >= 0)) { - var message = "Limit must be non-negative, but was " + limit + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var delimitersList = _.kotlin.collections.asList_eg9ybj$(delimiters); - return new _.kotlin.text.DelimitedRangesSequence($receiver, startIndex, limit, _.kotlin.text.rangesDelimitedBy$f_0(delimitersList, ignoreCase)); - }, splitToSequence_l2gz7$f:function(this$splitToSequence) { - return function(it) { - return _.kotlin.text.substring_2g2kgt$(this$splitToSequence, it); - }; - }, splitToSequence_l2gz7$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - return _.kotlin.sequences.map_mzhnvn$(_.kotlin.text.rangesDelimitedBy($receiver, delimiters, void 0, ignoreCase, limit), _.kotlin.text.splitToSequence_l2gz7$f($receiver)); - }, split_l2gz7$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - var $receiver_0 = _.kotlin.sequences.asIterable_uya9q7$(_.kotlin.text.rangesDelimitedBy($receiver, delimiters, void 0, ignoreCase, limit)); - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver_0, 10)); - var tmp$0; - tmp$0 = $receiver_0.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(_.kotlin.text.substring_2g2kgt$($receiver, item)); - } - return destination; - }, splitToSequence_rhc0qh$f:function(this$splitToSequence) { - return function(it) { - return _.kotlin.text.substring_2g2kgt$(this$splitToSequence, it); - }; - }, splitToSequence_rhc0qh$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - return _.kotlin.sequences.map_mzhnvn$(_.kotlin.text.rangesDelimitedBy_1($receiver, delimiters, void 0, ignoreCase, limit), _.kotlin.text.splitToSequence_rhc0qh$f($receiver)); - }, split_rhc0qh$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - var $receiver_0 = _.kotlin.sequences.asIterable_uya9q7$(_.kotlin.text.rangesDelimitedBy_1($receiver, delimiters, void 0, ignoreCase, limit)); - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver_0, 10)); - var tmp$0; - tmp$0 = $receiver_0.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(_.kotlin.text.substring_2g2kgt$($receiver, item)); - } - return destination; - }, split_nhz2th$:Kotlin.defineInlineFunction("stdlib.kotlin.text.split_nhz2th$", function($receiver, regex, limit) { - if (limit === void 0) { - limit = 0; - } - return regex.split_905azu$($receiver, limit); - }), lineSequence_gw00vq$:function($receiver) { - return _.kotlin.text.splitToSequence_l2gz7$($receiver, ["\r\n", "\n", "\r"]); - }, lines_gw00vq$:function($receiver) { - return _.kotlin.sequences.toList_uya9q7$(_.kotlin.text.lineSequence_gw00vq$($receiver)); - }, Typography:Kotlin.createObject(null, function() { - this.quote = '"'; - this.dollar = "$"; - this.amp = "\x26"; - this.less = "\x3c"; - this.greater = "\x3e"; - this.nbsp = "\u00a0"; - this.times = "\u00d7"; - this.cent = "\u00a2"; - this.pound = "\u00a3"; - this.section = "\u00a7"; - this.copyright = "\u00a9"; - this.leftGuillemete = "\u00ab"; - this.rightGuillemete = "\u00bb"; - this.registered = "\u00ae"; - this.degree = "\u00b0"; - this.plusMinus = "\u00b1"; - this.paragraph = "\u00b6"; - this.middleDot = "\u00b7"; - this.half = "\u00bd"; - this.ndash = "\u2013"; - this.mdash = "\u2014"; - this.leftSingleQuote = "\u2018"; - this.rightSingleQuote = "\u2019"; - this.lowSingleQuote = "\u201a"; - this.leftDoubleQuote = "\u201c"; - this.rightDoubleQuote = "\u201d"; - this.lowDoubleQuote = "\u201e"; - this.dagger = "\u2020"; - this.doubleDagger = "\u2021"; - this.bullet = "\u2022"; - this.ellipsis = "\u2026"; - this.prime = "\u2032"; - this.doublePrime = "\u2033"; - this.euro = "\u20ac"; - this.tm = "\u2122"; - this.almostEqual = "\u2248"; - this.notEqual = "\u2260"; - this.lessOrEqual = "\u2264"; - this.greaterOrEqual = "\u2265"; - }), MatchGroupCollection:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Collection]; - }), MatchResult:Kotlin.createTrait(null, {destructured:{get:function() { - return new _.kotlin.text.MatchResult.Destructured(this); - }}}, {Destructured:Kotlin.createClass(null, function(match) { - this.match = match; - }, {component1:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component1", function() { - return this.match.groupValues.get_za3lpa$(1); - }), component2:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component2", function() { - return this.match.groupValues.get_za3lpa$(2); - }), component3:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component3", function() { - return this.match.groupValues.get_za3lpa$(3); - }), component4:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component4", function() { - return this.match.groupValues.get_za3lpa$(4); - }), component5:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component5", function() { - return this.match.groupValues.get_za3lpa$(5); - }), component6:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component6", function() { - return this.match.groupValues.get_za3lpa$(6); - }), component7:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component7", function() { - return this.match.groupValues.get_za3lpa$(7); - }), component8:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component8", function() { - return this.match.groupValues.get_za3lpa$(8); - }), component9:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component9", function() { - return this.match.groupValues.get_za3lpa$(9); - }), component10:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component10", function() { - return this.match.groupValues.get_za3lpa$(10); - }), toList:function() { - return this.match.groupValues.subList_vux9f0$(1, this.match.groupValues.size); - }})}), toRegex_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.toRegex_pdl1w0$", function($receiver) { - return _.kotlin.text.Regex_61zpoe$($receiver); - }), toRegex_1fh9rc$:Kotlin.defineInlineFunction("stdlib.kotlin.text.toRegex_1fh9rc$", function($receiver, option) { - return _.kotlin.text.Regex_sb3q2$($receiver, option); - }), toRegex_qbq406$:Kotlin.defineInlineFunction("stdlib.kotlin.text.toRegex_qbq406$", function($receiver, options) { - return new _.kotlin.text.Regex($receiver, options); - }), js:Kotlin.definePackage(null, {reset_bckwes$:function($receiver) { - $receiver.lastIndex = 0; - }})}), collections:Kotlin.definePackage(function() { - this.INT_MAX_POWER_OF_TWO_y8578v$ = (Kotlin.modules["stdlib"].kotlin.js.internal.IntCompanionObject.MAX_VALUE / 2 | 0) + 1; - }, {listOf_za3rmp$:function(element) { - return _.kotlin.collections.arrayListOf_9mqe4v$([element]); - }, setOf_za3rmp$:function(element) { - return _.kotlin.collections.hashSetOf_9mqe4v$([element]); - }, mapOf_dvvt93$:function(pair) { - return _.kotlin.collections.hashMapOf_eoa9s7$([pair]); - }, asList_eg9ybj$:function($receiver) { - var al = new Kotlin.ArrayList; - al.array = $receiver; - return al; - }, asList_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_l1lu5s$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_964n92$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_355nu0$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_bvy38t$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_rjqrz0$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_tmsbgp$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_se6h4y$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_i2lc78$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), copyOf_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_eg9ybj$", function($receiver) { - return $receiver.slice(); - }), copyOf_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_l1lu5s$", function($receiver) { - return $receiver.slice(); - }), copyOf_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_964n92$", function($receiver) { - return $receiver.slice(); - }), copyOf_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_355nu0$", function($receiver) { - return $receiver.slice(); - }), copyOf_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_bvy38t$", function($receiver) { - return $receiver.slice(); - }), copyOf_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_rjqrz0$", function($receiver) { - return $receiver.slice(); - }), copyOf_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_tmsbgp$", function($receiver) { - return $receiver.slice(); - }), copyOf_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_se6h4y$", function($receiver) { - return $receiver.slice(); - }), copyOf_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_i2lc78$", function($receiver) { - return $receiver.slice(); - }), copyOf_ucmip8$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_7naycm$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_tb5gmf$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_x09c4g$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, Kotlin.Long.ZERO); - }, copyOf_2e964m$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_3qx2rv$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_rz0vgy$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, false); - }, copyOf_cwi0e2$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, "\x00"); - }, copyOf_ke1fvl$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, null); - }, copyOfRange_51gnn7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_51gnn7$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_dbbxfg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_dbbxfg$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_iwvzfi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_iwvzfi$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_4q6m98$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_4q6m98$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_2w253b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_2w253b$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_guntdk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_guntdk$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_qzgok5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_qzgok5$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_v260a6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_v260a6$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_6rk7s8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_6rk7s8$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), plus_ke19y6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_ke19y6$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_bsmqrv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_bsmqrv$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_hgt5d7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_hgt5d7$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_q79yhh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_q79yhh$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_96a6a3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_96a6a3$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_thi4tv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_thi4tv$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_tb5gmf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_tb5gmf$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_ssilt7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_ssilt7$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_x27eb7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_x27eb7$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_b1982w$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_pxf0th$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_426zor$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_esr9qt$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_3mnc6t$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_202n65$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_5oi5bn$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_wdqs0l$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_o0d0y5$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_741p1q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_741p1q$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_xju7f2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_xju7f2$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_1033ji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_1033ji$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_ak8uzy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_ak8uzy$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_bo3qya$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_bo3qya$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_p55a6y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_p55a6y$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_e0lu4g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_e0lu4g$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_7caxwu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_7caxwu$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_phu9d2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_phu9d2$", function($receiver, elements) { - return $receiver.concat(elements); - }), plusElement_ke19y6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_ke19y6$", function($receiver, element) { - return $receiver.concat([element]); - }), sort_ehvuiv$f:function(a, b) { - return Kotlin.compareTo(a, b); - }, sort_ehvuiv$:function($receiver) { - if ($receiver.length > 1) { - $receiver.sort(_.kotlin.collections.sort_ehvuiv$f); - } - }, sort_se6h4y$f:function(a, b) { - return a.compareTo_za3rmp$(b); - }, sort_se6h4y$:function($receiver) { - if ($receiver.length > 1) { - $receiver.sort(_.kotlin.collections.sort_se6h4y$f); - } - }, sortWith_pf0rc$f:function(closure$comparator) { - return function(a, b) { - return closure$comparator.compare(a, b); - }; - }, sortWith_pf0rc$:function($receiver, comparator) { - if ($receiver.length > 1) { - $receiver.sort(_.kotlin.collections.sortWith_pf0rc$f(comparator)); - } - }, toTypedArray_l1lu5s$:function($receiver) { - var tmp$0; - var copyOf_l1lu5s$result; - copyOf_l1lu5s$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_l1lu5s$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_964n92$:function($receiver) { - var tmp$0; - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_964n92$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_355nu0$:function($receiver) { - var tmp$0; - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_355nu0$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_bvy38t$:function($receiver) { - var tmp$0; - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_bvy38t$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_rjqrz0$:function($receiver) { - var tmp$0; - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_rjqrz0$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_tmsbgp$:function($receiver) { - var tmp$0; - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_tmsbgp$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_se6h4y$:function($receiver) { - var tmp$0; - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_se6h4y$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_i2lc78$:function($receiver) { - var tmp$0; - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_i2lc78$result) ? tmp$0 : Kotlin.throwCCE(); - }, component1_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_eg9ybj$", function($receiver) { - return $receiver[0]; - }), component1_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_964n92$", function($receiver) { - return $receiver[0]; - }), component1_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_i2lc78$", function($receiver) { - return $receiver[0]; - }), component1_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_tmsbgp$", function($receiver) { - return $receiver[0]; - }), component1_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_se6h4y$", function($receiver) { - return $receiver[0]; - }), component1_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_rjqrz0$", function($receiver) { - return $receiver[0]; - }), component1_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_bvy38t$", function($receiver) { - return $receiver[0]; - }), component1_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_l1lu5s$", function($receiver) { - return $receiver[0]; - }), component1_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_355nu0$", function($receiver) { - return $receiver[0]; - }), component2_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_eg9ybj$", function($receiver) { - return $receiver[1]; - }), component2_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_964n92$", function($receiver) { - return $receiver[1]; - }), component2_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_i2lc78$", function($receiver) { - return $receiver[1]; - }), component2_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_tmsbgp$", function($receiver) { - return $receiver[1]; - }), component2_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_se6h4y$", function($receiver) { - return $receiver[1]; - }), component2_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_rjqrz0$", function($receiver) { - return $receiver[1]; - }), component2_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_bvy38t$", function($receiver) { - return $receiver[1]; - }), component2_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_l1lu5s$", function($receiver) { - return $receiver[1]; - }), component2_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_355nu0$", function($receiver) { - return $receiver[1]; - }), component3_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_eg9ybj$", function($receiver) { - return $receiver[2]; - }), component3_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_964n92$", function($receiver) { - return $receiver[2]; - }), component3_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_i2lc78$", function($receiver) { - return $receiver[2]; - }), component3_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_tmsbgp$", function($receiver) { - return $receiver[2]; - }), component3_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_se6h4y$", function($receiver) { - return $receiver[2]; - }), component3_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_rjqrz0$", function($receiver) { - return $receiver[2]; - }), component3_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_bvy38t$", function($receiver) { - return $receiver[2]; - }), component3_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_l1lu5s$", function($receiver) { - return $receiver[2]; - }), component3_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_355nu0$", function($receiver) { - return $receiver[2]; - }), component4_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_eg9ybj$", function($receiver) { - return $receiver[3]; - }), component4_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_964n92$", function($receiver) { - return $receiver[3]; - }), component4_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_i2lc78$", function($receiver) { - return $receiver[3]; - }), component4_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_tmsbgp$", function($receiver) { - return $receiver[3]; - }), component4_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_se6h4y$", function($receiver) { - return $receiver[3]; - }), component4_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_rjqrz0$", function($receiver) { - return $receiver[3]; - }), component4_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_bvy38t$", function($receiver) { - return $receiver[3]; - }), component4_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_l1lu5s$", function($receiver) { - return $receiver[3]; - }), component4_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_355nu0$", function($receiver) { - return $receiver[3]; - }), component5_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_eg9ybj$", function($receiver) { - return $receiver[4]; - }), component5_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_964n92$", function($receiver) { - return $receiver[4]; - }), component5_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_i2lc78$", function($receiver) { - return $receiver[4]; - }), component5_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_tmsbgp$", function($receiver) { - return $receiver[4]; - }), component5_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_se6h4y$", function($receiver) { - return $receiver[4]; - }), component5_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_rjqrz0$", function($receiver) { - return $receiver[4]; - }), component5_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_bvy38t$", function($receiver) { - return $receiver[4]; - }), component5_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_l1lu5s$", function($receiver) { - return $receiver[4]; - }), component5_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_355nu0$", function($receiver) { - return $receiver[4]; - }), contains_ke19y6$:function($receiver, element) { - return _.kotlin.collections.indexOf_ke19y6$($receiver, element) >= 0; - }, contains_hgt5d7$:function($receiver, element) { - return _.kotlin.collections.indexOf_hgt5d7$($receiver, element) >= 0; - }, contains_x27eb7$:function($receiver, element) { - return _.kotlin.collections.indexOf_x27eb7$($receiver, element) >= 0; - }, contains_tb5gmf$:function($receiver, element) { - return _.kotlin.collections.indexOf_tb5gmf$($receiver, element) >= 0; - }, contains_ssilt7$:function($receiver, element) { - return _.kotlin.collections.indexOf_ssilt7$($receiver, element) >= 0; - }, contains_thi4tv$:function($receiver, element) { - return _.kotlin.collections.indexOf_thi4tv$($receiver, element) >= 0; - }, contains_96a6a3$:function($receiver, element) { - return _.kotlin.collections.indexOf_96a6a3$($receiver, element) >= 0; - }, contains_bsmqrv$:function($receiver, element) { - return _.kotlin.collections.indexOf_bsmqrv$($receiver, element) >= 0; - }, contains_q79yhh$:function($receiver, element) { - return _.kotlin.collections.indexOf_q79yhh$($receiver, element) >= 0; - }, elementAt_ke1fvl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_ke1fvl$", function($receiver, index) { - return $receiver[index]; - }), elementAt_ucmip8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_ucmip8$", function($receiver, index) { - return $receiver[index]; - }), elementAt_7naycm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_7naycm$", function($receiver, index) { - return $receiver[index]; - }), elementAt_tb5gmf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_tb5gmf$", function($receiver, index) { - return $receiver[index]; - }), elementAt_x09c4g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_x09c4g$", function($receiver, index) { - return $receiver[index]; - }), elementAt_2e964m$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_2e964m$", function($receiver, index) { - return $receiver[index]; - }), elementAt_3qx2rv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_3qx2rv$", function($receiver, index) { - return $receiver[index]; - }), elementAt_rz0vgy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_rz0vgy$", function($receiver, index) { - return $receiver[index]; - }), elementAt_cwi0e2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_cwi0e2$", function($receiver, index) { - return $receiver[index]; - }), elementAtOrElse_pgyyp0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_pgyyp0$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_eg9ybj$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_wdmei7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_wdmei7$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_964n92$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_ytfokv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_ytfokv$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_i2lc78$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_hvqa2x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_hvqa2x$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_tmsbgp$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_37uoi9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_37uoi9$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_se6h4y$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_t52ijz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_t52ijz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_rjqrz0$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_sbr6cx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_sbr6cx$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_bvy38t$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_puwlef$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_puwlef$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_l1lu5s$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_3wujvz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_3wujvz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_355nu0$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrNull_ke1fvl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_ke1fvl$", function($receiver, index) { - return _.kotlin.collections.getOrNull_ke1fvl$($receiver, index); - }), elementAtOrNull_ucmip8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_ucmip8$", function($receiver, index) { - return _.kotlin.collections.getOrNull_ucmip8$($receiver, index); - }), elementAtOrNull_7naycm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_7naycm$", function($receiver, index) { - return _.kotlin.collections.getOrNull_7naycm$($receiver, index); - }), elementAtOrNull_tb5gmf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_tb5gmf$", function($receiver, index) { - return _.kotlin.collections.getOrNull_tb5gmf$($receiver, index); - }), elementAtOrNull_x09c4g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_x09c4g$", function($receiver, index) { - return _.kotlin.collections.getOrNull_x09c4g$($receiver, index); - }), elementAtOrNull_2e964m$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_2e964m$", function($receiver, index) { - return _.kotlin.collections.getOrNull_2e964m$($receiver, index); - }), elementAtOrNull_3qx2rv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_3qx2rv$", function($receiver, index) { - return _.kotlin.collections.getOrNull_3qx2rv$($receiver, index); - }), elementAtOrNull_rz0vgy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_rz0vgy$", function($receiver, index) { - return _.kotlin.collections.getOrNull_rz0vgy$($receiver, index); - }), elementAtOrNull_cwi0e2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_cwi0e2$", function($receiver, index) { - return _.kotlin.collections.getOrNull_cwi0e2$($receiver, index); - }), find_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), find_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), find_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), first_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_964n92$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_355nu0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), firstOrNull_eg9ybj$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_964n92$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_i2lc78$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_tmsbgp$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_se6h4y$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_rjqrz0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_bvy38t$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_l1lu5s$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_355nu0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), getOrElse_pgyyp0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_pgyyp0$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_eg9ybj$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_wdmei7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_wdmei7$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_964n92$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_ytfokv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_ytfokv$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_i2lc78$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_hvqa2x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_hvqa2x$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_tmsbgp$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_37uoi9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_37uoi9$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_se6h4y$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_t52ijz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_t52ijz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_rjqrz0$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_sbr6cx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_sbr6cx$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_bvy38t$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_puwlef$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_puwlef$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_l1lu5s$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_3wujvz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_3wujvz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_355nu0$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrNull_ke1fvl$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_eg9ybj$($receiver) ? $receiver[index] : null; - }, getOrNull_ucmip8$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_964n92$($receiver) ? $receiver[index] : null; - }, getOrNull_7naycm$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_i2lc78$($receiver) ? $receiver[index] : null; - }, getOrNull_tb5gmf$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_tmsbgp$($receiver) ? $receiver[index] : null; - }, getOrNull_x09c4g$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_se6h4y$($receiver) ? $receiver[index] : null; - }, getOrNull_2e964m$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_rjqrz0$($receiver) ? $receiver[index] : null; - }, getOrNull_3qx2rv$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_bvy38t$($receiver) ? $receiver[index] : null; - }, getOrNull_rz0vgy$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_l1lu5s$($receiver) ? $receiver[index] : null; - }, getOrNull_cwi0e2$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_355nu0$($receiver) ? $receiver[index] : null; - }, indexOf_ke19y6$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3, tmp$4, tmp$5, tmp$6, tmp$7; - if (element == null) { - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if ($receiver[index] == null) { - return index; - } - } - } else { - tmp$4 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$5 = tmp$4.first, tmp$6 = tmp$4.last, tmp$7 = tmp$4.step; - for (var index_0 = tmp$5;index_0 <= tmp$6;index_0 += tmp$7) { - if (Kotlin.equals(element, $receiver[index_0])) { - return index_0; - } - } - } - return-1; - }, indexOf_hgt5d7$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_964n92$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_x27eb7$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_i2lc78$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_tb5gmf$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_tmsbgp$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_ssilt7$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_se6h4y$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element.equals_za3rmp$($receiver[index])) { - return index; - } - } - return-1; - }, indexOf_thi4tv$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_rjqrz0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_96a6a3$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_bvy38t$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_bsmqrv$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_l1lu5s$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (Kotlin.equals(element, $receiver[index])) { - return index; - } - } - return-1; - }, indexOf_q79yhh$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_355nu0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOfFirst_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_1seo9s$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_964n92$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_pqtrl8$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_i2lc78$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_tmsbgp$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_c9nn9k$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_se6h4y$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_jp64to$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_rjqrz0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_56tpji$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_bvy38t$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_n9o8rw$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_l1lu5s$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_mf0bwc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_355nu0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), last_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_eg9ybj$($receiver)]; - }, last_964n92$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_964n92$($receiver)]; - }, last_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_i2lc78$($receiver)]; - }, last_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_tmsbgp$($receiver)]; - }, last_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_se6h4y$($receiver)]; - }, last_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_rjqrz0$($receiver)]; - }, last_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_bvy38t$($receiver)]; - }, last_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_l1lu5s$($receiver)]; - }, last_355nu0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_355nu0$($receiver)]; - }, last_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), lastIndexOf_ke19y6$:function($receiver, element) { - var tmp$0, tmp$1; - if (element == null) { - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if ($receiver[index] == null) { - return index; - } - } - } else { - tmp$1 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index_0 = tmp$1.next(); - if (Kotlin.equals(element, $receiver[index_0])) { - return index_0; - } - } - } - return-1; - }, lastIndexOf_hgt5d7$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_x27eb7$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_tb5gmf$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_ssilt7$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element.equals_za3rmp$($receiver[index])) { - return index; - } - } - return-1; - }, lastIndexOf_thi4tv$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_96a6a3$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_bsmqrv$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (Kotlin.equals(element, $receiver[index])) { - return index; - } - } - return-1; - }, lastIndexOf_q79yhh$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastOrNull_eg9ybj$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_964n92$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_i2lc78$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_tmsbgp$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_se6h4y$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_rjqrz0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_bvy38t$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_l1lu5s$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_355nu0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), single_eg9ybj$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_964n92$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_i2lc78$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_tmsbgp$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_se6h4y$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_rjqrz0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_bvy38t$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_l1lu5s$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_355nu0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return(tmp$3 = single) == null || tmp$3 != null ? tmp$3 : Kotlin.throwCCE(); - }), single_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_1seo9s$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_pqtrl8$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$3 = single) === "number" ? tmp$3 : Kotlin.throwCCE(); - }), single_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_c9nn9k$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return Kotlin.isType(tmp$1 = single, Kotlin.Long) ? tmp$1 : Kotlin.throwCCE(); - }), single_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_jp64to$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_56tpji$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_n9o8rw$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "boolean" ? tmp$1 : Kotlin.throwCCE(); - }), single_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_mf0bwc$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return Kotlin.isChar(tmp$1 = single) ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_eg9ybj$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_964n92$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_i2lc78$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_tmsbgp$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_se6h4y$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_rjqrz0$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_bvy38t$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_l1lu5s$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_355nu0$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_1seo9s$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_jp64to$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_56tpji$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_ke1fvl$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_eg9ybj$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_ucmip8$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_964n92$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_7naycm$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_i2lc78$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_tb5gmf$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_tmsbgp$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_x09c4g$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_se6h4y$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_2e964m$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_rjqrz0$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_3qx2rv$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_bvy38t$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_rz0vgy$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_l1lu5s$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_cwi0e2$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_355nu0$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, dropLast_ke1fvl$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_ke1fvl$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_ucmip8$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_ucmip8$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_7naycm$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_7naycm$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_tb5gmf$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_tb5gmf$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_x09c4g$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_x09c4g$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_2e964m$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_2e964m$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_3qx2rv$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_3qx2rv$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_rz0vgy$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_rz0vgy$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_cwi0e2$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_cwi0e2$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLastWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_eg9ybj$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_ke1fvl$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_964n92$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_ucmip8$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_i2lc78$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_7naycm$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_tmsbgp$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_tb5gmf$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_se6h4y$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_x09c4g$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_rjqrz0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_2e964m$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_bvy38t$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_3qx2rv$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_l1lu5s$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_rz0vgy$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_355nu0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_cwi0e2$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), filter_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_dgtl0h$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_1seo9s$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_pqtrl8$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_74vioc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_c9nn9k$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_jp64to$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_56tpji$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_n9o8rw$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_mf0bwc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterIndexed_qy3he2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_qy3he2$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_vs9yol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_vs9yol$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_sj8ypt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_sj8ypt$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_mb5uch$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_mb5uch$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_esogdp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_esogdp$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_vlcunz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_vlcunz$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_qd2zlp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_qd2zlp$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_5j3lt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_5j3lt$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_ke0vuh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_ke0vuh$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_xjbu2f$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_xjbu2f$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_4r47cg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_4r47cg$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_lttaj6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_lttaj6$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_muamox$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_muamox$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_fhrm4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_fhrm4$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_nzxn4e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_nzxn4e$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_1tmjh1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_1tmjh1$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_t5hn6u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_t5hn6u$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_80tdpi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_80tdpi$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterNot_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_dgtl0h$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_1seo9s$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_pqtrl8$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_74vioc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_c9nn9k$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_jp64to$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_56tpji$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_n9o8rw$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_mf0bwc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotNull_eg9ybj$:function($receiver) { - return _.kotlin.collections.filterNotNullTo_ajv5ds$($receiver, new Kotlin.ArrayList); - }, filterNotNullTo_ajv5ds$:function($receiver, destination) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (element != null) { - destination.add_za3rmp$(element); - } - } - return destination; - }, filterNotTo_hjvcb0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_hjvcb0$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_xaona3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_xaona3$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_czbilj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_czbilj$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_hufq5w$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_hufq5w$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_ejt5vl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_ejt5vl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_a2xp8n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_a2xp8n$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_py67j4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_py67j4$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_wtv3qz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_wtv3qz$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_xspnld$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_xspnld$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_hjvcb0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_hjvcb0$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_xaona3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_xaona3$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_czbilj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_czbilj$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_hufq5w$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_hufq5w$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_ejt5vl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_ejt5vl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_a2xp8n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_a2xp8n$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_py67j4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_py67j4$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_wtv3qz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_wtv3qz$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_xspnld$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_xspnld$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), slice_umgy94$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - return _.kotlin.collections.asList_eg9ybj$($receiver.slice(indices.start, toIndex)); - }, slice_yhzrrx$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_iwvzfi$result; - copyOfRange_iwvzfi$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_iwvzfi$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_jsa5ur$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_6rk7s8$result; - copyOfRange_6rk7s8$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_6rk7s8$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_w9c7lc$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_qzgok5$result; - copyOfRange_qzgok5$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_qzgok5$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_n1ctuf$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_v260a6$result; - copyOfRange_v260a6$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_v260a6$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_tf1fwd$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_guntdk$result; - copyOfRange_guntdk$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_guntdk$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_z0313o$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_2w253b$result; - copyOfRange_2w253b$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_2w253b$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_tur8s7$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_dbbxfg$result; - copyOfRange_dbbxfg$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_dbbxfg$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_kwtr7z$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_4q6m98$result; - copyOfRange_4q6m98$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_4q6m98$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_k1z9y1$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_8bcmtu$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_z4poy4$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_tpf8wv$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_liqtfe$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_u6v72s$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_qp9dhh$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_4xk008$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_ia2tr4$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, sliceArray_b1ebut$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.nullArray($receiver, indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_n1pimy$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_xl46hs$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_5oi5bn$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_11np7e$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.longArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_k9291c$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_5ptw4x$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_vreslo$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.booleanArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_yudz04$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.charArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_umgy94$:function($receiver, indices) { - if (indices.isEmpty()) { - return $receiver.slice(0, 0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_yhzrrx$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_jsa5ur$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_w9c7lc$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_n1ctuf$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.longArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_tf1fwd$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_z0313o$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_tur8s7$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.booleanArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_kwtr7z$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.charArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, take_ke1fvl$:function($receiver, n) { - var tmp$0, tmp$1, tmp$2; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_eg9ybj$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_ucmip8$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_964n92$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_7naycm$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_i2lc78$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_tb5gmf$:function($receiver, n) { - var tmp$0, tmp$1, tmp$2; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_tmsbgp$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_x09c4g$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_se6h4y$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_2e964m$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_rjqrz0$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_3qx2rv$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_bvy38t$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_rz0vgy$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_l1lu5s$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_cwi0e2$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_355nu0$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, takeLast_ke1fvl$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_eg9ybj$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_ucmip8$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_964n92$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_7naycm$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_i2lc78$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_tb5gmf$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_tmsbgp$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_x09c4g$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_se6h4y$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_2e964m$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_rjqrz0$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_3qx2rv$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_bvy38t$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_rz0vgy$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_l1lu5s$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_cwi0e2$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_355nu0$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLastWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_eg9ybj$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_ke1fvl$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_eg9ybj$($receiver); - }), takeLastWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_964n92$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_ucmip8$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_964n92$($receiver); - }), takeLastWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_i2lc78$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_7naycm$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_i2lc78$($receiver); - }), takeLastWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_tmsbgp$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_tb5gmf$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_tmsbgp$($receiver); - }), takeLastWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_se6h4y$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_x09c4g$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_se6h4y$($receiver); - }), takeLastWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_rjqrz0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_2e964m$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_rjqrz0$($receiver); - }), takeLastWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_bvy38t$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_3qx2rv$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_bvy38t$($receiver); - }), takeLastWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_l1lu5s$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_rz0vgy$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_l1lu5s$($receiver); - }), takeLastWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_355nu0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_cwi0e2$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_355nu0$($receiver); - }), takeWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), reverse_eg9ybj$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_964n92$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_964n92$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_i2lc78$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_tmsbgp$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_se6h4y$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_rjqrz0$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_bvy38t$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_l1lu5s$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_355nu0$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reversed_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_eg9ybj$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_964n92$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_964n92$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_i2lc78$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_tmsbgp$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_se6h4y$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_rjqrz0$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_bvy38t$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_l1lu5s$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_355nu0$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversedArray_eg9ybj$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.nullArray($receiver, $receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_964n92$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_964n92$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_i2lc78$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_tmsbgp$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_se6h4y$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.longArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_rjqrz0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_bvy38t$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_l1lu5s$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.booleanArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_355nu0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.charArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, sortBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortBy_2kbc8r$", function($receiver, selector) { - if ($receiver.length > 1) { - _.kotlin.collections.sortWith_pf0rc$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - } - }), sortByDescending_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortByDescending_2kbc8r$", function($receiver, selector) { - if ($receiver.length > 1) { - _.kotlin.collections.sortWith_pf0rc$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - } - }), sortDescending_ehvuiv$:function($receiver) { - _.kotlin.collections.sortWith_pf0rc$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortDescending_964n92$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_964n92$($receiver); - } - }, sortDescending_i2lc78$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_i2lc78$($receiver); - } - }, sortDescending_tmsbgp$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_tmsbgp$($receiver); - } - }, sortDescending_se6h4y$:function($receiver) { - if ($receiver.length > 1) { - _.kotlin.collections.sort_se6h4y$($receiver); - _.kotlin.collections.reverse_se6h4y$($receiver); - } - }, sortDescending_rjqrz0$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_rjqrz0$($receiver); - } - }, sortDescending_bvy38t$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_bvy38t$($receiver); - } - }, sortDescending_355nu0$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_355nu0$($receiver); - } - }, sorted_ehvuiv$:function($receiver) { - return _.kotlin.collections.asList_eg9ybj$(_.kotlin.collections.sortedArray_ehvuiv$($receiver)); - }, sorted_964n92$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_964n92$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_i2lc78$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_i2lc78$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_tmsbgp$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_tmsbgp$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_se6h4y$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_se6h4y$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_rjqrz0$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_rjqrz0$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_bvy38t$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_bvy38t$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_355nu0$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_355nu0$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedArray_ehvuiv$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_eg9ybj$result; - copyOf_eg9ybj$result = $receiver.slice(); - _.kotlin.collections.sort_ehvuiv$(copyOf_eg9ybj$result); - return copyOf_eg9ybj$result; - }, sortedArray_964n92$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_964n92$result); - return copyOf_964n92$result; - }, sortedArray_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_i2lc78$result); - return copyOf_i2lc78$result; - }, sortedArray_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_tmsbgp$result); - return copyOf_tmsbgp$result; - }, sortedArray_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - _.kotlin.collections.sort_se6h4y$(copyOf_se6h4y$result); - return copyOf_se6h4y$result; - }, sortedArray_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_rjqrz0$result); - return copyOf_rjqrz0$result; - }, sortedArray_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_bvy38t$result); - return copyOf_bvy38t$result; - }, sortedArray_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_355nu0$result); - return copyOf_355nu0$result; - }, sortedArrayDescending_ehvuiv$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_eg9ybj$result; - copyOf_eg9ybj$result = $receiver.slice(); - _.kotlin.collections.sortWith_pf0rc$(copyOf_eg9ybj$result, _.kotlin.comparisons.reverseOrder()); - return copyOf_eg9ybj$result; - }, sortedArrayDescending_964n92$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - _.kotlin.collections.sortDescending_964n92$(copyOf_964n92$result); - return copyOf_964n92$result; - }, sortedArrayDescending_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - _.kotlin.collections.sortDescending_i2lc78$(copyOf_i2lc78$result); - return copyOf_i2lc78$result; - }, sortedArrayDescending_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - _.kotlin.collections.sortDescending_tmsbgp$(copyOf_tmsbgp$result); - return copyOf_tmsbgp$result; - }, sortedArrayDescending_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - _.kotlin.collections.sortDescending_se6h4y$(copyOf_se6h4y$result); - return copyOf_se6h4y$result; - }, sortedArrayDescending_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - _.kotlin.collections.sortDescending_rjqrz0$(copyOf_rjqrz0$result); - return copyOf_rjqrz0$result; - }, sortedArrayDescending_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - _.kotlin.collections.sortDescending_bvy38t$(copyOf_bvy38t$result); - return copyOf_bvy38t$result; - }, sortedArrayDescending_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - _.kotlin.collections.sortDescending_355nu0$(copyOf_355nu0$result); - return copyOf_355nu0$result; - }, sortedArrayWith_pf0rc$:function($receiver, comparator) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_eg9ybj$result; - copyOf_eg9ybj$result = $receiver.slice(); - _.kotlin.collections.sortWith_pf0rc$(copyOf_eg9ybj$result, comparator); - return copyOf_eg9ybj$result; - }, sortedBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_2kbc8r$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_pf0rc$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_lmseli$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_g2jn7p$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_urwa3e$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_bpm5rn$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_no6awq$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_naiwod$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_5sy41q$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_jujh3x$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_mn0nhi$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_w3205p$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_7pamz8$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_1f7czx$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_g2bjom$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_es41ir$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_xjz7li$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_r5s4t3$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedByDescending_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_2kbc8r$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_pf0rc$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_lmseli$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_g2jn7p$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_urwa3e$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_bpm5rn$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_no6awq$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_naiwod$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_5sy41q$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_jujh3x$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_mn0nhi$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_w3205p$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_7pamz8$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_1f7czx$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_g2bjom$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_es41ir$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_xjz7li$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_r5s4t3$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedDescending_ehvuiv$:function($receiver) { - return _.kotlin.collections.sortedWith_pf0rc$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortedDescending_964n92$:function($receiver) { - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_964n92$result); - return _.kotlin.collections.reversed_964n92$(copyOf_964n92$result); - }, sortedDescending_i2lc78$:function($receiver) { - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_i2lc78$result); - return _.kotlin.collections.reversed_i2lc78$(copyOf_i2lc78$result); - }, sortedDescending_tmsbgp$:function($receiver) { - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_tmsbgp$result); - return _.kotlin.collections.reversed_tmsbgp$(copyOf_tmsbgp$result); - }, sortedDescending_se6h4y$:function($receiver) { - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - _.kotlin.collections.sort_se6h4y$(copyOf_se6h4y$result); - return _.kotlin.collections.reversed_se6h4y$(copyOf_se6h4y$result); - }, sortedDescending_rjqrz0$:function($receiver) { - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_rjqrz0$result); - return _.kotlin.collections.reversed_rjqrz0$(copyOf_rjqrz0$result); - }, sortedDescending_bvy38t$:function($receiver) { - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_bvy38t$result); - return _.kotlin.collections.reversed_bvy38t$(copyOf_bvy38t$result); - }, sortedDescending_355nu0$:function($receiver) { - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_355nu0$result); - return _.kotlin.collections.reversed_355nu0$(copyOf_355nu0$result); - }, sortedWith_pf0rc$:function($receiver, comparator) { - return _.kotlin.collections.asList_eg9ybj$(_.kotlin.collections.sortedArrayWith_pf0rc$($receiver, comparator)); - }, sortedWith_g2jn7p$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_964n92$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_bpm5rn$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_i2lc78$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_naiwod$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_tmsbgp$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_jujh3x$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_se6h4y$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_w3205p$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_rjqrz0$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_1f7czx$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_bvy38t$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_es41ir$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_l1lu5s$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_r5s4t3$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_355nu0$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, get_indices_eg9ybj$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_eg9ybj$($receiver)); - }}, get_indices_964n92$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_964n92$($receiver)); - }}, get_indices_i2lc78$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_i2lc78$($receiver)); - }}, get_indices_tmsbgp$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_tmsbgp$($receiver)); - }}, get_indices_se6h4y$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_se6h4y$($receiver)); - }}, get_indices_rjqrz0$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_rjqrz0$($receiver)); - }}, get_indices_bvy38t$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_bvy38t$($receiver)); - }}, get_indices_l1lu5s$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_l1lu5s$($receiver)); - }}, get_indices_355nu0$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_355nu0$($receiver)); - }}, isEmpty_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_eg9ybj$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_964n92$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_i2lc78$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_tmsbgp$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_se6h4y$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_rjqrz0$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_bvy38t$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_l1lu5s$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_355nu0$", function($receiver) { - return $receiver.length === 0; - }), isNotEmpty_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_eg9ybj$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_964n92$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_i2lc78$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_tmsbgp$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_se6h4y$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_rjqrz0$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_bvy38t$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_l1lu5s$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_355nu0$", function($receiver) { - return!($receiver.length === 0); - }), get_lastIndex_eg9ybj$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_964n92$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_i2lc78$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_tmsbgp$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_se6h4y$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_rjqrz0$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_bvy38t$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_l1lu5s$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_355nu0$:{value:function($receiver) { - return $receiver.length - 1; - }}, toBooleanArray_7y31dn$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.booleanArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toByteArray_mgx7ed$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toCharArray_moaglf$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.charArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toDoubleArray_hb77ya$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toFloatArray_wafl1t$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toIntArray_eko7cy$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toLongArray_r1royx$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.longArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toShortArray_ekmd3j$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, associate_8vmyt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_8vmyt$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_tgl7q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_tgl7q$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_e2sx9i$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_e2sx9i$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_xlvinu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_xlvinu$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_tk5abm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_tk5abm$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_h6wt46$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_h6wt46$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_fifeb0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_fifeb0$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_3tjkyu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_3tjkyu$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_359jka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_359jka$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_rie7ol$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_g2md44$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_k6apf4$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_x640pc$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_uqemus$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_xtltf4$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_r03ely$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_msp2nk$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_6rjtds$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_w3c4fn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_w3c4fn$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_px3eju$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_px3eju$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_1kbpp4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_1kbpp4$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_roawnf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_roawnf$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_ktcn5y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_ktcn5y$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_x5l9ko$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_x5l9ko$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_5h63vp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_5h63vp$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_3yyqis$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_3yyqis$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_bixbbo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_bixbbo$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_xn9vqz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_xn9vqz$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_l102rk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_l102rk$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_75gvpc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_75gvpc$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_en2rcd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_en2rcd$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_gbiqoc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_gbiqoc$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_t143fk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_t143fk$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_fbozex$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_fbozex$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_83ixn8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_83ixn8$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_wnqwum$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_wnqwum$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_6dagur$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_6dagur$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_3dm5x2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_3dm5x2$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_7cumig$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_7cumig$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_f2qsrv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_f2qsrv$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_9mh1ly$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_9mh1ly$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_j7feqg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_j7feqg$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_uv5qij$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_uv5qij$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_fdk0po$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_fdk0po$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_my3tn0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_my3tn0$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_m765wl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_m765wl$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_aa8jay$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_aa8jay$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_ympge2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_ympge2$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_qnwrru$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_qnwrru$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_flvp0e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_flvp0e$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_616w56$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_616w56$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_jxocj8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_jxocj8$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_wfiona$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_wfiona$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_5nnqga$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_5nnqga$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_ajv5ds$:function($receiver, destination) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_ay7s2l$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_abmk3v$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_aws6s5$:function($receiver, destination) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_uqoool$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_2jmgtx$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_yloohh$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_a59y9h$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_9hvz9d$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_eg9ybj$:function($receiver) { - return _.kotlin.collections.toCollection_ajv5ds$($receiver, new Kotlin.ComplexHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_964n92$:function($receiver) { - return _.kotlin.collections.toCollection_ay7s2l$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_i2lc78$:function($receiver) { - return _.kotlin.collections.toCollection_abmk3v$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_tmsbgp$:function($receiver) { - return _.kotlin.collections.toCollection_aws6s5$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_se6h4y$:function($receiver) { - return _.kotlin.collections.toCollection_uqoool$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_rjqrz0$:function($receiver) { - return _.kotlin.collections.toCollection_2jmgtx$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_bvy38t$:function($receiver) { - return _.kotlin.collections.toCollection_yloohh$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_l1lu5s$:function($receiver) { - return _.kotlin.collections.toCollection_a59y9h$($receiver, new Kotlin.PrimitiveBooleanHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_355nu0$:function($receiver) { - return _.kotlin.collections.toCollection_9hvz9d$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toList_eg9ybj$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_eg9ybj$($receiver); - } - } - return tmp$1; - }, toList_964n92$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_964n92$($receiver); - } - } - return tmp$1; - }, toList_i2lc78$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_i2lc78$($receiver); - } - } - return tmp$1; - }, toList_tmsbgp$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_tmsbgp$($receiver); - } - } - return tmp$1; - }, toList_se6h4y$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_se6h4y$($receiver); - } - } - return tmp$1; - }, toList_rjqrz0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_rjqrz0$($receiver); - } - } - return tmp$1; - }, toList_bvy38t$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_bvy38t$($receiver); - } - } - return tmp$1; - }, toList_l1lu5s$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_l1lu5s$($receiver); - } - } - return tmp$1; - }, toList_355nu0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_355nu0$($receiver); - } - } - return tmp$1; - }, toMutableList_eg9ybj$:function($receiver) { - return _.java.util.ArrayList_wtfk93$(_.kotlin.collections.asCollection($receiver)); - }, toMutableList_964n92$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_i2lc78$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - list.add_za3rmp$(item); - } - return list; - }, toMutableList_se6h4y$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_rjqrz0$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_bvy38t$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_l1lu5s$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_355nu0$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toSet_eg9ybj$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_ajv5ds$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_964n92$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_ay7s2l$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_i2lc78$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_abmk3v$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_tmsbgp$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_aws6s5$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_se6h4y$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_uqoool$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_rjqrz0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_2jmgtx$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_bvy38t$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_yloohh$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_l1lu5s$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_a59y9h$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_355nu0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_9hvz9d$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, flatMap_9lt8ay$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_9lt8ay$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_3mjriv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_3mjriv$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_bh8vgr$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_bh8vgr$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_f8uktn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_f8uktn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_2nev2p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_2nev2p$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_d20dhn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_d20dhn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_y2hta3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_y2hta3$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_ikx8ln$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_ikx8ln$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_986epn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_986epn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_snzct$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_snzct$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_8oemzk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_8oemzk$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_kihasu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_kihasu$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_2puvzs$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_2puvzs$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_clttnk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_clttnk$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_pj001a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_pj001a$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_rtxif4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_rtxif4$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_812y0a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_812y0a$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_4mn2jk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_4mn2jk$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), groupBy_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_rie7ol$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_g2md44$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_k6apf4$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_x640pc$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_uqemus$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_xtltf4$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_r03ely$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_msp2nk$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_6rjtds$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_w3c4fn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_w3c4fn$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_px3eju$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_px3eju$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_1kbpp4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_1kbpp4$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_roawnf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_roawnf$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_ktcn5y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_ktcn5y$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_x5l9ko$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_x5l9ko$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_5h63vp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_5h63vp$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_3yyqis$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_3yyqis$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_bixbbo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_bixbbo$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_uwewbq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_uwewbq$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_i9dcot$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_i9dcot$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_y8hm29$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_y8hm29$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_3veyxd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_3veyxd$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_ht8exh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_ht8exh$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_67q775$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_67q775$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_agwn6d$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_agwn6d$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_iwlqrz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_iwlqrz$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_udsjtt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_udsjtt$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_h5lvbm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_h5lvbm$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_col8dz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_col8dz$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_152lxl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_152lxl$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_2mlql2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_2mlql2$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_bnbmqj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_bnbmqj$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_lix5qv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_lix5qv$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_6o498c$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_6o498c$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_p4mhb1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_p4mhb1$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_ghv9wz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_ghv9wz$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_rie7ol$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_g2md44$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_k6apf4$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_x640pc$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_uqemus$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_xtltf4$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_r03ely$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_msp2nk$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_6rjtds$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapIndexed_d6xsp2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_d6xsp2$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_8jepyn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_8jepyn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_wnrzaz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_wnrzaz$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_yva9b9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_yva9b9$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_jr48ix$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_jr48ix$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_3bjddx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_3bjddx$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_7c4mm7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_7c4mm7$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_y1gkw5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_y1gkw5$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_t492ff$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_t492ff$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedNotNull_d6xsp2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNull_d6xsp2$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapIndexedNotNullTo_dlwz7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNullTo_dlwz7$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapIndexedTo_dlwz7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_dlwz7$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_nikm7u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_nikm7u$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_bkzh1a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_bkzh1a$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_c7wlwo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_c7wlwo$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_312cqi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_312cqi$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_ndq9q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_ndq9q$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_t1nf4q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_t1nf4q$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_yhbe06$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_yhbe06$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_u7did6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_u7did6$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNull_rie7ol$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(element)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapNotNullTo_b5g94o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNullTo_b5g94o$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(element)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapTo_b5g94o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_b5g94o$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_y9zzej$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_y9zzej$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_finokt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_finokt$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_qgiq1f$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_qgiq1f$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_g8ovid$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_g8ovid$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_j2zksz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_j2zksz$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_u6234r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_u6234r$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_yuho05$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_yuho05$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_1u018b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_1u018b$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_eg9ybj$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_eg9ybj$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_eg9ybj$f($receiver)); - }, withIndex_964n92$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_964n92$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_964n92$f($receiver)); - }, withIndex_i2lc78$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_i2lc78$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_i2lc78$f($receiver)); - }, withIndex_tmsbgp$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_tmsbgp$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_tmsbgp$f($receiver)); - }, withIndex_se6h4y$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_se6h4y$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_se6h4y$f($receiver)); - }, withIndex_rjqrz0$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_rjqrz0$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_rjqrz0$f($receiver)); - }, withIndex_bvy38t$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_bvy38t$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_bvy38t$f($receiver)); - }, withIndex_l1lu5s$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_l1lu5s$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_l1lu5s$f($receiver)); - }, withIndex_355nu0$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_355nu0$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_355nu0$f($receiver)); - }, distinct_eg9ybj$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_eg9ybj$($receiver)); - }, distinct_964n92$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_964n92$($receiver)); - }, distinct_i2lc78$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_i2lc78$($receiver)); - }, distinct_tmsbgp$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_tmsbgp$($receiver)); - }, distinct_se6h4y$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_se6h4y$($receiver)); - }, distinct_rjqrz0$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_rjqrz0$($receiver)); - }, distinct_bvy38t$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_bvy38t$($receiver)); - }, distinct_l1lu5s$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_l1lu5s$($receiver)); - }, distinct_355nu0$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_355nu0$($receiver)); - }, distinctBy_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_rie7ol$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var e = tmp$0[tmp$2]; - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_g2md44$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_k6apf4$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_x640pc$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var e = tmp$0[tmp$2]; - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_uqemus$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_xtltf4$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_r03ely$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_msp2nk$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_6rjtds$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), intersect_k1u664$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_eg9ybj$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_q8x1w7$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_964n92$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_gi9hh5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_i2lc78$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_tpf8wv$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_tmsbgp$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_rwqrtj$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_se6h4y$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_v8iop3$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_rjqrz0$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_7a8nt5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_bvy38t$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_6ly3kh$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_l1lu5s$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_1h1v6f$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_355nu0$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, subtract_k1u664$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_eg9ybj$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_q8x1w7$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_964n92$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_gi9hh5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_i2lc78$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_tpf8wv$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_tmsbgp$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_rwqrtj$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_se6h4y$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_v8iop3$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_rjqrz0$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_7a8nt5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_bvy38t$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_6ly3kh$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_l1lu5s$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_1h1v6f$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_355nu0$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, toMutableSet_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_964n92$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_i2lc78$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_se6h4y$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_rjqrz0$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_bvy38t$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_l1lu5s$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_355nu0$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, union_k1u664$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_eg9ybj$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_q8x1w7$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_964n92$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_gi9hh5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_i2lc78$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_tpf8wv$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_tmsbgp$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_rwqrtj$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_se6h4y$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_v8iop3$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_rjqrz0$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_7a8nt5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_bvy38t$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_6ly3kh$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_l1lu5s$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_1h1v6f$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_355nu0$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, all_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - return false; - } - } - return true; - }), all_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - return false; - } - } - return true; - }), all_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return true; - } - return false; - }, any_964n92$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_i2lc78$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return true; - } - return false; - }, any_se6h4y$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_rjqrz0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_bvy38t$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_l1lu5s$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_355nu0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return true; - } - } - return false; - }), any_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return true; - } - } - return false; - }), any_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_eg9ybj$", function($receiver) { - return $receiver.length; - }), count_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_964n92$", function($receiver) { - return $receiver.length; - }), count_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_i2lc78$", function($receiver) { - return $receiver.length; - }), count_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_tmsbgp$", function($receiver) { - return $receiver.length; - }), count_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_se6h4y$", function($receiver) { - return $receiver.length; - }), count_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_rjqrz0$", function($receiver) { - return $receiver.length; - }), count_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_bvy38t$", function($receiver) { - return $receiver.length; - }), count_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_l1lu5s$", function($receiver) { - return $receiver.length; - }), count_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_355nu0$", function($receiver) { - return $receiver.length; - }), count_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - count++; - } - } - return count; - }), count_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_1seo9s$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - count++; - } - } - return count; - }), count_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_jp64to$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_56tpji$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_pshek8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_pshek8$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_pqv817$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_pqv817$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_9mm9fh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_9mm9fh$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_5dqkgz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_5dqkgz$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_re4yqz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_re4yqz$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_t23qwz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_t23qwz$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_8pmi6j$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_8pmi6j$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_86qr6z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_86qr6z$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_xpqlgr$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_xpqlgr$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_gmwb6l$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_gmwb6l$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_jy2lti$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_jy2lti$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_xco1ea$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_xco1ea$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_qjubp4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_qjubp4$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_8ys392$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_8ys392$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_pljay6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_pljay6$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_8s951y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_8s951y$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_w9wt4a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_w9wt4a$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_5d3uiy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_5d3uiy$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldRight_pshek8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_pshek8$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_af40en$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_af40en$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_w1nri5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_w1nri5$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_fwp7kz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_fwp7kz$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_8g1vz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_8g1vz$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_tb9j25$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_tb9j25$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_5fhoof$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_5fhoof$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_n2j045$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_n2j045$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_6kfpv5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_6kfpv5$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRightIndexed_gmwb6l$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_gmwb6l$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_g7wmmc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_g7wmmc$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_f9eii6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_f9eii6$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_xyb360$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_xyb360$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_insxdw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_insxdw$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_wrtz0y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_wrtz0y$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_5cv1t0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_5cv1t0$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_7hxhjq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_7hxhjq$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_wieq4k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_wieq4k$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), forEach_5wd4f$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_5wd4f$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - action(element); - } - }), forEach_qhbdc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_qhbdc$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_e5s73w$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_e5s73w$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_xiw8tg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_xiw8tg$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - action(element); - } - }), forEach_tn4k60$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_tn4k60$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_h9w2yk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_h9w2yk$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_fleo5e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_fleo5e$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_3wiut8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_3wiut8$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_32a9pw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_32a9pw$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_gwl0xm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_gwl0xm$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - action(index++, item); - } - }), forEachIndexed_jprgez$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_jprgez$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_ici84x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_ici84x$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_f65lpr$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_f65lpr$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - action(index++, item); - } - }), forEachIndexed_qmdk59$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_qmdk59$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_vlkvnz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_vlkvnz$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_enmwj1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_enmwj1$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_aiefap$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_aiefap$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_l1n7qv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_l1n7qv$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_ehvuiv$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (Kotlin.compareTo(max, e) < 0) { - max = e; - } - } - return max; - }, max_964n92$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_i2lc78$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_tmsbgp$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_se6h4y$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max.compareTo_za3rmp$(e) < 0) { - max = e; - } - } - return max; - }, max_rjqrz0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_bvy38t$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_355nu0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, maxBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_2kbc8r$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_lmseli$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_urwa3e$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_no6awq$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_5sy41q$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_mn0nhi$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_7pamz8$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_g2bjom$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_xjz7li$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_pf0rc$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_g2jn7p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_bpm5rn$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_naiwod$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_jujh3x$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_w3205p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_1f7czx$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_es41ir$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_r5s4t3$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_ehvuiv$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (Kotlin.compareTo(min, e) > 0) { - min = e; - } - } - return min; - }, min_964n92$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_i2lc78$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_tmsbgp$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_se6h4y$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min.compareTo_za3rmp$(e) > 0) { - min = e; - } - } - return min; - }, min_rjqrz0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_bvy38t$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_355nu0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, minBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_2kbc8r$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_lmseli$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_urwa3e$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_no6awq$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_5sy41q$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_mn0nhi$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_7pamz8$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_g2bjom$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_xjz7li$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_pf0rc$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_g2jn7p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_bpm5rn$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_naiwod$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_jujh3x$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_w3205p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_1f7czx$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_es41ir$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_r5s4t3$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return false; - } - return true; - }, none_964n92$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_i2lc78$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return false; - } - return true; - }, none_se6h4y$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_rjqrz0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_bvy38t$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_l1lu5s$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_355nu0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return false; - } - } - return true; - }), none_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return false; - } - } - return true; - }), none_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_lkiuaf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_lkiuaf$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_8rebxu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_8rebxu$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_pwt076$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_pwt076$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_yv55jc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_yv55jc$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_5c5tpi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_5c5tpi$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_i6ldku$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_i6ldku$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_cutd5o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_cutd5o$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_w96cka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_w96cka$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_nazham$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_nazham$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_9qa3fw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_9qa3fw$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_xe3tfn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_xe3tfn$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_vhxmnd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_vhxmnd$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_r0o6e5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_r0o6e5$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_uzo0it$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_uzo0it$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_nqrynd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_nqrynd$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_gqpg33$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_gqpg33$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_v2dtf3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_v2dtf3$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_1pqzxj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_1pqzxj$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceRight_lkiuaf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_lkiuaf$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_8rebxu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_8rebxu$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_pwt076$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_pwt076$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_yv55jc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_yv55jc$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_5c5tpi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_5c5tpi$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_i6ldku$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_i6ldku$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_cutd5o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_cutd5o$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_w96cka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_w96cka$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_nazham$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_nazham$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRightIndexed_9qa3fw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_9qa3fw$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_xe3tfn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_xe3tfn$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_vhxmnd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_vhxmnd$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_r0o6e5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_r0o6e5$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_uzo0it$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_uzo0it$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_nqrynd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_nqrynd$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_gqpg33$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_gqpg33$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_v2dtf3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_v2dtf3$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_1pqzxj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_1pqzxj$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), sumBy_ri93wo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_ri93wo$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumBy_g2h9c7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_g2h9c7$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_k65ln7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_k65ln7$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_x5ywxf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_x5ywxf$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumBy_uqjqmp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_uqjqmp$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_xtgpn7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_xtgpn7$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_qzyau1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_qzyau1$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_msjyvn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_msjyvn$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_6rox5p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_6rox5p$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_jubvhg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_jubvhg$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumByDouble_wd5ypp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_wd5ypp$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_5p59zj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_5p59zj$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_55ogr5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_55ogr5$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumByDouble_wthnh1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_wthnh1$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_f248nj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_f248nj$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_y6x5hx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_y6x5hx$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_ltfntb$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_ltfntb$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_3iivbz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_3iivbz$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), requireNoNulls_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (element == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + $receiver + "."); - } - } - return Array.isArray(tmp$3 = $receiver) ? tmp$3 : Kotlin.throwCCE(); - }, partition_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_1seo9s$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_jp64to$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_56tpji$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), zip_741p1q$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_nrhj8n$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_ika9yl$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_1nxere$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_7q8x59$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_uckx6b$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_9gp42m$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_yey03l$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_zemuah$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_2rmu0o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_2rmu0o$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_4t7xkx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_4t7xkx$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_em1vhp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_em1vhp$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_uo1iqb$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_uo1iqb$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_9x7n3z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_9x7n3z$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_49cwib$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_49cwib$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_9xp40v$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_9xp40v$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_pnti4b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_pnti4b$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_b8vhfj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_b8vhfj$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_k1u664$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_8bhqlr$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_z4usq1$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_tpkcos$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_lilpnh$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_u6q3av$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_qp49pk$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_4xew8b$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_ia7xj1$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_wdyzkq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_wdyzkq$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_1w04c7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_1w04c7$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_gpk9wx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_gpk9wx$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_i6q5r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_i6q5r$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_4n0ikv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_4n0ikv$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_j1q8tt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_j1q8tt$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_wmo9n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_wmo9n$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_rz83z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_rz83z$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_ha4syt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_ha4syt$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_1033ji$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_phu9d2$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_e0lu4g$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_7caxwu$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_p55a6y$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_bo3qya$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_xju7f2$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_ak8uzy$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_9zfo4u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_9zfo4u$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_xs8ib4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_xs8ib4$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_mp4cls$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_mp4cls$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_83qj9u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_83qj9u$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_kxvwwg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_kxvwwg$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_g1c01a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_g1c01a$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_ujqlps$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_ujqlps$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_grqpda$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_grqpda$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), joinTo_7uchso$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0, tmp$1, tmp$2; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element == null ? "null" : element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_barwct$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_2qnkcz$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_w9i6k3$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0, tmp$1, tmp$2; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_ac0spn$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_a0zr9v$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_5dssjp$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_q1okz1$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_at1d3j$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinToString_qtax42$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_7uchso$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_k0u3cz$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_barwct$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_av5xiv$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_2qnkcz$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_gctiqr$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_w9i6k3$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_kp0x6r$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_ac0spn$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_92s1ft$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_a0zr9v$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_47ib1f$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_5dssjp$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_tyzo35$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_q1okz1$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_d1dl19$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_at1d3j$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, asIterable_eg9ybj$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_eg9ybj$f($receiver)); - }, asIterable_964n92$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_964n92$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_964n92$f($receiver)); - }, asIterable_i2lc78$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_i2lc78$f($receiver)); - }, asIterable_tmsbgp$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_tmsbgp$f($receiver)); - }, asIterable_se6h4y$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_se6h4y$f($receiver)); - }, asIterable_rjqrz0$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_rjqrz0$f($receiver)); - }, asIterable_bvy38t$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_bvy38t$f($receiver)); - }, asIterable_l1lu5s$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_l1lu5s$f($receiver)); - }, asIterable_355nu0$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_355nu0$f($receiver)); - }, asSequence_eg9ybj$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_eg9ybj$f($receiver)); - }, asSequence_964n92$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_964n92$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_964n92$f($receiver)); - }, asSequence_i2lc78$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_i2lc78$f($receiver)); - }, asSequence_tmsbgp$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_tmsbgp$f($receiver)); - }, asSequence_se6h4y$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_se6h4y$f($receiver)); - }, asSequence_rjqrz0$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_rjqrz0$f($receiver)); - }, asSequence_bvy38t$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_bvy38t$f($receiver)); - }, asSequence_l1lu5s$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_l1lu5s$f($receiver)); - }, asSequence_355nu0$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_355nu0$f($receiver)); - }, average_mgx7ed$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_ekmd3j$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_eko7cy$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_r1royx$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_wafl1t$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_hb77ya$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_964n92$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_i2lc78$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_se6h4y$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_rjqrz0$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_bvy38t$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, sum_mgx7ed$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_ekmd3j$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_eko7cy$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_r1royx$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = Kotlin.Long.ZERO; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum = sum.add(element); - } - return sum; - }, sum_wafl1t$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_hb77ya$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_964n92$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_i2lc78$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_se6h4y$:function($receiver) { - var tmp$0; - var sum = Kotlin.Long.ZERO; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum = sum.add(element); - } - return sum; - }, sum_rjqrz0$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_bvy38t$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, component1_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(0); - }), component2_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(1); - }), component3_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(2); - }), component4_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(3); - }), component5_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(4); - }), contains_cwuzrm$:function($receiver, element) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return $receiver.contains_za3rmp$(element); - } - return _.kotlin.collections.indexOf_cwuzrm$($receiver, element) >= 0; - }, elementAt_cwv5p1$f:function(closure$index) { - return function(it) { - throw new Kotlin.IndexOutOfBoundsException("Collection doesn't contain element at index " + closure$index + "."); - }; - }, elementAt_cwv5p1$:function($receiver, index) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.get_za3lpa$(index); - } - return _.kotlin.collections.elementAtOrElse_1h02b4$($receiver, index, _.kotlin.collections.elementAt_cwv5p1$f(index)); - }, elementAt_3iu80n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_3iu80n$", function($receiver, index) { - return $receiver.get_za3lpa$(index); - }), elementAtOrElse_1h02b4$:function($receiver, index, defaultValue) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : defaultValue(index); - } - if (index < 0) { - return defaultValue(index); - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return defaultValue(index); - }, elementAtOrElse_vup1yc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_vup1yc$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : defaultValue(index); - }), elementAtOrNull_cwv5p1$:function($receiver, index) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.getOrNull_3iu80n$($receiver, index); - } - if (index < 0) { - return null; - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return null; - }, elementAtOrNull_3iu80n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_3iu80n$", function($receiver, index) { - return _.kotlin.collections.getOrNull_3iu80n$($receiver, index); - }), find_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_udlcbx$", function($receiver, predicate) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - var tmp$1; - tmp$1 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - var element_0 = $receiver.get_za3lpa$(index); - if (predicate(element_0)) { - return element_0; - } - } - return null; - } - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), findLast_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.get_za3lpa$(index); - if (predicate(element)) { - return element; - } - } - return null; - }), first_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.first_a7ptmv$($receiver); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Collection is empty."); - } - return iterator.next(); - } - }, first_a7ptmv$:function($receiver) { - if ($receiver.isEmpty()) { - throw new Kotlin.NoSuchElementException("List is empty."); - } - return $receiver.get_za3lpa$(0); - }, first_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Collection contains no element matching the predicate."); - }), firstOrNull_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - if ($receiver.isEmpty()) { - return null; - } else { - return $receiver.get_za3lpa$(0); - } - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - return iterator.next(); - } - }, firstOrNull_a7ptmv$:function($receiver) { - return $receiver.isEmpty() ? null : $receiver.get_za3lpa$(0); - }, firstOrNull_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), getOrElse_vup1yc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_vup1yc$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : defaultValue(index); - }), getOrNull_3iu80n$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : null; - }, indexOf_cwuzrm$:function($receiver, element) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.indexOf_za3rmp$(element); - } - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - return index; - } - index++; - } - return-1; - }, indexOf_3iudy2$:function($receiver, element) { - return $receiver.indexOf_za3rmp$(element); - }, indexOfFirst_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_udlcbx$", function($receiver, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - return index; - } - index++; - } - return-1; - }), indexOfFirst_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_ymzesn$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_mwto7b$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver.get_za3lpa$(index))) { - return index; - } - } - return-1; - }), indexOfLast_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_udlcbx$", function($receiver, predicate) { - var tmp$0; - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }), indexOfLast_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver.get_za3lpa$(index))) { - return index; - } - } - return-1; - }), last_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.last_a7ptmv$($receiver); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Collection is empty."); - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - } - }, last_a7ptmv$:function($receiver) { - if ($receiver.isEmpty()) { - throw new Kotlin.NoSuchElementException("List is empty."); - } - return $receiver.get_za3lpa$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver)); - }, last_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_udlcbx$", function($receiver, predicate) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - var tmp$2; - tmp$2 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$2.hasNext()) { - var index = tmp$2.next(); - var element_0 = $receiver.get_za3lpa$(index); - if (predicate(element_0)) { - return element_0; - } - } - throw new Kotlin.NoSuchElementException("List contains no element matching the predicate."); - } - var last = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Collection contains no element matching the predicate."); - } - return(tmp$1 = last) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), last_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.get_za3lpa$(index); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("List contains no element matching the predicate."); - }), lastIndexOf_cwuzrm$:function($receiver, element) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.lastIndexOf_za3rmp$(element); - } - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }, lastIndexOf_3iudy2$:function($receiver, element) { - return $receiver.lastIndexOf_za3rmp$(element); - }, lastOrNull_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.isEmpty() ? null : $receiver.get_za3lpa$($receiver.size - 1); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - } - }, lastOrNull_a7ptmv$:function($receiver) { - return $receiver.isEmpty() ? null : $receiver.get_za3lpa$($receiver.size - 1); - }, lastOrNull_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_udlcbx$", function($receiver, predicate) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - var tmp$1; - tmp$1 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - var element_0 = $receiver.get_za3lpa$(index); - if (predicate(element_0)) { - return element_0; - } - } - return null; - } - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), lastOrNull_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.get_za3lpa$(index); - if (predicate(element)) { - return element; - } - } - return null; - }), single_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.single_a7ptmv$($receiver); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Collection is empty."); - } - var single = iterator.next(); - if (iterator.hasNext()) { - throw new Kotlin.IllegalArgumentException("Collection has more than one element."); - } - return single; - } - }, single_a7ptmv$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("List is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver.get_za3lpa$(0); - } else { - throw new Kotlin.IllegalArgumentException("List has more than one element."); - } - } - return tmp$1; - }, single_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_udlcbx$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Collection contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Collection contains no element matching the predicate."); - } - return(tmp$1 = single) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.size === 1 ? $receiver.get_za3lpa$(0) : null; - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var single = iterator.next(); - if (iterator.hasNext()) { - return null; - } - return single; - } - }, singleOrNull_a7ptmv$:function($receiver) { - return $receiver.size === 1 ? $receiver.get_za3lpa$(0) : null; - }, singleOrNull_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_udlcbx$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_cwv5p1$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var list; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - var resultSize = $receiver.size - n; - if (resultSize <= 0) { - return _.kotlin.collections.emptyList(); - } - list = new Kotlin.ArrayList(resultSize); - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - tmp$0 = $receiver.size - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver.get_za3lpa$(index)); - } - return list; - } - } else { - list = new Kotlin.ArrayList; - } - var count = 0; - tmp$1 = $receiver.iterator(); - while (tmp$1.hasNext()) { - var item = tmp$1.next(); - if (count++ >= n) { - list.add_za3rmp$(item); - } - } - return list; - }, dropLast_3iu80n$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_cwv5p1$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.size - n, 0)); - }, dropLastWhile_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.get_za3lpa$(index))) { - return _.kotlin.collections.take_cwv5p1$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropWhile_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_udlcbx$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), filter_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_udlcbx$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterIndexed_6wagxu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_6wagxu$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_ej6hz7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_ej6hz7$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterNot_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_udlcbx$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotNull_q5oq31$:function($receiver) { - return _.kotlin.collections.filterNotNullTo_xc5ofo$($receiver, new Kotlin.ArrayList); - }, filterNotNullTo_xc5ofo$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element != null) { - destination.add_za3rmp$(element); - } - } - return destination; - }, filterNotTo_u1o9so$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_u1o9so$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_u1o9so$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_u1o9so$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), slice_smmin4$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - return _.kotlin.collections.toList_q5oq31$($receiver.subList_vux9f0$(indices.start, indices.endInclusive + 1)); - }, slice_5fse6p$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver.get_za3lpa$(index)); - } - return list; - }, take_cwv5p1$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) && n >= $receiver.size) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, takeLast_3iu80n$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.size; - if (n >= size) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver.get_za3lpa$(index)); - } - return list; - }, takeLastWhile_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.get_za3lpa$(index))) { - return _.kotlin.collections.drop_cwv5p1$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_q5oq31$($receiver); - }), takeWhile_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_udlcbx$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), reverse_sqtfhv$:function($receiver) { - _.java.util.Collections.reverse_heioe9$($receiver); - }, reversed_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) && $receiver.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_q5oq31$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, sortBy_an8rl9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortBy_an8rl9$", function($receiver, selector) { - if ($receiver.size > 1) { - _.kotlin.collections.sortWith_lcufbu$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - } - }), sortByDescending_an8rl9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortByDescending_an8rl9$", function($receiver, selector) { - if ($receiver.size > 1) { - _.kotlin.collections.sortWith_lcufbu$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - } - }), sortDescending_h06zi1$:function($receiver) { - _.kotlin.collections.sortWith_lcufbu$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sorted_349qs3$:function($receiver) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - if ($receiver.size <= 1) { - return _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - var $receiver_0 = Array.isArray(tmp$0 = Kotlin.copyToArray($receiver)) ? tmp$0 : Kotlin.throwCCE(); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - } - var $receiver_1 = _.kotlin.collections.toMutableList_q5oq31$($receiver); - _.kotlin.collections.sort_h06zi1$($receiver_1); - return $receiver_1; - }, sortedBy_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_l82ugp$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_7dpn5g$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedByDescending_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_l82ugp$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_7dpn5g$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedDescending_349qs3$:function($receiver) { - return _.kotlin.collections.sortedWith_7dpn5g$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortedWith_7dpn5g$:function($receiver, comparator) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - if ($receiver.size <= 1) { - return _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - var $receiver_0 = Array.isArray(tmp$0 = Kotlin.copyToArray($receiver)) ? tmp$0 : Kotlin.throwCCE(); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - } - var $receiver_1 = _.kotlin.collections.toMutableList_q5oq31$($receiver); - _.kotlin.collections.sortWith_lcufbu$($receiver_1, comparator); - return $receiver_1; - }, toBooleanArray_82yf0d$:function($receiver) { - var tmp$0; - var result = Kotlin.booleanArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toByteArray_lg9v1$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toCharArray_stj23$:function($receiver) { - var tmp$0; - var result = Kotlin.charArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toDoubleArray_d8u8cq$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toFloatArray_2vwy1$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toIntArray_n17x8q$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toLongArray_56arfl$:function($receiver) { - var tmp$0; - var result = Kotlin.longArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toShortArray_o8y0rt$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, associate_l9f2x3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_l9f2x3$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_fcza0h$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_qadzix$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_qadzix$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_57hlw1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_57hlw1$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_8dch1j$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_8dch1j$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_j5xf4p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_j5xf4p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_xc5ofo$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_q5oq31$:function($receiver) { - return _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.ComplexHashSet(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 12)))); - }, toList_q5oq31$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$(Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? $receiver.get_za3lpa$(0) : $receiver.iterator().next()); - } else { - tmp$1 = _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - } - return tmp$1; - } - return _.kotlin.collections.optimizeReadOnlyList(_.kotlin.collections.toMutableList_q5oq31$($receiver)); - }, toMutableList_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - return _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.ArrayList); - }, toMutableList_mwto7b$:function($receiver) { - return _.java.util.ArrayList_wtfk93$($receiver); - }, toSet_q5oq31$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$(Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? $receiver.get_za3lpa$(0) : $receiver.iterator().next()); - } else { - tmp$1 = _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size))); - } - } - return tmp$1; - } - return _.kotlin.collections.optimizeReadOnlySet(_.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.LinkedHashSet)); - }, flatMap_pwhhp2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_pwhhp2$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_k30zm7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_k30zm7$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), groupBy_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_fcza0h$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_qadzix$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_qadzix$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_i7ktse$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_i7ktse$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_t445s6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_t445s6$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_fcza0h$", function($receiver, transform) { - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapIndexed_kgzjie$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_kgzjie$", function($receiver, transform) { - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)); - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedNotNull_kgzjie$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNull_kgzjie$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedNotNullTo_9rrt4x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNullTo_9rrt4x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedTo_9rrt4x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_9rrt4x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNull_fcza0h$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapNotNullTo_nzn0z0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNullTo_nzn0z0$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_nzn0z0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_nzn0z0$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_q5oq31$f:function(this$withIndex) { - return function() { - return this$withIndex.iterator(); - }; - }, withIndex_q5oq31$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_q5oq31$f($receiver)); - }, distinct_q5oq31$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_q5oq31$($receiver)); - }, distinctBy_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_fcza0h$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), intersect_71wgqg$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_q5oq31$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, subtract_71wgqg$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_q5oq31$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, toMutableSet_q5oq31$:function($receiver) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = _.java.util.LinkedHashSet_wtfk93$($receiver); - } else { - tmp$0 = _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.LinkedHashSet); - } - return tmp$0; - }, union_71wgqg$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_q5oq31$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, all_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_q5oq31$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_q5oq31$:function($receiver) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - count++; - } - return count; - }, count_mwto7b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_mwto7b$", function($receiver) { - return $receiver.size; - }), count_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_udlcbx$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_x36ydg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_x36ydg$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_a212pb$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_a212pb$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldRight_18gea8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_18gea8$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver.get_za3lpa$(index--), accumulator); - } - return accumulator; - }), foldRightIndexed_77874r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_77874r$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver.get_za3lpa$(index), accumulator); - --index; - } - return accumulator; - }), forEach_lcecrh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_lcecrh$", function($receiver, action) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_4yeaaa$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_4yeaaa$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_349qs3$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(max, e) < 0) { - max = e; - } - } - return max; - }, maxBy_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_l82ugp$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var maxElem = iterator.next(); - var maxValue = selector(maxElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_7dpn5g$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_349qs3$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(min, e) > 0) { - min = e; - } - } - return min; - }, minBy_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_l82ugp$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var minElem = iterator.next(); - var minValue = selector(minElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_7dpn5g$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_q5oq31$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_fsnvh9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_fsnvh9$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty collection can't be reduced."); - } - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(accumulator, iterator.next()); - } - return accumulator; - }), reduceIndexed_3edsso$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_3edsso$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty collection can't be reduced."); - } - var index = 1; - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(index++, accumulator, iterator.next()); - } - return accumulator; - }), reduceRight_mue0zz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_mue0zz$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty list can't be reduced."); - } - var accumulator = $receiver.get_za3lpa$(index--); - while (index >= 0) { - accumulator = operation($receiver.get_za3lpa$(index--), accumulator); - } - return accumulator; - }), reduceRightIndexed_4tyq1o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_4tyq1o$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty list can't be reduced."); - } - var accumulator = $receiver.get_za3lpa$(index--); - while (index >= 0) { - accumulator = operation(index, $receiver.get_za3lpa$(index), accumulator); - --index; - } - return accumulator; - }), sumBy_fcu68k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_fcu68k$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_jaowxc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_jaowxc$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), requireNoNulls_q5oq31$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + $receiver + "."); - } - } - return Kotlin.isType(tmp$1 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Iterable) ? tmp$1 : Kotlin.throwCCE(); - }, requireNoNulls_a7ptmv$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + $receiver + "."); - } - } - return Kotlin.isType(tmp$1 = $receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? tmp$1 : Kotlin.throwCCE(); - }, minus_cwuzrm$:function($receiver, element) { - var result = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)); - var removed = {v:false}; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element_0 = tmp$0.next(); - var minus_cwuzrm$f$result; - if (!removed.v && Kotlin.equals(element_0, element)) { - removed.v = true; - minus_cwuzrm$f$result = false; - } else { - minus_cwuzrm$f$result = true; - } - if (minus_cwuzrm$f$result) { - result.add_za3rmp$(element_0); - } - } - return result; - }, minus_uspeym$:function($receiver, elements) { - if (elements.length === 0) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var other = _.kotlin.collections.toHashSet_eg9ybj$(elements); - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }, minus_71wgqg$:function($receiver, elements) { - var other = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - if (other.isEmpty()) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }, minus_81az5y$:function($receiver, elements) { - var other = _.kotlin.sequences.toHashSet_uya9q7$(elements); - if (other.isEmpty()) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }, minusElement_cwuzrm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusElement_cwuzrm$", function($receiver, element) { - return _.kotlin.collections.minus_cwuzrm$($receiver, element); - }), partition_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_udlcbx$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), plus_cwuzrm$:function($receiver, element) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.plus_ukps2u$($receiver, element); - } - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - result.add_za3rmp$(element); - return result; - }, plus_ukps2u$:function($receiver, element) { - var result = new Kotlin.ArrayList($receiver.size + 1); - result.addAll_wtfk93$($receiver); - result.add_za3rmp$(element); - return result; - }, plus_uspeym$:function($receiver, elements) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.plus_b3ixii$($receiver, elements); - } - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - _.kotlin.collections.addAll_jzhv38$(result, elements); - return result; - }, plus_b3ixii$:function($receiver, elements) { - var result = new Kotlin.ArrayList($receiver.size + elements.length); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_jzhv38$(result, elements); - return result; - }, plus_71wgqg$:function($receiver, elements) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.plus_hfjk0c$($receiver, elements); - } - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - _.kotlin.collections.addAll_fwwv5a$(result, elements); - return result; - }, plus_hfjk0c$:function($receiver, elements) { - if (Kotlin.isType(elements, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - var result = new Kotlin.ArrayList($receiver.size + elements.size); - result.addAll_wtfk93$($receiver); - result.addAll_wtfk93$(elements); - return result; - } else { - var result_0 = _.java.util.ArrayList_wtfk93$($receiver); - _.kotlin.collections.addAll_fwwv5a$(result_0, elements); - return result_0; - } - }, plus_81az5y$:function($receiver, elements) { - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - _.kotlin.collections.addAll_h3qeu8$(result, elements); - return result; - }, plus_9axfq2$:function($receiver, elements) { - var result = new Kotlin.ArrayList($receiver.size + 10); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_h3qeu8$(result, elements); - return result; - }, plusElement_cwuzrm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_cwuzrm$", function($receiver, element) { - return _.kotlin.collections.plus_cwuzrm$($receiver, element); - }), plusElement_ukps2u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_ukps2u$", function($receiver, element) { - return _.kotlin.collections.plus_ukps2u$($receiver, element); - }), zip_uspeym$:function($receiver, other) { - var tmp$0; - var arraySize = other.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), arraySize)); - var i = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$(element, other[i++])); - } - return list; - }, zip_6hx15g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_6hx15g$", function($receiver, other, transform) { - var tmp$0; - var arraySize = other.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), arraySize)); - var i = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform(element, other[i++])); - } - return list; - }), zip_71wgqg$:function($receiver, other) { - var first = $receiver.iterator(); - var second = other.iterator(); - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), _.kotlin.collections.collectionSizeOrDefault(other, 10))); - while (first.hasNext() && second.hasNext()) { - list.add_za3rmp$(_.kotlin.to_l1ob02$(first.next(), second.next())); - } - return list; - }, zip_aqs41e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_aqs41e$", function($receiver, other, transform) { - var first = $receiver.iterator(); - var second = other.iterator(); - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), _.kotlin.collections.collectionSizeOrDefault(other, 10))); - while (first.hasNext() && second.hasNext()) { - list.add_za3rmp$(transform(first.next(), second.next())); - } - return list; - }), joinTo_euycuk$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element == null ? "null" : element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinToString_ld60a2$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_euycuk$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, asIterable_q5oq31$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asIterable_q5oq31$", function($receiver) { - return $receiver; - }), asSequence_q5oq31$f:function(this$asSequence) { - return function() { - return this$asSequence.iterator(); - }; - }, asSequence_q5oq31$:function($receiver) { - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_q5oq31$f($receiver)); - }, average_sx0vjz$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_fr8z0d$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_q1ah1m$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_oc6dzf$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_8et4tf$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_y4pxme$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, sum_sx0vjz$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_fr8z0d$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_q1ah1m$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_oc6dzf$:function($receiver) { - var tmp$0; - var sum = Kotlin.Long.ZERO; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum = sum.add(element); - } - return sum; - }, sum_8et4tf$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_y4pxme$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, toList_efxzmg$:function($receiver) { - if ($receiver.size === 0) { - return _.kotlin.collections.emptyList(); - } - var iterator = $receiver.entries.iterator(); - if (!iterator.hasNext()) { - return _.kotlin.collections.emptyList(); - } - var first = iterator.next(); - if (!iterator.hasNext()) { - return _.kotlin.collections.listOf_za3rmp$(new _.kotlin.Pair(first.key, first.value)); - } - var result = new Kotlin.ArrayList($receiver.size); - result.add_za3rmp$(new _.kotlin.Pair(first.key, first.value)); - do { - var $receiver_0 = iterator.next(); - result.add_za3rmp$(new _.kotlin.Pair($receiver_0.key, $receiver_0.value)); - } while (iterator.hasNext()); - return result; - }, flatMap_yh70lg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_yh70lg$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_5n3275$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_5n3275$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), map_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.size); - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapNotNull_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNull_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapNotNullTo_v1ibx8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNullTo_v1ibx8$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_v1ibx8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_v1ibx8$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), all_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_oixulp$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_efxzmg$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_oixulp$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_efxzmg$", function($receiver) { - return $receiver.size; - }), count_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_oixulp$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), forEach_8umwe5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_8umwe5$", function($receiver, action) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), maxBy_dubjrn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_dubjrn$", function($receiver, selector) { - var iterator = $receiver.entries.iterator(); - if (!iterator.hasNext()) { - return null; - } - var maxElem = iterator.next(); - var maxValue = selector(maxElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_9gigyu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxWith_9gigyu$", function($receiver, comparator) { - return _.kotlin.collections.maxWith_7dpn5g$($receiver.entries, comparator); - }), minBy_dubjrn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_dubjrn$", function($receiver, selector) { - var iterator = $receiver.entries.iterator(); - if (!iterator.hasNext()) { - return null; - } - var minElem = iterator.next(); - var minValue = selector(minElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_9gigyu$:function($receiver, comparator) { - return _.kotlin.collections.minWith_7dpn5g$($receiver.entries, comparator); - }, none_efxzmg$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_oixulp$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), asIterable_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asIterable_efxzmg$", function($receiver) { - return $receiver.entries; - }), asSequence_efxzmg$f:function(this$asSequence) { - return function() { - return this$asSequence.entries.iterator(); - }; - }, asSequence_efxzmg$:function($receiver) { - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_efxzmg$f($receiver)); - }, minus_bfnyky$:function($receiver, element) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size)); - var removed = {v:false}; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element_0 = tmp$0.next(); - var minus_bfnyky$f$result; - if (!removed.v && Kotlin.equals(element_0, element)) { - removed.v = true; - minus_bfnyky$f$result = false; - } else { - minus_bfnyky$f$result = true; - } - if (minus_bfnyky$f$result) { - result.add_za3rmp$(element_0); - } - } - return result; - }, minus_bs0yn6$:function($receiver, elements) { - var result = _.java.util.LinkedHashSet_wtfk93$($receiver); - _.kotlin.collections.removeAll_jzhv38$(result, elements); - return result; - }, minus_rp2n1o$:function($receiver, elements) { - var other = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - if (other.isEmpty()) { - return _.kotlin.collections.toSet_q5oq31$($receiver); - } - if (Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.Set)) { - var destination = new Kotlin.LinkedHashSet; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - } - var result = _.java.util.LinkedHashSet_wtfk93$($receiver); - result.removeAll_wtfk93$(other); - return result; - }, minus_w7ip9a$:function($receiver, elements) { - var result = _.java.util.LinkedHashSet_wtfk93$($receiver); - _.kotlin.collections.removeAll_h3qeu8$(result, elements); - return result; - }, minusElement_bfnyky$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusElement_bfnyky$", function($receiver, element) { - return _.kotlin.collections.minus_bfnyky$($receiver, element); - }), plus_bfnyky$:function($receiver, element) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size + 1)); - result.addAll_wtfk93$($receiver); - result.add_za3rmp$(element); - return result; - }, plus_bs0yn6$:function($receiver, elements) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size + elements.length)); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_jzhv38$(result, elements); - return result; - }, plus_rp2n1o$:function($receiver, elements) { - var tmp$0, tmp$1; - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity((tmp$1 = (tmp$0 = _.kotlin.collections.collectionSizeOrNull(elements)) != null ? $receiver.size + tmp$0 : null) != null ? tmp$1 : $receiver.size * 2)); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_fwwv5a$(result, elements); - return result; - }, plus_w7ip9a$:function($receiver, elements) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size * 2)); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_h3qeu8$(result, elements); - return result; - }, plusElement_bfnyky$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_bfnyky$", function($receiver, element) { - return _.kotlin.collections.plus_bfnyky$($receiver, element); - }), State:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{Ready:function() { - return new _.kotlin.collections.State; - }, NotReady:function() { - return new _.kotlin.collections.State; - }, Done:function() { - return new _.kotlin.collections.State; - }, Failed:function() { - return new _.kotlin.collections.State; - }}; - }), AbstractIterator:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function() { - this.state_v5kh2x$ = _.kotlin.collections.State.NotReady; - this.nextValue_tlc62$ = null; - }, {hasNext:function() { - var tmp$0, tmp$1; - if (!(this.state_v5kh2x$ !== _.kotlin.collections.State.Failed)) { - var message = "Failed requirement."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - tmp$0 = this.state_v5kh2x$; - if (tmp$0 === _.kotlin.collections.State.Done) { - tmp$1 = false; - } else { - if (tmp$0 === _.kotlin.collections.State.Ready) { - tmp$1 = true; - } else { - tmp$1 = this.tryToComputeNext(); - } - } - return tmp$1; - }, next:function() { - var tmp$0; - if (!this.hasNext()) { - throw new Kotlin.NoSuchElementException; - } - this.state_v5kh2x$ = _.kotlin.collections.State.NotReady; - return(tmp$0 = this.nextValue_tlc62$) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }, tryToComputeNext:function() { - this.state_v5kh2x$ = _.kotlin.collections.State.Failed; - this.computeNext(); - return this.state_v5kh2x$ === _.kotlin.collections.State.Ready; - }, setNext_za3rmp$:function(value) { - this.nextValue_tlc62$ = value; - this.state_v5kh2x$ = _.kotlin.collections.State.Ready; - }, done:function() { - this.state_v5kh2x$ = _.kotlin.collections.State.Done; - }}), flatten_vrdqc4$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var tmp$5, tmp$3, tmp$4; - var sum = 0; - tmp$5 = $receiver, tmp$3 = tmp$5.length; - for (var tmp$4 = 0;tmp$4 !== tmp$3;++tmp$4) { - var element_0 = tmp$5[tmp$4]; - sum += element_0.length; - } - var result = new Kotlin.ArrayList(sum); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.addAll_jzhv38$(result, element); - } - return result; - }, unzip_sq63gn$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var listT = new Kotlin.ArrayList($receiver.length); - var listR = new Kotlin.ArrayList($receiver.length); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var pair = tmp$0[tmp$2]; - listT.add_za3rmp$(pair.first); - listR.add_za3rmp$(pair.second); - } - return _.kotlin.to_l1ob02$(listT, listR); - }, EmptyIterator:Kotlin.createObject(function() { - return[Kotlin.modules["builtins"].kotlin.collections.ListIterator]; - }, null, {hasNext:function() { - return false; - }, hasPrevious:function() { - return false; - }, nextIndex:function() { - return 0; - }, previousIndex:function() { - return-1; - }, next:function() { - throw new Kotlin.NoSuchElementException; - }, previous:function() { - throw new Kotlin.NoSuchElementException; - }}), EmptyList:Kotlin.createObject(function() { - return[Kotlin.RandomAccess, _.java.io.Serializable, Kotlin.modules["builtins"].kotlin.collections.List]; - }, function() { - this.serialVersionUID_jwftuz$ = new Kotlin.Long(-1478467534, -1720727600); - }, {equals_za3rmp$:function(other) { - return Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.List) && other.isEmpty(); - }, hashCode:function() { - return 1; - }, toString:function() { - return "[]"; - }, size:{get:function() { - return 0; - }}, isEmpty:function() { - return true; - }, contains_za3rmp$:function(element) { - return false; - }, containsAll_wtfk93$:function(elements) { - return elements.isEmpty(); - }, get_za3lpa$:function(index) { - throw new Kotlin.IndexOutOfBoundsException("Empty list doesn't contain element at index " + index + "."); - }, indexOf_za3rmp$:function(element) { - return-1; - }, lastIndexOf_za3rmp$:function(element) { - return-1; - }, iterator:function() { - return _.kotlin.collections.EmptyIterator; - }, listIterator:function() { - return _.kotlin.collections.EmptyIterator; - }, listIterator_za3lpa$:function(index) { - if (index !== 0) { - throw new Kotlin.IndexOutOfBoundsException("Index: " + index); - } - return _.kotlin.collections.EmptyIterator; - }, subList_vux9f0$:function(fromIndex, toIndex) { - if (fromIndex === 0 && toIndex === 0) { - return this; - } - throw new Kotlin.IndexOutOfBoundsException("fromIndex: " + fromIndex + ", toIndex: " + toIndex); - }, readResolve:function() { - return _.kotlin.collections.EmptyList; - }}), asCollection:function($receiver) { - return new _.kotlin.collections.ArrayAsCollection($receiver, false); - }, ArrayAsCollection:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Collection]; - }, function(values, isVarargs) { - this.values = values; - this.isVarargs = isVarargs; - }, {size:{get:function() { - return this.values.length; - }}, isEmpty:function() { - return this.values.length === 0; - }, contains_za3rmp$:function(element) { - return _.kotlin.collections.contains_ke19y6$(this.values, element); - }, containsAll_wtfk93$:function(elements) { - var tmp$0; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!this.contains_za3rmp$(element)) { - return false; - } - } - return true; - }, iterator:function() { - return Kotlin.arrayIterator(this.values); - }, toArray:function() { - return this.isVarargs ? this.values : this.values.slice(); - }}, {}), emptyList:function() { - return _.kotlin.collections.EmptyList; - }, listOf_9mqe4v$:function(elements) { - return elements.length > 0 ? _.kotlin.collections.asList_eg9ybj$(elements) : _.kotlin.collections.emptyList(); - }, listOf:Kotlin.defineInlineFunction("stdlib.kotlin.collections.listOf", function() { - return _.kotlin.collections.emptyList(); - }), mutableListOf_9mqe4v$:function(elements) { - return elements.length === 0 ? new Kotlin.ArrayList : _.java.util.ArrayList_wtfk93$(new _.kotlin.collections.ArrayAsCollection(elements, true)); - }, arrayListOf_9mqe4v$:function(elements) { - return elements.length === 0 ? new Kotlin.ArrayList : _.java.util.ArrayList_wtfk93$(new _.kotlin.collections.ArrayAsCollection(elements, true)); - }, listOfNotNull_za3rmp$:function(element) { - return element != null ? _.kotlin.collections.listOf_za3rmp$(element) : _.kotlin.collections.emptyList(); - }, listOfNotNull_9mqe4v$:function(elements) { - return _.kotlin.collections.filterNotNull_eg9ybj$(elements); - }, get_indices_mwto7b$:{value:function($receiver) { - return new Kotlin.NumberRange(0, $receiver.size - 1); - }}, get_lastIndex_a7ptmv$:{value:function($receiver) { - return $receiver.size - 1; - }}, isNotEmpty_mwto7b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_mwto7b$", function($receiver) { - return!$receiver.isEmpty(); - }), orEmpty_mwto7b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_mwto7b$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptyList(); - }), orEmpty_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_a7ptmv$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptyList(); - }), containsAll_2px7j4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.containsAll_2px7j4$", function($receiver, elements) { - return $receiver.containsAll_wtfk93$(elements); - }), optimizeReadOnlyList:function($receiver) { - var tmp$0; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - return _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - return _.kotlin.collections.listOf_za3rmp$($receiver.get_za3lpa$(0)); - } else { - return $receiver; - } - } - }, binarySearch_i1wy23$:function($receiver, element, fromIndex, toIndex) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - _.kotlin.collections.rangeCheck($receiver.size, fromIndex, toIndex); - var low = fromIndex; - var high = toIndex - 1; - while (low <= high) { - var mid = low + high >>> 1; - var midVal = $receiver.get_za3lpa$(mid); - var cmp = _.kotlin.comparisons.compareValues_cj5vqg$(midVal, element); - if (cmp < 0) { - low = mid + 1; - } else { - if (cmp > 0) { - high = mid - 1; - } else { - return mid; - } - } - } - return-(low + 1); - }, binarySearch_1open$:function($receiver, element, comparator, fromIndex, toIndex) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - _.kotlin.collections.rangeCheck($receiver.size, fromIndex, toIndex); - var low = fromIndex; - var high = toIndex - 1; - while (low <= high) { - var mid = low + high >>> 1; - var midVal = $receiver.get_za3lpa$(mid); - var cmp = comparator.compare(midVal, element); - if (cmp < 0) { - low = mid + 1; - } else { - if (cmp > 0) { - high = mid - 1; - } else { - return mid; - } - } - } - return-(low + 1); - }, binarySearchBy_uuu8x$f:function(closure$selector, closure$key) { - return function(it) { - return _.kotlin.comparisons.compareValues_cj5vqg$(closure$selector(it), closure$key); - }; - }, binarySearchBy_uuu8x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.binarySearchBy_uuu8x$", function($receiver, key, fromIndex, toIndex, selector) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - return _.kotlin.collections.binarySearch_e4ogxs$($receiver, fromIndex, toIndex, _.kotlin.collections.binarySearchBy_uuu8x$f(selector, key)); - }), binarySearch_e4ogxs$:function($receiver, fromIndex, toIndex, comparison) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - _.kotlin.collections.rangeCheck($receiver.size, fromIndex, toIndex); - var low = fromIndex; - var high = toIndex - 1; - while (low <= high) { - var mid = low + high >>> 1; - var midVal = $receiver.get_za3lpa$(mid); - var cmp = comparison(midVal); - if (cmp < 0) { - low = mid + 1; - } else { - if (cmp > 0) { - high = mid - 1; - } else { - return mid; - } - } - } - return-(low + 1); - }, rangeCheck:function(size, fromIndex, toIndex) { - if (fromIndex > toIndex) { - throw new Kotlin.IllegalArgumentException("fromIndex (" + fromIndex + ") is greater than toIndex (" + toIndex + ")."); - } else { - if (fromIndex < 0) { - throw new Kotlin.IndexOutOfBoundsException("fromIndex (" + fromIndex + ") is less than zero."); - } else { - if (toIndex > size) { - throw new Kotlin.IndexOutOfBoundsException("toIndex (" + toIndex + ") is greater than size (" + size + ")."); - } - } - } - }, IndexedValue:Kotlin.createClass(null, function(index, value) { - this.index = index; - this.value = value; - }, {component1:function() { - return this.index; - }, component2:function() { - return this.value; - }, copy_vux3hl$:function(index, value) { - return new _.kotlin.collections.IndexedValue(index === void 0 ? this.index : index, value === void 0 ? this.value : value); - }, toString:function() { - return "IndexedValue(index\x3d" + Kotlin.toString(this.index) + (", value\x3d" + Kotlin.toString(this.value)) + ")"; - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.index) | 0; - result = result * 31 + Kotlin.hashCode(this.value) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.index, other.index) && Kotlin.equals(this.value, other.value)))); - }}), Iterable$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(closure$iterator_0) { - this.closure$iterator_0 = closure$iterator_0; - }, {iterator:function() { - return this.closure$iterator_0(); - }}, {}), Iterable_kxhynv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.Iterable_kxhynv$", function(iterator) { - return new _.kotlin.collections.Iterable$f(iterator); - }), IndexingIterable:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(iteratorFactory) { - this.iteratorFactory_fvkcba$ = iteratorFactory; - }, {iterator:function() { - return new _.kotlin.collections.IndexingIterator(this.iteratorFactory_fvkcba$()); - }}), collectionSizeOrNull:function($receiver) { - return Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) ? $receiver.size : null; - }, collectionSizeOrDefault:function($receiver, default_0) { - return Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) ? $receiver.size : default_0; - }, safeToConvertToSet:function($receiver) { - return $receiver.size > 2 && Kotlin.isType($receiver, Kotlin.ArrayList); - }, convertToSetForSetOperationWith:function($receiver, source) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Set)) { - return $receiver; - } else { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - if (Kotlin.isType(source, Kotlin.modules["builtins"].kotlin.collections.Collection) && source.size < 2) { - return $receiver; - } else { - return _.kotlin.collections.safeToConvertToSet($receiver) ? _.kotlin.collections.toHashSet_q5oq31$($receiver) : $receiver; - } - } else { - return _.kotlin.collections.toHashSet_q5oq31$($receiver); - } - } - }, convertToSetForSetOperation:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Set)) { - return $receiver; - } else { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.safeToConvertToSet($receiver) ? _.kotlin.collections.toHashSet_q5oq31$($receiver) : $receiver; - } else { - return _.kotlin.collections.toHashSet_q5oq31$($receiver); - } - } - }, flatten_ryy49w$:function($receiver) { - var tmp$0; - var result = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.addAll_fwwv5a$(result, element); - } - return result; - }, unzip_mnrzhp$:function($receiver) { - var tmp$0; - var expectedSize = _.kotlin.collections.collectionSizeOrDefault($receiver, 10); - var listT = new Kotlin.ArrayList(expectedSize); - var listR = new Kotlin.ArrayList(expectedSize); - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var pair = tmp$0.next(); - listT.add_za3rmp$(pair.first); - listR.add_za3rmp$(pair.second); - } - return _.kotlin.to_l1ob02$(listT, listR); - }, iterator_123wqf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.iterator_123wqf$", function($receiver) { - return $receiver; - }), withIndex_123wqf$:function($receiver) { - return new _.kotlin.collections.IndexingIterator($receiver); - }, forEach_3ydtzt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_3ydtzt$", function($receiver, operation) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_123wqf$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - operation(element); - } - }), IndexingIterator:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(iterator) { - this.iterator_qhnuqw$ = iterator; - this.index_9l0vtk$ = 0; - }, {hasNext:function() { - return this.iterator_qhnuqw$.hasNext(); - }, next:function() { - return new _.kotlin.collections.IndexedValue(this.index_9l0vtk$++, this.iterator_qhnuqw$.next()); - }}), getValue_lromyx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getValue_lromyx$", function($receiver, thisRef, property) { - var tmp$0; - return(tmp$0 = _.kotlin.collections.getOrImplicitDefault($receiver, property.name)) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }), getValue_pmw3g1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getValue_pmw3g1$", function($receiver, thisRef, property) { - var tmp$0; - return(tmp$0 = _.kotlin.collections.getOrImplicitDefault($receiver, property.name)) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }), setValue_vfsqka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.setValue_vfsqka$", function($receiver, thisRef, property, value) { - $receiver.put_wn2jw4$(property.name, value); - }), getOrImplicitDefault:function($receiver, key) { - if (Kotlin.isType($receiver, _.kotlin.collections.MapWithDefault)) { - return $receiver.getOrImplicitDefault_za3rmp$(key); - } - var tmp$0; - var value = $receiver.get_za3rmp$(key); - if (value == null && !$receiver.containsKey_za3rmp$(key)) { - throw new Kotlin.NoSuchElementException("Key " + key + " is missing in the map."); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }, withDefault_86p62k$:function($receiver, defaultValue) { - if (Kotlin.isType($receiver, _.kotlin.collections.MapWithDefault)) { - return _.kotlin.collections.withDefault_86p62k$($receiver.map, defaultValue); - } else { - return new _.kotlin.collections.MapWithDefaultImpl($receiver, defaultValue); - } - }, withDefault_g6ll1e$:function($receiver, defaultValue) { - if (Kotlin.isType($receiver, _.kotlin.collections.MutableMapWithDefault)) { - return _.kotlin.collections.withDefault_g6ll1e$($receiver.map, defaultValue); - } else { - return new _.kotlin.collections.MutableMapWithDefaultImpl($receiver, defaultValue); - } - }, MapWithDefault:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Map]; - }), MutableMapWithDefault:Kotlin.createTrait(function() { - return[_.kotlin.collections.MapWithDefault, Kotlin.modules["builtins"].kotlin.collections.MutableMap]; - }), MapWithDefaultImpl:Kotlin.createClass(function() { - return[_.kotlin.collections.MapWithDefault]; - }, function(map, default_0) { - this.$map_5wo5ir$ = map; - this.default_61dz8o$ = default_0; - }, {map:{get:function() { - return this.$map_5wo5ir$; - }}, equals_za3rmp$:function(other) { - return Kotlin.equals(this.map, other); - }, hashCode:function() { - return Kotlin.hashCode(this.map); - }, toString:function() { - return this.map.toString(); - }, size:{get:function() { - return this.map.size; - }}, isEmpty:function() { - return this.map.isEmpty(); - }, containsKey_za3rmp$:function(key) { - return this.map.containsKey_za3rmp$(key); - }, containsValue_za3rmp$:function(value) { - return this.map.containsValue_za3rmp$(value); - }, get_za3rmp$:function(key) { - return this.map.get_za3rmp$(key); - }, keys:{get:function() { - return this.map.keys; - }}, values:{get:function() { - return this.map.values; - }}, entries:{get:function() { - return this.map.entries; - }}, getOrImplicitDefault_za3rmp$:function(key) { - var tmp$0; - var value = this.map.get_za3rmp$(key); - if (value == null && !this.map.containsKey_za3rmp$(key)) { - return this.default_61dz8o$(key); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }}, {}), MutableMapWithDefaultImpl:Kotlin.createClass(function() { - return[_.kotlin.collections.MutableMapWithDefault]; - }, function(map, default_0) { - this.$map_6ju9n7$ = map; - this.default_vonn6a$ = default_0; - }, {map:{get:function() { - return this.$map_6ju9n7$; - }}, equals_za3rmp$:function(other) { - return Kotlin.equals(this.map, other); - }, hashCode:function() { - return Kotlin.hashCode(this.map); - }, toString:function() { - return this.map.toString(); - }, size:{get:function() { - return this.map.size; - }}, isEmpty:function() { - return this.map.isEmpty(); - }, containsKey_za3rmp$:function(key) { - return this.map.containsKey_za3rmp$(key); - }, containsValue_za3rmp$:function(value) { - return this.map.containsValue_za3rmp$(value); - }, get_za3rmp$:function(key) { - return this.map.get_za3rmp$(key); - }, keys:{get:function() { - return this.map.keys; - }}, values:{get:function() { - return this.map.values; - }}, entries:{get:function() { - return this.map.entries; - }}, put_wn2jw4$:function(key, value) { - return this.map.put_wn2jw4$(key, value); - }, remove_za3rmp$:function(key) { - return this.map.remove_za3rmp$(key); - }, putAll_r12sna$:function(from) { - this.map.putAll_r12sna$(from); - }, clear:function() { - this.map.clear(); - }, getOrImplicitDefault_za3rmp$:function(key) { - var tmp$0; - var value = this.map.get_za3rmp$(key); - if (value == null && !this.map.containsKey_za3rmp$(key)) { - return this.default_vonn6a$(key); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }}, {}), EmptyMap:Kotlin.createObject(function() { - return[_.java.io.Serializable, Kotlin.modules["builtins"].kotlin.collections.Map]; - }, null, {equals_za3rmp$:function(other) { - return Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.Map) && other.isEmpty(); - }, hashCode:function() { - return 0; - }, toString:function() { - return "{}"; - }, size:{get:function() { - return 0; - }}, isEmpty:function() { - return true; - }, containsKey_za3rmp$:function(key) { - return false; - }, containsValue_za3rmp$:function(value) { - return false; - }, get_za3rmp$:function(key) { - return null; - }, entries:{get:function() { - return _.kotlin.collections.EmptySet; - }}, keys:{get:function() { - return _.kotlin.collections.EmptySet; - }}, values:{get:function() { - return _.kotlin.collections.EmptyList; - }}, readResolve:function() { - return _.kotlin.collections.EmptyMap; - }}), emptyMap:function() { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.collections.EmptyMap, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE(); - }, mapOf_eoa9s7$:function(pairs) { - return pairs.length > 0 ? _.kotlin.collections.linkedMapOf_eoa9s7$(pairs.slice()) : _.kotlin.collections.emptyMap(); - }, mapOf:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapOf", function() { - return _.kotlin.collections.emptyMap(); - }), mutableMapOf_eoa9s7$:function(pairs) { - var $receiver = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity(pairs.length)); - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - return $receiver; - }, hashMapOf_eoa9s7$:function(pairs) { - var $receiver = new Kotlin.ComplexHashMap(_.kotlin.collections.mapCapacity(pairs.length)); - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - return $receiver; - }, linkedMapOf_eoa9s7$:function(pairs) { - var $receiver = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity(pairs.length)); - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - return $receiver; - }, mapCapacity:function(expectedSize) { - if (expectedSize < 3) { - return expectedSize + 1; - } - if (expectedSize < _.kotlin.collections.INT_MAX_POWER_OF_TWO_y8578v$) { - return expectedSize + (expectedSize / 3 | 0); - } - return Kotlin.modules["stdlib"].kotlin.js.internal.IntCompanionObject.MAX_VALUE; - }, isNotEmpty_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_efxzmg$", function($receiver) { - return!$receiver.isEmpty(); - }), orEmpty_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_efxzmg$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptyMap(); - }), contains_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.contains_9ju2mf$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE()).containsKey_za3rmp$(key); - }), get_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.get_9ju2mf$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE()).get_za3rmp$(key); - }), containsKey_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.containsKey_9ju2mf$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE()).containsKey_za3rmp$(key); - }), containsValue_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.containsValue_9ju2mf$", function($receiver, value) { - return $receiver.containsValue_za3rmp$(value); - }), remove_dr77nj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.remove_dr77nj$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableMap) ? tmp$0 : Kotlin.throwCCE()).remove_za3rmp$(key); - }), component1_95c3g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_95c3g$", function($receiver) { - return $receiver.key; - }), component2_95c3g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_95c3g$", function($receiver) { - return $receiver.value; - }), toPair_95c3g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.toPair_95c3g$", function($receiver) { - return new _.kotlin.Pair($receiver.key, $receiver.value); - }), getOrElse_yh3n4j$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_yh3n4j$", function($receiver, key, defaultValue) { - var tmp$0; - return(tmp$0 = $receiver.get_za3rmp$(key)) != null ? tmp$0 : defaultValue(); - }), getOrElseNullable:function($receiver, key, defaultValue) { - var tmp$0; - var value = $receiver.get_za3rmp$(key); - if (value == null && !$receiver.containsKey_za3rmp$(key)) { - return defaultValue(); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }, getOrPut_5hy1z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrPut_5hy1z$", function($receiver, key, defaultValue) { - var tmp$0; - var value = $receiver.get_za3rmp$(key); - if (value == null) { - var answer = defaultValue(); - $receiver.put_wn2jw4$(key, answer); - tmp$0 = answer; - } else { - tmp$0 = value; - } - return tmp$0; - }), iterator_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.iterator_efxzmg$", function($receiver) { - return $receiver.entries.iterator(); - }), mapValuesTo_6rxb0p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapValuesTo_6rxb0p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(element.key, transform(element)); - } - return destination; - }), mapKeysTo_6rxb0p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapKeysTo_6rxb0p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(transform(element), element.value); - } - return destination; - }), putAll_76v9np$:function($receiver, pairs) { - var tmp$1, tmp$2, tmp$3; - tmp$1 = pairs, tmp$2 = tmp$1.length; - for (var tmp$3 = 0;tmp$3 !== tmp$2;++tmp$3) { - var tmp$0 = tmp$1[tmp$3], key = tmp$0.component1(), value = tmp$0.component2(); - $receiver.put_wn2jw4$(key, value); - } - }, putAll_6588df$:function($receiver, pairs) { - var tmp$1; - tmp$1 = pairs.iterator(); - while (tmp$1.hasNext()) { - var tmp$0 = tmp$1.next(), key = tmp$0.component1(), value = tmp$0.component2(); - $receiver.put_wn2jw4$(key, value); - } - }, putAll_6ze1sl$:function($receiver, pairs) { - var tmp$1; - tmp$1 = pairs.iterator(); - while (tmp$1.hasNext()) { - var tmp$0 = tmp$1.next(), key = tmp$0.component1(), value = tmp$0.component2(); - $receiver.put_wn2jw4$(key, value); - } - }, mapValues_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapValues_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.size)); - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(element.key, transform(element)); - } - return destination; - }), mapKeys_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapKeys_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.size)); - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(transform(element), element.value); - } - return destination; - }), filterKeys_m7gpmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterKeys_m7gpmg$", function($receiver, predicate) { - var tmp$0; - var result = new Kotlin.LinkedHashMap; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var entry = tmp$0.next(); - if (predicate(entry.key)) { - result.put_wn2jw4$(entry.key, entry.value); - } - } - return result; - }), filterValues_m7gpmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterValues_m7gpmg$", function($receiver, predicate) { - var tmp$0; - var result = new Kotlin.LinkedHashMap; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var entry = tmp$0.next(); - if (predicate(entry.value)) { - result.put_wn2jw4$(entry.key, entry.value); - } - } - return result; - }), filterTo_186nyl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_186nyl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), filter_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_oixulp$", function($receiver, predicate) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), filterNotTo_186nyl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_186nyl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), filterNot_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_oixulp$", function($receiver, predicate) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), toMap_mnrzhp$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyMap(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.mapOf_dvvt93$(Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? $receiver.get_za3lpa$(0) : $receiver.iterator().next()); - } else { - tmp$1 = _.kotlin.collections.toMap_q9c1bb$($receiver, new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.size))); - } - } - return tmp$1; - } - return _.kotlin.collections.optimizeReadOnlyMap(_.kotlin.collections.toMap_q9c1bb$($receiver, new Kotlin.LinkedHashMap)); - }, toMap_q9c1bb$:function($receiver, destination) { - _.kotlin.collections.putAll_6588df$(destination, $receiver); - return destination; - }, toMap_sq63gn$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - return _.kotlin.collections.emptyMap(); - } else { - if (tmp$0 === 1) { - return _.kotlin.collections.mapOf_dvvt93$($receiver[0]); - } else { - return _.kotlin.collections.toMap_6ddun9$($receiver, new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - }, toMap_6ddun9$:function($receiver, destination) { - _.kotlin.collections.putAll_76v9np$(destination, $receiver); - return destination; - }, toMap_t83shn$:function($receiver) { - return _.kotlin.collections.optimizeReadOnlyMap(_.kotlin.collections.toMap_7lph5z$($receiver, new Kotlin.LinkedHashMap)); - }, toMap_7lph5z$:function($receiver, destination) { - _.kotlin.collections.putAll_6ze1sl$(destination, $receiver); - return destination; - }, plus_gd9jsf$:function($receiver, pair) { - if ($receiver.isEmpty()) { - return _.kotlin.collections.mapOf_dvvt93$(pair); - } else { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - $receiver_0.put_wn2jw4$(pair.first, pair.second); - return $receiver_0; - } - }, plus_1uo6lf$:function($receiver, pairs) { - if ($receiver.isEmpty()) { - return _.kotlin.collections.toMap_mnrzhp$(pairs); - } else { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - _.kotlin.collections.putAll_6588df$($receiver_0, pairs); - return $receiver_0; - } - }, plus_kx5j6p$:function($receiver, pairs) { - if ($receiver.isEmpty()) { - return _.kotlin.collections.toMap_sq63gn$(pairs); - } else { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - _.kotlin.collections.putAll_76v9np$($receiver_0, pairs); - return $receiver_0; - } - }, plus_85nxov$:function($receiver, pairs) { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - _.kotlin.collections.putAll_6ze1sl$($receiver_0, pairs); - return _.kotlin.collections.optimizeReadOnlyMap($receiver_0); - }, plus_y1w8a6$:function($receiver, map) { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - $receiver_0.putAll_r12sna$(map); - return $receiver_0; - }, plusAssign_fda80b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_fda80b$", function($receiver, pair) { - $receiver.put_wn2jw4$(pair.first, pair.second); - }), plusAssign_6588df$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_6588df$", function($receiver, pairs) { - _.kotlin.collections.putAll_6588df$($receiver, pairs); - }), plusAssign_76v9np$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_76v9np$", function($receiver, pairs) { - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - }), plusAssign_6ze1sl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_6ze1sl$", function($receiver, pairs) { - _.kotlin.collections.putAll_6ze1sl$($receiver, pairs); - }), plusAssign_wb8lso$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_wb8lso$", function($receiver, map) { - $receiver.putAll_r12sna$(map); - }), optimizeReadOnlyMap:function($receiver) { - var tmp$0; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - return _.kotlin.collections.emptyMap(); - } else { - if (tmp$0 === 1) { - return $receiver; - } else { - return $receiver; - } - } - }, remove_4kvzvw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.remove_4kvzvw$", function($receiver, element) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).remove_za3rmp$(element); - }), removeAll_dah1ga$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.removeAll_dah1ga$", function($receiver, elements) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).removeAll_wtfk93$(elements); - }), retainAll_dah1ga$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.retainAll_dah1ga$", function($receiver, elements) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).retainAll_wtfk93$(elements); - }), remove_ter78v$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.remove_ter78v$", function($receiver, index) { - return $receiver.removeAt_za3lpa$(index); - }), plusAssign_4kvzvw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_4kvzvw$", function($receiver, element) { - $receiver.add_za3rmp$(element); - }), plusAssign_fwwv5a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_fwwv5a$", function($receiver, elements) { - _.kotlin.collections.addAll_fwwv5a$($receiver, elements); - }), plusAssign_jzhv38$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_jzhv38$", function($receiver, elements) { - _.kotlin.collections.addAll_jzhv38$($receiver, elements); - }), plusAssign_h3qeu8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_h3qeu8$", function($receiver, elements) { - _.kotlin.collections.addAll_h3qeu8$($receiver, elements); - }), minusAssign_4kvzvw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_4kvzvw$", function($receiver, element) { - $receiver.remove_za3rmp$(element); - }), minusAssign_fwwv5a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_fwwv5a$", function($receiver, elements) { - _.kotlin.collections.removeAll_fwwv5a$($receiver, elements); - }), minusAssign_jzhv38$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_jzhv38$", function($receiver, elements) { - _.kotlin.collections.removeAll_jzhv38$($receiver, elements); - }), minusAssign_h3qeu8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_h3qeu8$", function($receiver, elements) { - _.kotlin.collections.removeAll_h3qeu8$($receiver, elements); - }), addAll_fwwv5a$:function($receiver, elements) { - var tmp$0; - if (Kotlin.isType(elements, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return $receiver.addAll_wtfk93$(elements); - } else { - var result = false; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if ($receiver.add_za3rmp$(item)) { - result = true; - } - } - return result; - } - }, addAll_h3qeu8$:function($receiver, elements) { - var tmp$0; - var result = false; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if ($receiver.add_za3rmp$(item)) { - result = true; - } - } - return result; - }, addAll_jzhv38$:function($receiver, elements) { - return $receiver.addAll_wtfk93$(_.kotlin.collections.asList_eg9ybj$(elements)); - }, removeAll_d717bt$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace($receiver, predicate, true); - }, retainAll_d717bt$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace($receiver, predicate, false); - }, filterInPlace:function($receiver, predicate, predicateResultToRemove) { - var result = {v:false}; - var receiver = $receiver.iterator(); - while (receiver.hasNext()) { - if (Kotlin.equals(predicate(receiver.next()), predicateResultToRemove)) { - receiver.remove(); - result.v = true; - } - } - return result.v; - }, removeAll_5xdc4t$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace_1($receiver, predicate, true); - }, retainAll_5xdc4t$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace_1($receiver, predicate, false); - }, filterInPlace_1:function($receiver, predicate, predicateResultToRemove) { - var tmp$0, tmp$1; - var writeIndex = 0; - tmp$0 = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - for (var readIndex = 0;readIndex <= tmp$0;readIndex++) { - var element = $receiver.get_za3lpa$(readIndex); - if (Kotlin.equals(predicate(element), predicateResultToRemove)) { - continue; - } - if (writeIndex !== readIndex) { - $receiver.set_vux3hl$(writeIndex, element); - } - writeIndex++; - } - if (writeIndex < $receiver.size) { - tmp$1 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver), writeIndex).iterator(); - while (tmp$1.hasNext()) { - var removeIndex = tmp$1.next(); - $receiver.removeAt_za3lpa$(removeIndex); - } - return true; - } else { - return false; - } - }, removeAll_fwwv5a$:function($receiver, elements) { - var elements_0 = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).removeAll_wtfk93$(elements_0); - }, removeAll_h3qeu8$:function($receiver, elements) { - var set = _.kotlin.sequences.toHashSet_uya9q7$(elements); - return!set.isEmpty() && $receiver.removeAll_wtfk93$(set); - }, removeAll_jzhv38$:function($receiver, elements) { - return!(elements.length === 0) && $receiver.removeAll_wtfk93$(_.kotlin.collections.toHashSet_eg9ybj$(elements)); - }, retainAll_fwwv5a$:function($receiver, elements) { - var elements_0 = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).retainAll_wtfk93$(elements_0); - }, retainAll_jzhv38$:function($receiver, elements) { - if (!(elements.length === 0)) { - return $receiver.retainAll_wtfk93$(_.kotlin.collections.toHashSet_eg9ybj$(elements)); - } else { - return _.kotlin.collections.retainNothing($receiver); - } - }, retainAll_h3qeu8$:function($receiver, elements) { - var set = _.kotlin.sequences.toHashSet_uya9q7$(elements); - if (!set.isEmpty()) { - return $receiver.retainAll_wtfk93$(set); - } else { - return _.kotlin.collections.retainNothing($receiver); - } - }, retainNothing:function($receiver) { - var result = !$receiver.isEmpty(); - $receiver.clear(); - return result; - }, sort_h06zi1$:function($receiver) { - if ($receiver.size > 1) { - _.java.util.Collections.sort_pr3zit$($receiver); - } - }, sortWith_lcufbu$:function($receiver, comparator) { - if ($receiver.size > 1) { - _.java.util.Collections.sort_k5qxi4$($receiver, comparator); - } - }, ReversedListReadOnly:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this); - this.$delegate_h46x6d$ = delegate; - }, {delegate:{get:function() { - return this.$delegate_h46x6d$; - }}, size:{get:function() { - return this.delegate.size; - }}, get_za3lpa$:function(index) { - return this.delegate.get_za3lpa$(this.flipIndex_s8ev3o$(index)); - }, flipIndex_s8ev3o$:function($receiver) { - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$($receiver)) { - return this.size - $receiver - 1; - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + $receiver + " should be in range [" + new Kotlin.NumberRange(0, this.size - 1) + "]."); - } - }, flipIndexForward_s8ev3o$:function($receiver) { - if ((new Kotlin.NumberRange(0, this.size)).contains_htax2k$($receiver)) { - return this.size - $receiver; - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + $receiver + " should be in range [" + new Kotlin.NumberRange(0, this.size) + "]."); - } - }}), ReversedList:Kotlin.createClass(function() { - return[_.kotlin.collections.ReversedListReadOnly]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this, delegate); - this.$delegate_20w7qr$ = delegate; - }, {delegate:{get:function() { - return this.$delegate_20w7qr$; - }}, clear:function() { - this.delegate.clear(); - }, removeAt_za3lpa$:function(index) { - return this.delegate.removeAt_za3lpa$(this.flipIndex_s8ev3o$(index)); - }, set_vux3hl$:function(index, element) { - return this.delegate.set_vux3hl$(this.flipIndex_s8ev3o$(index), element); - }, add_vux3hl$:function(index, element) { - this.delegate.add_vux3hl$(this.flipIndexForward_s8ev3o$(index), element); - }}), asReversed_a7ptmv$:function($receiver) { - return new _.kotlin.collections.ReversedListReadOnly($receiver); - }, asReversed_sqtfhv$:function($receiver) { - return new _.kotlin.collections.ReversedList($receiver); - }, EmptySet:Kotlin.createObject(function() { - return[_.java.io.Serializable, Kotlin.modules["builtins"].kotlin.collections.Set]; - }, null, {equals_za3rmp$:function(other) { - return Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.Set) && other.isEmpty(); - }, hashCode:function() { - return 0; - }, toString:function() { - return "[]"; - }, size:{get:function() { - return 0; - }}, isEmpty:function() { - return true; - }, contains_za3rmp$:function(element) { - return false; - }, containsAll_wtfk93$:function(elements) { - return elements.isEmpty(); - }, iterator:function() { - return _.kotlin.collections.EmptyIterator; - }, readResolve:function() { - return _.kotlin.collections.EmptySet; - }}), emptySet:function() { - return _.kotlin.collections.EmptySet; - }, setOf_9mqe4v$:function(elements) { - return elements.length > 0 ? _.kotlin.collections.toSet_eg9ybj$(elements) : _.kotlin.collections.emptySet(); - }, setOf:Kotlin.defineInlineFunction("stdlib.kotlin.collections.setOf", function() { - return _.kotlin.collections.emptySet(); - }), mutableSetOf_9mqe4v$:function(elements) { - return _.kotlin.collections.toCollection_ajv5ds$(elements, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity(elements.length))); - }, hashSetOf_9mqe4v$:function(elements) { - return _.kotlin.collections.toCollection_ajv5ds$(elements, new Kotlin.ComplexHashSet(_.kotlin.collections.mapCapacity(elements.length))); - }, linkedSetOf_9mqe4v$:function(elements) { - return _.kotlin.collections.toCollection_ajv5ds$(elements, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity(elements.length))); - }, orEmpty_9io49b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_9io49b$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptySet(); - }), optimizeReadOnlySet:function($receiver) { - var tmp$0; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - return _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - return _.kotlin.collections.setOf_za3rmp$($receiver.iterator().next()); - } else { - return $receiver; - } - } - }}), synchronized_pzucw5$:Kotlin.defineInlineFunction("stdlib.kotlin.synchronized_pzucw5$", function(lock, block) { - return block(); - }), emptyArray:Kotlin.defineInlineFunction("stdlib.kotlin.emptyArray", function(isT) { - var tmp$0; - return Array.isArray(tmp$0 = Kotlin.nullArray(0)) ? tmp$0 : Kotlin.throwCCE(); - }), lazy_un3fny$:function(initializer) { - return new _.kotlin.UnsafeLazyImpl(initializer); - }, lazy_b4usna$:function(mode, initializer) { - return new _.kotlin.UnsafeLazyImpl(initializer); - }, lazy_pzucw5$:function(lock, initializer) { - return new _.kotlin.UnsafeLazyImpl(initializer); - }, arrayOfNulls:function(reference, size) { - var tmp$0; - return Array.isArray(tmp$0 = Kotlin.nullArray(size)) ? tmp$0 : Kotlin.throwCCE(); - }, arrayCopyResize:function(source, newSize, defaultValue) { - var result = source.slice(0, newSize); - var index = source.length; - if (newSize > index) { - result.length = newSize; - while (index < newSize) { - result[index++] = defaultValue; - } - } - return result; - }, arrayPlusCollection:function(array, collection) { - var tmp$0; - var result = array.slice(); - result.length += collection.size; - var index = array.length; - tmp$0 = collection.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toSingletonMap:function($receiver) { - return $receiver; - }, copyToArrayOfAny:function($receiver, isVarargs) { - return isVarargs ? $receiver : $receiver.slice(); - }, isNaN_yrwdxs$:function($receiver) { - return $receiver !== $receiver; - }, isNaN_81szl$:function($receiver) { - return $receiver !== $receiver; - }, isInfinite_yrwdxs$:function($receiver) { - return $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.DoubleCompanionObject.POSITIVE_INFINITY || $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.DoubleCompanionObject.NEGATIVE_INFINITY; - }, isInfinite_81szl$:function($receiver) { - return $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.FloatCompanionObject.POSITIVE_INFINITY || $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.FloatCompanionObject.NEGATIVE_INFINITY; - }, isFinite_yrwdxs$:function($receiver) { - return!_.kotlin.isInfinite_yrwdxs$($receiver) && !_.kotlin.isNaN_yrwdxs$($receiver); - }, isFinite_81szl$:function($receiver) { - return!_.kotlin.isInfinite_81szl$($receiver) && !_.kotlin.isNaN_81szl$($receiver); - }, Unit:Kotlin.createObject(null, null, {toString:function() { - return "kotlin.Unit"; - }}), Lazy:Kotlin.createTrait(null), lazyOf_za3rmp$:function(value) { - return new _.kotlin.InitializedLazyImpl(value); - }, getValue_em0fd4$:Kotlin.defineInlineFunction("stdlib.kotlin.getValue_em0fd4$", function($receiver, thisRef, property) { - return $receiver.value; - }), LazyThreadSafetyMode:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{SYNCHRONIZED:function() { - return new _.kotlin.LazyThreadSafetyMode; - }, PUBLICATION:function() { - return new _.kotlin.LazyThreadSafetyMode; - }, NONE:function() { - return new _.kotlin.LazyThreadSafetyMode; - }}; - }), UNINITIALIZED_VALUE:Kotlin.createObject(null, null), SynchronizedLazyImpl:Kotlin.createClass(function() { - return[_.java.io.Serializable, _.kotlin.Lazy]; - }, function(initializer, lock) { - if (lock === void 0) { - lock = null; - } - this.initializer_r73809$ = initializer; - this._value_vvwq51$ = _.kotlin.UNINITIALIZED_VALUE; - this.lock_1qw5us$ = lock != null ? lock : this; - }, {value:{get:function() { - var tmp$0; - var _v1 = this._value_vvwq51$; - if (_v1 !== _.kotlin.UNINITIALIZED_VALUE) { - return(tmp$0 = _v1) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - var tmp$2, tmp$1; - var _v2 = this._value_vvwq51$; - if (_v2 !== _.kotlin.UNINITIALIZED_VALUE) { - return(tmp$2 = _v2) == null || tmp$2 != null ? tmp$2 : Kotlin.throwCCE(); - } else { - var typedValue = ((tmp$1 = this.initializer_r73809$) != null ? tmp$1 : Kotlin.throwNPE())(); - this._value_vvwq51$ = typedValue; - this.initializer_r73809$ = null; - return typedValue; - } - }}, isInitialized:function() { - return this._value_vvwq51$ !== _.kotlin.UNINITIALIZED_VALUE; - }, toString:function() { - return this.isInitialized() ? Kotlin.toString(this.value) : "Lazy value not initialized yet."; - }, writeReplace:function() { - return new _.kotlin.InitializedLazyImpl(this.value); - }}, {}), UnsafeLazyImpl:Kotlin.createClass(function() { - return[_.java.io.Serializable, _.kotlin.Lazy]; - }, function(initializer) { - this.initializer_r8paat$ = initializer; - this._value_94f8d5$ = _.kotlin.UNINITIALIZED_VALUE; - }, {value:{get:function() { - var tmp$0, tmp$1; - if (this._value_94f8d5$ === _.kotlin.UNINITIALIZED_VALUE) { - this._value_94f8d5$ = ((tmp$0 = this.initializer_r8paat$) != null ? tmp$0 : Kotlin.throwNPE())(); - this.initializer_r8paat$ = null; - } - return(tmp$1 = this._value_94f8d5$) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }}, isInitialized:function() { - return this._value_94f8d5$ !== _.kotlin.UNINITIALIZED_VALUE; - }, toString:function() { - return this.isInitialized() ? Kotlin.toString(this.value) : "Lazy value not initialized yet."; - }, writeReplace:function() { - return new _.kotlin.InitializedLazyImpl(this.value); - }}), InitializedLazyImpl:Kotlin.createClass(function() { - return[_.java.io.Serializable, _.kotlin.Lazy]; - }, function(value) { - this.$value_2jk7vi$ = value; - }, {value:{get:function() { - return this.$value_2jk7vi$; - }}, isInitialized:function() { - return true; - }, toString:function() { - return Kotlin.toString(this.value); - }}), require_6taknv$:Kotlin.defineInlineFunction("stdlib.kotlin.require_6taknv$", function(value) { - if (!value) { - var message = "Failed requirement."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }), require_588y69$:Kotlin.defineInlineFunction("stdlib.kotlin.require_588y69$", function(value, lazyMessage) { - if (!value) { - var message = lazyMessage(); - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }), requireNotNull_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.requireNotNull_za3rmp$", function(value) { - if (value == null) { - var message = "Required value was null."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } else { - return value; - } - }), requireNotNull_pzucw5$:Kotlin.defineInlineFunction("stdlib.kotlin.requireNotNull_pzucw5$", function(value, lazyMessage) { - if (value == null) { - var message = lazyMessage(); - throw new Kotlin.IllegalArgumentException(message.toString()); - } else { - return value; - } - }), check_6taknv$:Kotlin.defineInlineFunction("stdlib.kotlin.check_6taknv$", function(value) { - if (!value) { - var message = "Check failed."; - throw new Kotlin.IllegalStateException(message.toString()); - } - }), check_588y69$:Kotlin.defineInlineFunction("stdlib.kotlin.check_588y69$", function(value, lazyMessage) { - if (!value) { - var message = lazyMessage(); - throw new Kotlin.IllegalStateException(message.toString()); - } - }), checkNotNull_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.checkNotNull_za3rmp$", function(value) { - if (value == null) { - var message = "Required value was null."; - throw new Kotlin.IllegalStateException(message.toString()); - } else { - return value; - } - }), checkNotNull_pzucw5$:Kotlin.defineInlineFunction("stdlib.kotlin.checkNotNull_pzucw5$", function(value, lazyMessage) { - if (value == null) { - var message = lazyMessage(); - throw new Kotlin.IllegalStateException(message.toString()); - } else { - return value; - } - }), error_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.error_za3rmp$", function(message) { - throw new Kotlin.IllegalStateException(message.toString()); - }), NotImplementedError:Kotlin.createClass(function() { - return[Kotlin.Error]; - }, function $fun(message) { - if (message === void 0) { - message = "An operation is not implemented."; - } - $fun.baseInitializer.call(this, message); - }), TODO:Kotlin.defineInlineFunction("stdlib.kotlin.TODO", function() { - throw new _.kotlin.NotImplementedError; - }), TODO_61zpoe$:Kotlin.defineInlineFunction("stdlib.kotlin.TODO_61zpoe$", function(reason) { - throw new _.kotlin.NotImplementedError("An operation is not implemented: " + reason); - }), run_un3fny$:Kotlin.defineInlineFunction("stdlib.kotlin.run_un3fny$", function(block) { - return block(); - }), run_7hr6ff$:Kotlin.defineInlineFunction("stdlib.kotlin.run_7hr6ff$", function($receiver, block) { - return block.call($receiver); - }), with_hiyix$:Kotlin.defineInlineFunction("stdlib.kotlin.with_hiyix$", function(receiver, block) { - return block.call(receiver); - }), apply_ji1yox$:Kotlin.defineInlineFunction("stdlib.kotlin.apply_ji1yox$", function($receiver, block) { - block.call($receiver); - return $receiver; - }), let_7hr6ff$:Kotlin.defineInlineFunction("stdlib.kotlin.let_7hr6ff$", function($receiver, block) { - return block($receiver); - }), repeat_nxnjqh$:Kotlin.defineInlineFunction("stdlib.kotlin.repeat_nxnjqh$", function(times, action) { - var tmp$0; - tmp$0 = times - 1; - for (var index = 0;index <= tmp$0;index++) { - action(index); - } - }), Pair:Kotlin.createClass(function() { - return[_.java.io.Serializable]; - }, function(first, second) { - this.first = first; - this.second = second; - }, {toString:function() { - return "(" + this.first + ", " + this.second + ")"; - }, component1:function() { - return this.first; - }, component2:function() { - return this.second; - }, copy_wn2jw4$:function(first, second) { - return new _.kotlin.Pair(first === void 0 ? this.first : first, second === void 0 ? this.second : second); - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.first) | 0; - result = result * 31 + Kotlin.hashCode(this.second) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.first, other.first) && Kotlin.equals(this.second, other.second)))); - }}), to_l1ob02$:function($receiver, that) { - return new _.kotlin.Pair($receiver, that); - }, toList_49pv07$:function($receiver) { - return _.kotlin.collections.listOf_9mqe4v$([$receiver.first, $receiver.second]); - }, Triple:Kotlin.createClass(function() { - return[_.java.io.Serializable]; - }, function(first, second, third) { - this.first = first; - this.second = second; - this.third = third; - }, {toString:function() { - return "(" + this.first + ", " + this.second + ", " + this.third + ")"; - }, component1:function() { - return this.first; - }, component2:function() { - return this.second; - }, component3:function() { - return this.third; - }, copy_2br51b$:function(first, second, third) { - return new _.kotlin.Triple(first === void 0 ? this.first : first, second === void 0 ? this.second : second, third === void 0 ? this.third : third); - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.first) | 0; - result = result * 31 + Kotlin.hashCode(this.second) | 0; - result = result * 31 + Kotlin.hashCode(this.third) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.first, other.first) && (Kotlin.equals(this.second, other.second) && Kotlin.equals(this.third, other.third))))); - }}), toList_lyhsl6$:function($receiver) { - return _.kotlin.collections.listOf_9mqe4v$([$receiver.first, $receiver.second, $receiver.third]); - }, sequences:Kotlin.definePackage(null, {ConstrainedOnceSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence) { - this.sequenceRef_sxf5v1$ = sequence; - }, {iterator:function() { - var tmp$0; - tmp$0 = this.sequenceRef_sxf5v1$; - if (tmp$0 == null) { - throw new Kotlin.IllegalStateException("This sequence can be consumed only once."); - } - var sequence = tmp$0; - this.sequenceRef_sxf5v1$ = null; - return sequence.iterator(); - }}), contains_8xuhcw$:function($receiver, element) { - return _.kotlin.sequences.indexOf_8xuhcw$($receiver, element) >= 0; - }, elementAt_8xunab$f:function(closure$index) { - return function(it) { - throw new Kotlin.IndexOutOfBoundsException("Sequence doesn't contain element at index " + closure$index + "."); - }; - }, elementAt_8xunab$:function($receiver, index) { - return _.kotlin.sequences.elementAtOrElse_1xituq$($receiver, index, _.kotlin.sequences.elementAt_8xunab$f(index)); - }, elementAtOrElse_1xituq$:function($receiver, index, defaultValue) { - if (index < 0) { - return defaultValue(index); - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return defaultValue(index); - }, elementAtOrNull_8xunab$:function($receiver, index) { - if (index < 0) { - return null; - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return null; - }, find_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.find_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.findLast_6bub1b$", function($receiver, predicate) { - var tmp$0; - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), first_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Sequence is empty."); - } - return iterator.next(); - }, first_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.first_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Sequence contains no element matching the predicate."); - }), firstOrNull_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - return iterator.next(); - }, firstOrNull_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.firstOrNull_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), indexOf_8xuhcw$:function($receiver, element) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - return index; - } - index++; - } - return-1; - }, indexOfFirst_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.indexOfFirst_6bub1b$", function($receiver, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - return index; - } - index++; - } - return-1; - }), indexOfLast_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.indexOfLast_6bub1b$", function($receiver, predicate) { - var tmp$0; - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }), last_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Sequence is empty."); - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - }, last_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.last_6bub1b$", function($receiver, predicate) { - var tmp$0, tmp$1; - var last = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Sequence contains no element matching the predicate."); - } - return(tmp$1 = last) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), lastIndexOf_8xuhcw$:function($receiver, element) { - var tmp$0; - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }, lastOrNull_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - }, lastOrNull_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.lastOrNull_6bub1b$", function($receiver, predicate) { - var tmp$0; - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), single_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Sequence is empty."); - } - var single = iterator.next(); - if (iterator.hasNext()) { - throw new Kotlin.IllegalArgumentException("Sequence has more than one element."); - } - return single; - }, single_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.single_6bub1b$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Sequence contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Sequence contains no element matching the predicate."); - } - return(tmp$1 = single) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var single = iterator.next(); - if (iterator.hasNext()) { - return null; - } - return single; - }, singleOrNull_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.singleOrNull_6bub1b$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_8xunab$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - tmp$0 = $receiver; - } else { - if (Kotlin.isType($receiver, _.kotlin.sequences.DropTakeSequence)) { - tmp$0 = $receiver.drop_za3lpa$(n); - } else { - tmp$0 = new _.kotlin.sequences.DropSequence($receiver, n); - } - } - return tmp$0; - }, dropWhile_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.DropWhileSequence($receiver, predicate); - }, filter_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.FilteringSequence($receiver, true, predicate); - }, filterIndexed_2lipl8$f:function(closure$predicate) { - return function(it) { - return closure$predicate(it.index, it.value); - }; - }, filterIndexed_2lipl8$f_0:function(it) { - return it.value; - }, filterIndexed_2lipl8$:function($receiver, predicate) { - return new _.kotlin.sequences.TransformingSequence(new _.kotlin.sequences.FilteringSequence(new _.kotlin.sequences.IndexingSequence($receiver), true, _.kotlin.sequences.filterIndexed_2lipl8$f(predicate)), _.kotlin.sequences.filterIndexed_2lipl8$f_0); - }, filterIndexedTo_rs7kz9$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.filterIndexedTo_rs7kz9$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterNot_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.FilteringSequence($receiver, false, predicate); - }, filterNotNull_uya9q7$f:function(it) { - return it == null; - }, filterNotNull_uya9q7$:function($receiver) { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.sequences.filterNot_6bub1b$($receiver, _.kotlin.sequences.filterNotNull_uya9q7$f), _.kotlin.sequences.Sequence) ? tmp$0 : Kotlin.throwCCE(); - }, filterNotNullTo_9pj6f6$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element != null) { - destination.add_za3rmp$(element); - } - } - return destination; - }, filterNotTo_z1ybyi$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.filterNotTo_z1ybyi$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_z1ybyi$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.filterTo_z1ybyi$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), take_8xunab$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - tmp$0 = _.kotlin.sequences.emptySequence(); - } else { - if (Kotlin.isType($receiver, _.kotlin.sequences.DropTakeSequence)) { - tmp$0 = $receiver.take_za3lpa$(n); - } else { - tmp$0 = new _.kotlin.sequences.TakeSequence($receiver, n); - } - } - return tmp$0; - }, takeWhile_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.TakeWhileSequence($receiver, predicate); - }, sorted$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(this$sorted_0) { - this.this$sorted_0 = this$sorted_0; - }, {iterator:function() { - var sortedList = _.kotlin.sequences.toMutableList_uya9q7$(this.this$sorted_0); - _.kotlin.collections.sort_h06zi1$(sortedList); - return sortedList.iterator(); - }}, {}), sorted_f9rmbp$:function($receiver) { - return new _.kotlin.sequences.sorted$f($receiver); - }, sortedBy_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sortedBy_5y3tfr$", function($receiver, selector) { - return _.kotlin.sequences.sortedWith_pwgv1i$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedByDescending_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sortedByDescending_5y3tfr$", function($receiver, selector) { - return _.kotlin.sequences.sortedWith_pwgv1i$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedDescending_f9rmbp$:function($receiver) { - return _.kotlin.sequences.sortedWith_pwgv1i$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortedWith$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(this$sortedWith_0, closure$comparator_0) { - this.this$sortedWith_0 = this$sortedWith_0; - this.closure$comparator_0 = closure$comparator_0; - }, {iterator:function() { - var sortedList = _.kotlin.sequences.toMutableList_uya9q7$(this.this$sortedWith_0); - _.kotlin.collections.sortWith_lcufbu$(sortedList, this.closure$comparator_0); - return sortedList.iterator(); - }}, {}), sortedWith_pwgv1i$:function($receiver, comparator) { - return new _.kotlin.sequences.sortedWith$f($receiver, comparator); - }, associate_212ozr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associate_212ozr$", function($receiver, transform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_mzhnvn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateBy_mzhnvn$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_mq2phn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateBy_mq2phn$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_7yy56l$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateByTo_7yy56l$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_z626hh$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateByTo_z626hh$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_y82m8p$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateTo_y82m8p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_9pj6f6$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_uya9q7$:function($receiver) { - return _.kotlin.sequences.toCollection_9pj6f6$($receiver, new Kotlin.ComplexHashSet); - }, toList_uya9q7$:function($receiver) { - return _.kotlin.collections.optimizeReadOnlyList(_.kotlin.sequences.toMutableList_uya9q7$($receiver)); - }, toMutableList_uya9q7$:function($receiver) { - return _.kotlin.sequences.toCollection_9pj6f6$($receiver, new Kotlin.ArrayList); - }, toSet_uya9q7$:function($receiver) { - return _.kotlin.collections.optimizeReadOnlySet(_.kotlin.sequences.toCollection_9pj6f6$($receiver, new Kotlin.LinkedHashSet)); - }, flatMap_f7251y$f:function(it) { - return it.iterator(); - }, flatMap_f7251y$:function($receiver, transform) { - return new _.kotlin.sequences.FlatteningSequence($receiver, transform, _.kotlin.sequences.flatMap_f7251y$f); - }, flatMapTo_mxza43$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.flatMapTo_mxza43$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_h3qeu8$(destination, list); - } - return destination; - }), groupBy_mzhnvn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupBy_mzhnvn$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_mq2phn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupBy_mq2phn$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_ngq3c4$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupByTo_ngq3c4$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_315m50$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupByTo_315m50$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_mzhnvn$:function($receiver, transform) { - return new _.kotlin.sequences.TransformingSequence($receiver, transform); - }, mapIndexed_68ttmg$:function($receiver, transform) { - return new _.kotlin.sequences.TransformingIndexedSequence($receiver, transform); - }, mapIndexedNotNull_68ttmg$:function($receiver, transform) { - return _.kotlin.sequences.filterNotNull_uya9q7$(new _.kotlin.sequences.TransformingIndexedSequence($receiver, transform)); - }, mapIndexedNotNullTo_1k8h0x$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapIndexedNotNullTo_1k8h0x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedTo_1k8h0x$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapIndexedTo_1k8h0x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_mzhnvn$:function($receiver, transform) { - return _.kotlin.sequences.filterNotNull_uya9q7$(new _.kotlin.sequences.TransformingSequence($receiver, transform)); - }, mapNotNullTo_qkxpve$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapNotNullTo_qkxpve$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_qkxpve$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapTo_qkxpve$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_uya9q7$:function($receiver) { - return new _.kotlin.sequences.IndexingSequence($receiver); - }, distinct_uya9q7$f:function(it) { - return it; - }, distinct_uya9q7$:function($receiver) { - return _.kotlin.sequences.distinctBy_mzhnvn$($receiver, _.kotlin.sequences.distinct_uya9q7$f); - }, distinctBy_mzhnvn$:function($receiver, selector) { - return new _.kotlin.sequences.DistinctSequence($receiver, selector); - }, toMutableSet_uya9q7$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, all_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.all_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_uya9q7$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.any_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_uya9q7$:function($receiver) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - count++; - } - return count; - }, count_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.count_6bub1b$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_vmk5me$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.fold_vmk5me$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_xn82zj$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.foldIndexed_xn82zj$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), forEach_1y3f5d$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.forEach_1y3f5d$", function($receiver, action) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_jsn8xw$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.forEachIndexed_jsn8xw$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_f9rmbp$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(max, e) < 0) { - max = e; - } - } - return max; - }, maxBy_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.maxBy_5y3tfr$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var maxElem = iterator.next(); - var maxValue = selector(maxElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_pwgv1i$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_f9rmbp$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(min, e) > 0) { - min = e; - } - } - return min; - }, minBy_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.minBy_5y3tfr$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var minElem = iterator.next(); - var minValue = selector(minElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_pwgv1i$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_uya9q7$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.none_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_u0tld7$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.reduce_u0tld7$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty sequence can't be reduced."); - } - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(accumulator, iterator.next()); - } - return accumulator; - }), reduceIndexed_t3v3h2$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.reduceIndexed_t3v3h2$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty sequence can't be reduced."); - } - var index = 1; - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(index++, accumulator, iterator.next()); - } - return accumulator; - }), sumBy_mzck3q$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sumBy_mzck3q$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_awo3oi$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sumByDouble_awo3oi$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), requireNoNulls_uya9q7$f:function(this$requireNoNulls) { - return function(it) { - if (it == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + this$requireNoNulls + "."); - } - return it; - }; - }, requireNoNulls_uya9q7$:function($receiver) { - return _.kotlin.sequences.map_mzhnvn$($receiver, _.kotlin.sequences.requireNoNulls_uya9q7$f($receiver)); - }, minus$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(this$minus_0, closure$element_0) { - this.this$minus_0 = this$minus_0; - this.closure$element_0 = closure$element_0; - }, {iterator:function() { - var removed = {v:false}; - return _.kotlin.sequences.filter_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f.iterator$f(removed, this.closure$element_0)).iterator(); - }}, {iterator$f:function(closure$removed, closure$element) { - return function(it) { - if (!closure$removed.v && Kotlin.equals(it, closure$element)) { - closure$removed.v = true; - return false; - } else { - return true; - } - }; - }}), minus_8xuhcw$:function($receiver, element) { - return new _.kotlin.sequences.minus$f($receiver, element); - }, minus$f_0:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$elements_0, this$minus_0) { - this.closure$elements_0 = closure$elements_0; - this.this$minus_0 = this$minus_0; - }, {iterator:function() { - var other = _.kotlin.collections.toHashSet_eg9ybj$(this.closure$elements_0); - return _.kotlin.sequences.filterNot_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f_0.iterator$f(other)).iterator(); - }}, {iterator$f:function(closure$other) { - return function(it) { - return closure$other.contains_za3rmp$(it); - }; - }}), minus_l2r1yo$:function($receiver, elements) { - if (elements.length === 0) { - return $receiver; - } - return new _.kotlin.sequences.minus$f_0(elements, $receiver); - }, minus$f_1:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$elements_0, this$minus_0) { - this.closure$elements_0 = closure$elements_0; - this.this$minus_0 = this$minus_0; - }, {iterator:function() { - var other = _.kotlin.collections.convertToSetForSetOperation(this.closure$elements_0); - if (other.isEmpty()) { - return this.this$minus_0.iterator(); - } else { - return _.kotlin.sequences.filterNot_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f_1.iterator$f(other)).iterator(); - } - }}, {iterator$f:function(closure$other) { - return function(it) { - return closure$other.contains_za3rmp$(it); - }; - }}), minus_yslupy$:function($receiver, elements) { - return new _.kotlin.sequences.minus$f_1(elements, $receiver); - }, minus$f_2:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$elements_0, this$minus_0) { - this.closure$elements_0 = closure$elements_0; - this.this$minus_0 = this$minus_0; - }, {iterator:function() { - var other = _.kotlin.sequences.toHashSet_uya9q7$(this.closure$elements_0); - if (other.isEmpty()) { - return this.this$minus_0.iterator(); - } else { - return _.kotlin.sequences.filterNot_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f_2.iterator$f(other)).iterator(); - } - }}, {iterator$f:function(closure$other) { - return function(it) { - return closure$other.contains_za3rmp$(it); - }; - }}), minus_j4v1m4$:function($receiver, elements) { - return new _.kotlin.sequences.minus$f_2(elements, $receiver); - }, minusElement_8xuhcw$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.minusElement_8xuhcw$", function($receiver, element) { - return _.kotlin.sequences.minus_8xuhcw$($receiver, element); - }), partition_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.partition_6bub1b$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), plus_8xuhcw$:function($receiver, element) { - return _.kotlin.sequences.flatten_skdoy0$(_.kotlin.sequences.sequenceOf_9mqe4v$([$receiver, _.kotlin.sequences.sequenceOf_9mqe4v$([element])])); - }, plus_l2r1yo$:function($receiver, elements) { - return _.kotlin.sequences.plus_yslupy$($receiver, _.kotlin.collections.asList_eg9ybj$(elements)); - }, plus_yslupy$:function($receiver, elements) { - return _.kotlin.sequences.flatten_skdoy0$(_.kotlin.sequences.sequenceOf_9mqe4v$([$receiver, _.kotlin.collections.asSequence_q5oq31$(elements)])); - }, plus_j4v1m4$:function($receiver, elements) { - return _.kotlin.sequences.flatten_skdoy0$(_.kotlin.sequences.sequenceOf_9mqe4v$([$receiver, elements])); - }, plusElement_8xuhcw$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.plusElement_8xuhcw$", function($receiver, element) { - return _.kotlin.sequences.plus_8xuhcw$($receiver, element); - }), zip_j4v1m4$f:function(t1, t2) { - return _.kotlin.to_l1ob02$(t1, t2); - }, zip_j4v1m4$:function($receiver, other) { - return new _.kotlin.sequences.MergingSequence($receiver, other, _.kotlin.sequences.zip_j4v1m4$f); - }, zip_houmqe$:function($receiver, other, transform) { - return new _.kotlin.sequences.MergingSequence($receiver, other, transform); - }, joinTo_mrn40q$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element == null ? "null" : element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinToString_mbzd5w$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.sequences.joinTo_mrn40q$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, asIterable_uya9q7$f:function(this$asIterable) { - return function() { - return this$asIterable.iterator(); - }; - }, asIterable_uya9q7$:function($receiver) { - return new _.kotlin.collections.Iterable$f(_.kotlin.sequences.asIterable_uya9q7$f($receiver)); - }, asSequence_uya9q7$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.asSequence_uya9q7$", function($receiver) { - return $receiver; - }), average_zhcojx$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_662s1b$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_utw0os$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_uwi6zd$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_hzzbsh$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_l0u5c4$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, sum_zhcojx$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_662s1b$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_utw0os$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_uwi6zd$:function($receiver) { - var tmp$0; - var sum = Kotlin.Long.ZERO; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum = sum.add(element); - } - return sum; - }, sum_hzzbsh$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_l0u5c4$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, Sequence:Kotlin.createTrait(null), Sequence$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$iterator_0) { - this.closure$iterator_0 = closure$iterator_0; - }, {iterator:function() { - return this.closure$iterator_0(); - }}, {}), Sequence_kxhynv$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.Sequence_kxhynv$", function(iterator) { - return new _.kotlin.sequences.Sequence$f(iterator); - }), asSequence_123wqf$f:function(this$asSequence) { - return function() { - return this$asSequence; - }; - }, asSequence_123wqf$:function($receiver) { - return _.kotlin.sequences.constrainOnce_uya9q7$(new _.kotlin.sequences.Sequence$f(_.kotlin.sequences.asSequence_123wqf$f($receiver))); - }, sequenceOf_9mqe4v$:function(elements) { - return elements.length === 0 ? _.kotlin.sequences.emptySequence() : _.kotlin.collections.asSequence_eg9ybj$(elements); - }, emptySequence:function() { - return _.kotlin.sequences.EmptySequence; - }, EmptySequence:Kotlin.createObject(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, null, {iterator:function() { - return _.kotlin.collections.EmptyIterator; - }, drop_za3lpa$:function(n) { - return _.kotlin.sequences.EmptySequence; - }, take_za3lpa$:function(n) { - return _.kotlin.sequences.EmptySequence; - }}), flatten_skdoy0$f:function(it) { - return it.iterator(); - }, flatten_skdoy0$:function($receiver) { - return _.kotlin.sequences.flatten_2($receiver, _.kotlin.sequences.flatten_skdoy0$f); - }, flatten_9q41nu$f:function(it) { - return it.iterator(); - }, flatten_9q41nu$:function($receiver) { - return _.kotlin.sequences.flatten_2($receiver, _.kotlin.sequences.flatten_9q41nu$f); - }, flatten_2$f:function(it) { - return it; - }, flatten_2:function($receiver, iterator) { - var tmp$0; - if (Kotlin.isType($receiver, _.kotlin.sequences.TransformingSequence)) { - return(Kotlin.isType(tmp$0 = $receiver, _.kotlin.sequences.TransformingSequence) ? tmp$0 : Kotlin.throwCCE()).flatten(iterator); - } - return new _.kotlin.sequences.FlatteningSequence($receiver, _.kotlin.sequences.flatten_2$f, iterator); - }, unzip_t83shn$:function($receiver) { - var tmp$0; - var listT = new Kotlin.ArrayList; - var listR = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var pair = tmp$0.next(); - listT.add_za3rmp$(pair.first); - listR.add_za3rmp$(pair.second); - } - return _.kotlin.to_l1ob02$(listT, listR); - }, FilteringSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, sendWhen, predicate) { - if (sendWhen === void 0) { - sendWhen = true; - } - this.sequence_z4pg1f$ = sequence; - this.sendWhen_y7o6ge$ = sendWhen; - this.predicate_rgqu8l$ = predicate; - }, {iterator:function() { - return new _.kotlin.sequences.FilteringSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$FilteringSequence) { - this.this$FilteringSequence_0 = this$FilteringSequence; - this.iterator = this$FilteringSequence.sequence_z4pg1f$.iterator(); - this.nextState = -1; - this.nextItem = null; - }, {calcNext:function() { - while (this.iterator.hasNext()) { - var item = this.iterator.next(); - if (Kotlin.equals(this.this$FilteringSequence_0.predicate_rgqu8l$(item), this.this$FilteringSequence_0.sendWhen_y7o6ge$)) { - this.nextItem = item; - this.nextState = 1; - return; - } - } - this.nextState = 0; - }, next:function() { - var tmp$0; - if (this.nextState === -1) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = this.nextItem; - this.nextItem = null; - this.nextState = -1; - return(tmp$0 = result) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }, hasNext:function() { - if (this.nextState === -1) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), TransformingSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, transformer) { - this.sequence_n6gmof$ = sequence; - this.transformer_t8sv9n$ = transformer; - }, {iterator:function() { - return new _.kotlin.sequences.TransformingSequence.iterator$f(this); - }, flatten:function(iterator) { - return new _.kotlin.sequences.FlatteningSequence(this.sequence_n6gmof$, this.transformer_t8sv9n$, iterator); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TransformingSequence) { - this.this$TransformingSequence_0 = this$TransformingSequence; - this.iterator = this$TransformingSequence.sequence_n6gmof$.iterator(); - }, {next:function() { - return this.this$TransformingSequence_0.transformer_t8sv9n$(this.iterator.next()); - }, hasNext:function() { - return this.iterator.hasNext(); - }}, {})}), TransformingIndexedSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, transformer) { - this.sequence_wt2qws$ = sequence; - this.transformer_vk8fya$ = transformer; - }, {iterator:function() { - return new _.kotlin.sequences.TransformingIndexedSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TransformingIndexedSequence) { - this.this$TransformingIndexedSequence_0 = this$TransformingIndexedSequence; - this.iterator = this$TransformingIndexedSequence.sequence_wt2qws$.iterator(); - this.index = 0; - }, {next:function() { - return this.this$TransformingIndexedSequence_0.transformer_vk8fya$(this.index++, this.iterator.next()); - }, hasNext:function() { - return this.iterator.hasNext(); - }}, {})}), IndexingSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence) { - this.sequence_4mu851$ = sequence; - }, {iterator:function() { - return new _.kotlin.sequences.IndexingSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$IndexingSequence) { - this.iterator = this$IndexingSequence.sequence_4mu851$.iterator(); - this.index = 0; - }, {next:function() { - return new _.kotlin.collections.IndexedValue(this.index++, this.iterator.next()); - }, hasNext:function() { - return this.iterator.hasNext(); - }}, {})}), MergingSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence1, sequence2, transform) { - this.sequence1_gsgqfj$ = sequence1; - this.sequence2_gsgqfk$ = sequence2; - this.transform_ieuv6d$ = transform; - }, {iterator:function() { - return new _.kotlin.sequences.MergingSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$MergingSequence) { - this.this$MergingSequence_0 = this$MergingSequence; - this.iterator1 = this$MergingSequence.sequence1_gsgqfj$.iterator(); - this.iterator2 = this$MergingSequence.sequence2_gsgqfk$.iterator(); - }, {next:function() { - return this.this$MergingSequence_0.transform_ieuv6d$(this.iterator1.next(), this.iterator2.next()); - }, hasNext:function() { - return this.iterator1.hasNext() && this.iterator2.hasNext(); - }}, {})}), FlatteningSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, transformer, iterator) { - this.sequence_cjvkmf$ = sequence; - this.transformer_eche5v$ = transformer; - this.iterator_9sfvmc$ = iterator; - }, {iterator:function() { - return new _.kotlin.sequences.FlatteningSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$FlatteningSequence) { - this.this$FlatteningSequence_0 = this$FlatteningSequence; - this.iterator = this$FlatteningSequence.sequence_cjvkmf$.iterator(); - this.itemIterator = null; - }, {next:function() { - var tmp$0; - if (!this.ensureItemIterator()) { - throw new Kotlin.NoSuchElementException; - } - return((tmp$0 = this.itemIterator) != null ? tmp$0 : Kotlin.throwNPE()).next(); - }, hasNext:function() { - return this.ensureItemIterator(); - }, ensureItemIterator:function() { - var tmp$0; - if (Kotlin.equals((tmp$0 = this.itemIterator) != null ? tmp$0.hasNext() : null, false)) { - this.itemIterator = null; - } - while (this.itemIterator == null) { - if (!this.iterator.hasNext()) { - return false; - } else { - var element = this.iterator.next(); - var nextItemIterator = this.this$FlatteningSequence_0.iterator_9sfvmc$(this.this$FlatteningSequence_0.transformer_eche5v$(element)); - if (nextItemIterator.hasNext()) { - this.itemIterator = nextItemIterator; - return true; - } - } - } - return true; - }}, {})}), DropTakeSequence:Kotlin.createTrait(function() { - return[_.kotlin.sequences.Sequence]; - }), SubSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, function(sequence, startIndex, endIndex) { - this.sequence_oyhgp5$ = sequence; - this.startIndex_90rd2$ = startIndex; - this.endIndex_j2ttcj$ = endIndex; - if (!(this.startIndex_90rd2$ >= 0)) { - var message = "startIndex should be non-negative, but is " + this.startIndex_90rd2$; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (!(this.endIndex_j2ttcj$ >= 0)) { - var message_0 = "endIndex should be non-negative, but is " + this.endIndex_j2ttcj$; - throw new Kotlin.IllegalArgumentException(message_0.toString()); - } - if (!(this.endIndex_j2ttcj$ >= this.startIndex_90rd2$)) { - var message_1 = "endIndex should be not less than startIndex, but was " + this.endIndex_j2ttcj$ + " \x3c " + this.startIndex_90rd2$; - throw new Kotlin.IllegalArgumentException(message_1.toString()); - } - }, {count_9mr353$:{get:function() { - return this.endIndex_j2ttcj$ - this.startIndex_90rd2$; - }}, drop_za3lpa$:function(n) { - return n >= this.count_9mr353$ ? _.kotlin.sequences.emptySequence() : new _.kotlin.sequences.SubSequence(this.sequence_oyhgp5$, this.startIndex_90rd2$ + n, this.endIndex_j2ttcj$); - }, take_za3lpa$:function(n) { - return n >= this.count_9mr353$ ? this : new _.kotlin.sequences.SubSequence(this.sequence_oyhgp5$, this.startIndex_90rd2$, this.startIndex_90rd2$ + n); - }, iterator:function() { - return new _.kotlin.sequences.SubSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$SubSequence) { - this.this$SubSequence_0 = this$SubSequence; - this.iterator = this$SubSequence.sequence_oyhgp5$.iterator(); - this.position = 0; - }, {drop:function() { - while (this.position < this.this$SubSequence_0.startIndex_90rd2$ && this.iterator.hasNext()) { - this.iterator.next(); - this.position++; - } - }, hasNext:function() { - this.drop(); - return this.position < this.this$SubSequence_0.endIndex_j2ttcj$ && this.iterator.hasNext(); - }, next:function() { - this.drop(); - if (this.position >= this.this$SubSequence_0.endIndex_j2ttcj$) { - throw new Kotlin.NoSuchElementException; - } - this.position++; - return this.iterator.next(); - }}, {})}), TakeSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, function(sequence, count) { - this.sequence_4b84m6$ = sequence; - this.count_rcgz8u$ = count; - if (!(this.count_rcgz8u$ >= 0)) { - var message = "count must be non-negative, but was " + this.count_rcgz8u$ + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }, {drop_za3lpa$:function(n) { - return n >= this.count_rcgz8u$ ? _.kotlin.sequences.emptySequence() : new _.kotlin.sequences.SubSequence(this.sequence_4b84m6$, n, this.count_rcgz8u$); - }, take_za3lpa$:function(n) { - return n >= this.count_rcgz8u$ ? this : new _.kotlin.sequences.TakeSequence(this.sequence_4b84m6$, n); - }, iterator:function() { - return new _.kotlin.sequences.TakeSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TakeSequence) { - this.left = this$TakeSequence.count_rcgz8u$; - this.iterator = this$TakeSequence.sequence_4b84m6$.iterator(); - }, {next:function() { - if (this.left === 0) { - throw new Kotlin.NoSuchElementException; - } - this.left--; - return this.iterator.next(); - }, hasNext:function() { - return this.left > 0 && this.iterator.hasNext(); - }}, {})}), TakeWhileSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, predicate) { - this.sequence_augs99$ = sequence; - this.predicate_msmsk5$ = predicate; - }, {iterator:function() { - return new _.kotlin.sequences.TakeWhileSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TakeWhileSequence) { - this.this$TakeWhileSequence_0 = this$TakeWhileSequence; - this.iterator = this$TakeWhileSequence.sequence_augs99$.iterator(); - this.nextState = -1; - this.nextItem = null; - }, {calcNext:function() { - if (this.iterator.hasNext()) { - var item = this.iterator.next(); - if (this.this$TakeWhileSequence_0.predicate_msmsk5$(item)) { - this.nextState = 1; - this.nextItem = item; - return; - } - } - this.nextState = 0; - }, next:function() { - var tmp$0; - if (this.nextState === -1) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = (tmp$0 = this.nextItem) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - this.nextItem = null; - this.nextState = -1; - return result; - }, hasNext:function() { - if (this.nextState === -1) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), DropSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, function(sequence, count) { - this.sequence_mdo2d2$ = sequence; - this.count_52wnp6$ = count; - if (!(this.count_52wnp6$ >= 0)) { - var message = "count must be non-negative, but was " + this.count_52wnp6$ + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }, {drop_za3lpa$:function(n) { - return new _.kotlin.sequences.DropSequence(this.sequence_mdo2d2$, this.count_52wnp6$ + n); - }, take_za3lpa$:function(n) { - return new _.kotlin.sequences.SubSequence(this.sequence_mdo2d2$, this.count_52wnp6$, this.count_52wnp6$ + n); - }, iterator:function() { - return new _.kotlin.sequences.DropSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$DropSequence) { - this.iterator = this$DropSequence.sequence_mdo2d2$.iterator(); - this.left = this$DropSequence.count_52wnp6$; - }, {drop:function() { - while (this.left > 0 && this.iterator.hasNext()) { - this.iterator.next(); - this.left--; - } - }, next:function() { - this.drop(); - return this.iterator.next(); - }, hasNext:function() { - this.drop(); - return this.iterator.hasNext(); - }}, {})}), DropWhileSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, predicate) { - this.sequence_474bkb$ = sequence; - this.predicate_81zatf$ = predicate; - }, {iterator:function() { - return new _.kotlin.sequences.DropWhileSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$DropWhileSequence) { - this.this$DropWhileSequence_0 = this$DropWhileSequence; - this.iterator = this$DropWhileSequence.sequence_474bkb$.iterator(); - this.dropState = -1; - this.nextItem = null; - }, {drop:function() { - while (this.iterator.hasNext()) { - var item = this.iterator.next(); - if (!this.this$DropWhileSequence_0.predicate_81zatf$(item)) { - this.nextItem = item; - this.dropState = 1; - return; - } - } - this.dropState = 0; - }, next:function() { - var tmp$0; - if (this.dropState === -1) { - this.drop(); - } - if (this.dropState === 1) { - var result = (tmp$0 = this.nextItem) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - this.nextItem = null; - this.dropState = 0; - return result; - } - return this.iterator.next(); - }, hasNext:function() { - if (this.dropState === -1) { - this.drop(); - } - return this.dropState === 1 || this.iterator.hasNext(); - }}, {})}), DistinctSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(source, keySelector) { - this.source_2sma8z$ = source; - this.keySelector_x7nm6u$ = keySelector; - }, {iterator:function() { - return new _.kotlin.sequences.DistinctIterator(this.source_2sma8z$.iterator(), this.keySelector_x7nm6u$); - }}), DistinctIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.AbstractIterator]; - }, function $fun(source, keySelector) { - $fun.baseInitializer.call(this); - this.source_8cb0nq$ = source; - this.keySelector_t0csl9$ = keySelector; - this.observed_x3rjst$ = new Kotlin.ComplexHashSet; - }, {computeNext:function() { - while (this.source_8cb0nq$.hasNext()) { - var next = this.source_8cb0nq$.next(); - var key = this.keySelector_t0csl9$(next); - if (this.observed_x3rjst$.add_za3rmp$(key)) { - this.setNext_za3rmp$(next); - return; - } - } - this.done(); - }}), GeneratorSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(getInitialValue, getNextValue) { - this.getInitialValue_of3t40$ = getInitialValue; - this.getNextValue_wqyet1$ = getNextValue; - }, {iterator:function() { - return new _.kotlin.sequences.GeneratorSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$GeneratorSequence_0) { - this.this$GeneratorSequence_0 = this$GeneratorSequence_0; - this.nextItem = null; - this.nextState = -2; - }, {calcNext:function() { - var tmp$0; - this.nextItem = this.nextState === -2 ? this.this$GeneratorSequence_0.getInitialValue_of3t40$() : this.this$GeneratorSequence_0.getNextValue_wqyet1$((tmp$0 = this.nextItem) != null ? tmp$0 : Kotlin.throwNPE()); - this.nextState = this.nextItem == null ? 0 : 1; - }, next:function() { - var tmp$0; - if (this.nextState < 0) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = (tmp$0 = this.nextItem) != null ? tmp$0 : Kotlin.throwCCE(); - this.nextState = -1; - return result; - }, hasNext:function() { - if (this.nextState < 0) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), constrainOnce_uya9q7$:function($receiver) { - return Kotlin.isType($receiver, _.kotlin.sequences.ConstrainedOnceSequence) ? $receiver : new _.kotlin.sequences.ConstrainedOnceSequence($receiver); - }, generateSequence_un3fny$f:function(closure$nextFunction) { - return function(it) { - return closure$nextFunction(); - }; - }, generateSequence_un3fny$:function(nextFunction) { - return _.kotlin.sequences.constrainOnce_uya9q7$(new _.kotlin.sequences.GeneratorSequence(nextFunction, _.kotlin.sequences.generateSequence_un3fny$f(nextFunction))); - }, generateSequence_hiyix$f:function(closure$seed) { - return function() { - return closure$seed; - }; - }, generateSequence_hiyix$:function(seed, nextFunction) { - return seed == null ? _.kotlin.sequences.EmptySequence : new _.kotlin.sequences.GeneratorSequence(_.kotlin.sequences.generateSequence_hiyix$f(seed), nextFunction); - }, generateSequence_x7nywq$:function(seedFunction, nextFunction) { - return new _.kotlin.sequences.GeneratorSequence(seedFunction, nextFunction); - }}), dom:Kotlin.definePackage(null, {build:Kotlin.definePackage(null, {createElement_juqb3g$:function($receiver, name, init) { - var elem = $receiver.createElement(name); - init.call(elem); - return elem; - }, createElement_hart3b$:function($receiver, name, doc, init) { - if (doc === void 0) { - doc = null; - } - var elem = _.kotlin.dom.ownerDocument_pmnl5l$($receiver, doc).createElement(name); - init.call(elem); - return elem; - }, addElement_juqb3g$:function($receiver, name, init) { - var child = _.kotlin.dom.build.createElement_juqb3g$($receiver, name, init); - $receiver.appendChild(child); - return child; - }, addElement_hart3b$:function($receiver, name, doc, init) { - if (doc === void 0) { - doc = null; - } - var child = _.kotlin.dom.build.createElement_hart3b$($receiver, name, doc, init); - $receiver.appendChild(child); - return child; - }}), hasClass_cjmw3z$:function($receiver, cssClass) { - return _.kotlin.text.Regex_61zpoe$("(^|.*" + "\\" + "s+)" + cssClass + "(" + "$" + "|" + "\\" + "s+.*)").matches_6bul2c$($receiver.className); - }, addClass_fwdim7$:function($receiver, cssClasses) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = cssClasses, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!_.kotlin.dom.hasClass_cjmw3z$($receiver, element)) { - destination.add_za3rmp$(element); - } - } - var missingClasses = destination; - if (!missingClasses.isEmpty()) { - var tmp$3; - var presentClasses = _.kotlin.text.trim_gw00vq$($receiver.className).toString(); - var $receiver_0 = new Kotlin.StringBuilder; - $receiver_0.append(presentClasses); - if (!(presentClasses.length === 0)) { - $receiver_0.append(" "); - } - _.kotlin.collections.joinTo_euycuk$(missingClasses, $receiver_0, " "); - $receiver.className = $receiver_0.toString(); - return true; - } - return false; - }, removeClass_fwdim7$:function($receiver, cssClasses) { - var any_dgtl0h$result; - any_dgtl0h$break: { - var tmp$0, tmp$1, tmp$2; - tmp$0 = cssClasses, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (_.kotlin.dom.hasClass_cjmw3z$($receiver, element)) { - any_dgtl0h$result = true; - break any_dgtl0h$break; - } - } - any_dgtl0h$result = false; - } - if (any_dgtl0h$result) { - var toBeRemoved = _.kotlin.collections.toSet_eg9ybj$(cssClasses); - var tmp$4; - var tmp$3 = _.kotlin.text.trim_gw00vq$($receiver.className).toString(); - var toRegex_pdl1w0$result; - toRegex_pdl1w0$result = _.kotlin.text.Regex_61zpoe$("\\s+"); - var limit; - var split_nhz2th$result; - limit = 0; - split_nhz2th$result = toRegex_pdl1w0$result.split_905azu$(tmp$3, limit); - var destination = new Kotlin.ArrayList; - var tmp$5; - tmp$5 = split_nhz2th$result.iterator(); - while (tmp$5.hasNext()) { - var element_0 = tmp$5.next(); - if (!toBeRemoved.contains_za3rmp$(element_0)) { - destination.add_za3rmp$(element_0); - } - } - $receiver.className = _.kotlin.collections.joinToString_ld60a2$(destination, " "); - return true; - } - return false; - }, children_ejp6nl$:function($receiver) { - var tmp$0, tmp$1; - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.childNodes : null) != null ? _.kotlin.dom.asList_d3eamn$(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, childElements_ejp6nl$:function($receiver) { - var tmp$0, tmp$1; - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.childNodes : null) != null ? _.kotlin.dom.filterElements_d3eamn$(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, childElements_cjmw3z$:function($receiver, name) { - var tmp$0, tmp$1, tmp$2; - var tmp$3; - if ((tmp$1 = (tmp$0 = $receiver != null ? $receiver.childNodes : null) != null ? _.kotlin.dom.filterElements_d3eamn$(tmp$0) : null) != null) { - var destination = new Kotlin.ArrayList; - var tmp$4; - tmp$4 = tmp$1.iterator(); - while (tmp$4.hasNext()) { - var element = tmp$4.next(); - if (Kotlin.equals(element.nodeName, name)) { - destination.add_za3rmp$(element); - } - } - tmp$3 = destination; - } else { - tmp$3 = null; - } - return(tmp$2 = tmp$3) != null ? tmp$2 : _.kotlin.collections.emptyList(); - }, get_elements_4wc2mi$:{value:function($receiver) { - return _.kotlin.dom.elements_nnvvt4$($receiver); - }}, get_elements_ejp6nl$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.elements_cjmw3z$($receiver) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }}, elements_cjmw3z$_0:function($receiver, localName) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.elements_cjmw3z$($receiver, localName) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, elements_cjmw3z$:function($receiver, localName) { - if (localName === void 0) { - localName = "*"; - } - return _.kotlin.dom.asElementList_1($receiver.getElementsByTagName(localName)); - }, elements_nnvvt4$:function($receiver, localName) { - var tmp$0, tmp$1; - if (localName === void 0) { - localName = "*"; - } - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.getElementsByTagName(localName) : null) != null ? _.kotlin.dom.asElementList_1(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, elements_achogv$:function($receiver, namespaceUri, localName) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.elements_achogv$_0($receiver, namespaceUri, localName) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, elements_achogv$_0:function($receiver, namespaceUri, localName) { - return _.kotlin.dom.asElementList_1($receiver.getElementsByTagNameNS(namespaceUri, localName)); - }, elements_awnjmu$:function($receiver, namespaceUri, localName) { - var tmp$0, tmp$1; - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.getElementsByTagNameNS(namespaceUri, localName) : null) != null ? _.kotlin.dom.asElementList_1(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, asList_d3eamn$_0:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, asList_d3eamn$:function($receiver) { - return new _.kotlin.dom.NodeListAsList($receiver); - }, toElementList_d3eamn$:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asElementList_d3eamn$($receiver) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, asElementList_d3eamn$:function($receiver) { - return $receiver.length === 0 ? _.kotlin.collections.emptyList() : new _.kotlin.dom.ElementListAsList($receiver); - }, filterElements_24irbb$:function($receiver) { - var tmp$0; - var tmp$1 = Kotlin.isInstanceOf(Kotlin.modules["builtins"].kotlin.collections.List); - var destination = new Kotlin.ArrayList; - var tmp$2; - tmp$2 = $receiver.iterator(); - while (tmp$2.hasNext()) { - var element = tmp$2.next(); - if (_.kotlin.dom.get_isElement_asww5t$(element)) { - destination.add_za3rmp$(element); - } - } - return tmp$1(tmp$0 = destination) ? tmp$0 : Kotlin.throwCCE(); - }, filterElements_d3eamn$:function($receiver) { - return _.kotlin.dom.filterElements_24irbb$(_.kotlin.dom.asList_d3eamn$($receiver)); - }, NodeListAsList:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this); - this.delegate_jo5qae$ = delegate; - }, {size:{get:function() { - return this.delegate_jo5qae$.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$(index)) { - return(tmp$0 = this.delegate_jo5qae$.item(index)) != null ? tmp$0 : Kotlin.throwNPE(); - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + index + " is not in range [0 .. " + (this.size - 1) + ")"); - } - }}), ElementListAsList:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(nodeList) { - $fun.baseInitializer.call(this); - this.nodeList_yjzc8t$ = nodeList; - }, {get_za3lpa$:function(index) { - var tmp$0; - var node = this.nodeList_yjzc8t$.item(index); - if (node == null) { - throw new Kotlin.IndexOutOfBoundsException("NodeList does not contain a node at index: " + index); - } else { - if (node.nodeType === Node.ELEMENT_NODE) { - return Kotlin.isType(tmp$0 = node, Element) ? tmp$0 : Kotlin.throwCCE(); - } else { - throw new Kotlin.IllegalArgumentException("Node is not an Element as expected but is " + Kotlin.toString(node)); - } - } - }, size:{get:function() { - return this.nodeList_yjzc8t$.length; - }}}), nextSiblings_asww5t$:function($receiver) { - return new _.kotlin.dom.NextSiblings($receiver); - }, NextSiblings:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(node) { - this.node_9zprnx$ = node; - }, {iterator:function() { - return new _.kotlin.dom.NextSiblings.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[_.kotlin.collections.AbstractIterator]; - }, function $fun(this$NextSiblings_0) { - this.this$NextSiblings_0 = this$NextSiblings_0; - $fun.baseInitializer.call(this); - }, {computeNext:function() { - var nextValue = this.this$NextSiblings_0.node_9zprnx$.nextSibling; - if (nextValue != null) { - this.setNext_za3rmp$(nextValue); - this.this$NextSiblings_0.node_9zprnx$ = nextValue; - } else { - this.done(); - } - }}, {})}), previousSiblings_asww5t$:function($receiver) { - return new _.kotlin.dom.PreviousSiblings($receiver); - }, PreviousSiblings:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(node) { - this.node_ugyp4f$ = node; - }, {iterator:function() { - return new _.kotlin.dom.PreviousSiblings.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[_.kotlin.collections.AbstractIterator]; - }, function $fun(this$PreviousSiblings_0) { - this.this$PreviousSiblings_0 = this$PreviousSiblings_0; - $fun.baseInitializer.call(this); - }, {computeNext:function() { - var nextValue = this.this$PreviousSiblings_0.node_ugyp4f$.previousSibling; - if (nextValue != null) { - this.setNext_za3rmp$(nextValue); - this.this$PreviousSiblings_0.node_ugyp4f$ = nextValue; - } else { - this.done(); - } - }}, {})}), get_isText_asww5t$:{value:function($receiver) { - return $receiver.nodeType === Node.TEXT_NODE || $receiver.nodeType === Node.CDATA_SECTION_NODE; - }}, get_isElement_asww5t$:{value:function($receiver) { - return $receiver.nodeType === Node.ELEMENT_NODE; - }}, attribute_cjmw3z$:function($receiver, name) { - var tmp$0; - return(tmp$0 = $receiver.getAttribute(name)) != null ? tmp$0 : ""; - }, get_head_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.firstOrNull_a7ptmv$(tmp$0) : null; - }}, get_first_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.firstOrNull_a7ptmv$(tmp$0) : null; - }}, get_last_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.lastOrNull_a7ptmv$(tmp$0) : null; - }}, get_tail_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.lastOrNull_a7ptmv$(tmp$0) : null; - }}, eventHandler_kcwmyb$:function(handler) { - return new _.kotlin.dom.EventListenerHandler(handler); - }, EventListenerHandler:Kotlin.createClass(null, function(handler) { - this.handler_nfhy41$ = handler; - }, {handleEvent:function(e) { - this.handler_nfhy41$(e); - }, toString:function() { - return "EventListenerHandler(" + this.handler_nfhy41$ + ")"; - }}), mouseEventHandler_3m19zy$f:function(closure$handler) { - return function(e) { - if (Kotlin.isType(e, MouseEvent)) { - closure$handler(e); - } - }; - }, mouseEventHandler_3m19zy$:function(handler) { - return _.kotlin.dom.eventHandler_kcwmyb$(_.kotlin.dom.mouseEventHandler_3m19zy$f(handler)); - }, on_9k7t35$:function($receiver, name, capture, handler) { - return _.kotlin.dom.on_edii0a$($receiver, name, capture, _.kotlin.dom.eventHandler_kcwmyb$(handler)); - }, on_edii0a$:function($receiver, name, capture, listener) { - var tmp$0; - if (Kotlin.isType($receiver, EventTarget)) { - $receiver.addEventListener(name, listener, capture); - tmp$0 = new _.kotlin.dom.CloseableEventListener($receiver, listener, name, capture); - } else { - tmp$0 = null; - } - return tmp$0; - }, CloseableEventListener:Kotlin.createClass(function() { - return[Kotlin.Closeable]; - }, function(target, listener, name, capture) { - this.target_isfv2i$ = target; - this.listener_q3o4k3$ = listener; - this.name_a3xzng$ = name; - this.capture_m7iaz7$ = capture; - }, {close:function() { - this.target_isfv2i$.removeEventListener(this.name_a3xzng$, this.listener_q3o4k3$, this.capture_m7iaz7$); - }, toString:function() { - return "CloseableEventListener(" + this.target_isfv2i$ + ", " + this.name_a3xzng$ + ")"; - }}), onClick_g2lu80$:function($receiver, capture, handler) { - if (capture === void 0) { - capture = false; - } - return _.kotlin.dom.on_edii0a$($receiver, "click", capture, _.kotlin.dom.mouseEventHandler_3m19zy$(handler)); - }, onDoubleClick_g2lu80$:function($receiver, capture, handler) { - if (capture === void 0) { - capture = false; - } - return _.kotlin.dom.on_edii0a$($receiver, "dblclick", capture, _.kotlin.dom.mouseEventHandler_3m19zy$(handler)); - }, get_nnvvt4$:function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - return(tmp$2 = (tmp$1 = (tmp$0 = $receiver != null ? $receiver.querySelectorAll(selector) : null) != null ? _.kotlin.dom.asList_d3eamn$(tmp$0) : null) != null ? _.kotlin.dom.filterElements_24irbb$(tmp$1) : null) != null ? tmp$2 : _.kotlin.collections.emptyList(); - }, get_cjmw3z$:function($receiver, selector) { - return _.kotlin.dom.filterElements_24irbb$(_.kotlin.dom.asList_d3eamn$($receiver.querySelectorAll(selector))); - }, HTMLCollectionListView:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(collection) { - $fun.baseInitializer.call(this); - this.collection = collection; - }, {size:{get:function() { - return this.collection.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$(index)) { - return Kotlin.isType(tmp$0 = this.collection.item(index), HTMLElement) ? tmp$0 : Kotlin.throwCCE(); - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + index + " is not in range [0 .. " + (this.size - 1) + ")"); - } - }}), asList_sg7yuw$:function($receiver) { - return new _.kotlin.dom.HTMLCollectionListView($receiver); - }, DOMTokenListView:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this); - this.delegate = delegate; - }, {size:{get:function() { - return this.delegate.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$(index)) { - return(tmp$0 = this.delegate.item(index)) != null ? tmp$0 : Kotlin.throwNPE(); - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + index + " is not in range [0 .. " + (this.size - 1) + ")"); - } - }}), asList_u75qis$:function($receiver) { - return new _.kotlin.dom.DOMTokenListView($receiver); - }, asElementList_1:function($receiver) { - return _.kotlin.dom.asList_sg7yuw$($receiver); - }, clear_asww5t$:function($receiver) { - var tmp$0; - while ($receiver.hasChildNodes()) { - $receiver.removeChild((tmp$0 = $receiver.firstChild) != null ? tmp$0 : Kotlin.throwNPE()); - } - }, removeFromParent_asww5t$:function($receiver) { - var tmp$0; - (tmp$0 = $receiver.parentNode) != null ? tmp$0.removeChild($receiver) : null; - }, plus_6xfunm$:function($receiver, child) { - $receiver.appendChild(child); - return $receiver; - }, plus_cjmw3z$:function($receiver, text) { - return _.kotlin.dom.appendText_esmrqt$($receiver, text); - }, plusAssign_cjmw3z$:function($receiver, text) { - _.kotlin.dom.appendText_esmrqt$($receiver, text); - }, ownerDocument_pmnl5l$:function($receiver, doc) { - var tmp$0, tmp$1; - if (doc === void 0) { - doc = null; - } - if ($receiver.nodeType === Node.DOCUMENT_NODE) { - return Kotlin.isType(tmp$0 = $receiver, Document) ? tmp$0 : Kotlin.throwCCE(); - } else { - tmp$1 = doc != null ? doc : $receiver.ownerDocument; - if (tmp$1 == null) { - throw new Kotlin.IllegalArgumentException("Neither node contains nor parameter doc provides an owner document for " + $receiver); - } - return tmp$1; - } - }, addText_esmrqt$:function($receiver, text, doc) { - if (doc === void 0) { - doc = null; - } - return _.kotlin.dom.appendText_esmrqt$($receiver, text, doc); - }, addText_cjmw3z$:function($receiver, text) { - return _.kotlin.dom.appendText_esmrqt$($receiver, text); - }, appendText_esmrqt$:function($receiver, text, doc) { - if (doc === void 0) { - doc = null; - } - $receiver.appendChild(_.kotlin.dom.ownerDocument_pmnl5l$($receiver, doc).createTextNode(text)); - return $receiver; - }, appendTo_5kzm9c$:function($receiver, parent) { - parent.appendChild($receiver); - }, createDocument:function() { - return new Document; - }, toXmlString_asww5t$:function($receiver) { - return $receiver.outerHTML; - }, toXmlString_rq0l4m$:function($receiver, xmlDeclaration) { - return $receiver.outerHTML; - }}), test:Kotlin.definePackage(function() { - this.asserter = new _.kotlin.test.QUnitAsserter; - }, {todo_un3fny$:function(block) { - Kotlin.println("TODO at " + block); - }, QUnitAsserter:Kotlin.createClass(function() { - return[_.kotlin.test.Asserter]; - }, null, {assertTrue_tup0fe$:function(lazyMessage, actual) { - _.kotlin.test.assertTrue_8kj6y5$(actual, lazyMessage()); - }, assertTrue_ivxn3r$:function(message, actual) { - ok(actual, message); - if (!actual) { - this.failWithMessage(message); - } - }, fail_61zpoe$:function(message) { - ok(false, message); - this.failWithMessage(message); - }, failWithMessage:function(message) { - if (message == null) { - throw new Kotlin.AssertionError; - } else { - throw new Kotlin.AssertionError(message); - } - }}), assertTrue_c0mt8g$:function(message, block) { - if (message === void 0) { - message = null; - } - _.kotlin.test.assertTrue_8kj6y5$(block(), message); - }, assertTrue_8kj6y5$:function(actual, message) { - if (message === void 0) { - message = null; - } - return _.kotlin.test.asserter.assertTrue_ivxn3r$(message != null ? message : "Expected value to be true.", actual); - }, assertFalse_c0mt8g$:function(message, block) { - if (message === void 0) { - message = null; - } - _.kotlin.test.assertFalse_8kj6y5$(block(), message); - }, assertFalse_8kj6y5$:function(actual, message) { - if (message === void 0) { - message = null; - } - return _.kotlin.test.asserter.assertTrue_ivxn3r$(message != null ? message : "Expected value to be false.", !actual); - }, assertEquals_8vv676$:function(expected, actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertEquals_a59ba6$(message, expected, actual); - }, assertNotEquals_8vv676$:function(illegal, actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNotEquals_a59ba6$(message, illegal, actual); - }, assertNotNull_hwpqgh$:function(actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNotNull_bm4g0d$(message, actual); - return actual != null ? actual : Kotlin.throwNPE(); - }, assertNotNull_nbs6dl$:function(actual, message, block) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNotNull_bm4g0d$(message, actual); - if (actual != null) { - block(actual); - } - }, assertNull_hwpqgh$:function(actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNull_bm4g0d$(message, actual); - }, fail_61zpoe$:function(message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.fail_61zpoe$(message); - }, expect_pzucw5$:function(expected, block) { - _.kotlin.test.assertEquals_8vv676$(expected, block()); - }, expect_s8u0d3$:function(expected, message, block) { - _.kotlin.test.assertEquals_8vv676$(expected, block(), message); - }, assertFails_qshda6$:function(block) { - try { - block(); - } catch (e) { - return e; - } - _.kotlin.test.asserter.fail_61zpoe$("Expected an exception to be thrown"); - }, Asserter:Kotlin.createTrait(null, {assertTrue_tup0fe$:function(lazyMessage, actual) { - if (!actual) { - this.fail_61zpoe$(lazyMessage()); - } - }, assertTrue_ivxn3r$:function(message, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertTrue_ivxn3r$f(message), actual); - }, assertEquals_a59ba6$:function(message, expected, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertEquals_a59ba6$f(message, expected, actual), Kotlin.equals(actual, expected)); - }, assertNotEquals_a59ba6$:function(message, illegal, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertNotEquals_a59ba6$f(message, actual), !Kotlin.equals(actual, illegal)); - }, assertNull_bm4g0d$:function(message, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertNull_bm4g0d$f(message, actual), actual == null); - }, assertNotNull_bm4g0d$:function(message, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertNotNull_bm4g0d$f(message), actual != null); - }}, {assertTrue_ivxn3r$f:function(closure$message) { - return function() { - return closure$message; - }; - }, assertEquals_a59ba6$f:function(closure$message, closure$expected, closure$actual) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + ("Expected \x3c" + Kotlin.toString(closure$expected) + "\x3e, actual \x3c" + Kotlin.toString(closure$actual) + "\x3e."); - }; - }, assertNotEquals_a59ba6$f:function(closure$message, closure$actual) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + ("Illegal value: \x3c" + Kotlin.toString(closure$actual) + "\x3e."); - }; - }, assertNull_bm4g0d$f:function(closure$message, closure$actual) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + ("Expected value to be null, but was: \x3c" + Kotlin.toString(closure$actual) + "\x3e."); - }; - }, assertNotNull_bm4g0d$f:function(closure$message) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + "Expected value to be not null."; - }; - }}), AsserterContributor:Kotlin.createTrait(null)}), annotation:Kotlin.definePackage(null, {AnnotationTarget:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, ANNOTATION_CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FIELD:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, LOCAL_VARIABLE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, VALUE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, CONSTRUCTOR:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FUNCTION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_GETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_SETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, EXPRESSION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FILE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }}; - }), AnnotationRetention:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{SOURCE:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, BINARY:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, RUNTIME:function() { - return new _.kotlin.annotation.AnnotationRetention; - }}; - }), Target:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(allowedTargets) { - this.allowedTargets = allowedTargets; - }), Retention:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(value) { - if (value === void 0) { - value = _.kotlin.annotation.AnnotationRetention.RUNTIME; - } - this.value = value; - }), Repeatable:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), MustBeDocumented:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)}), reflect:Kotlin.definePackage(null, {KAnnotatedElement:Kotlin.createTrait(null), KCallable:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KAnnotatedElement]; - }), KClass:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KAnnotatedElement, _.kotlin.reflect.KDeclarationContainer]; - }), KDeclarationContainer:Kotlin.createTrait(null), KFunction:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function, _.kotlin.reflect.KCallable]; - }), KParameter:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KAnnotatedElement]; - }, null, {Kind:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{INSTANCE:function() { - return new _.kotlin.reflect.KParameter.Kind; - }, EXTENSION_RECEIVER:function() { - return new _.kotlin.reflect.KParameter.Kind; - }, VALUE:function() { - return new _.kotlin.reflect.KParameter.Kind; - }}; - })}), KProperty:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KCallable]; - }, null, {Accessor:Kotlin.createTrait(null), Getter:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KFunction, _.kotlin.reflect.KProperty.Accessor]; - })}), KMutableProperty:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KProperty]; - }, null, {Setter:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KFunction, _.kotlin.reflect.KProperty.Accessor]; - })}), KProperty0:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function0, _.kotlin.reflect.KProperty]; - }, null, {Getter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function0, _.kotlin.reflect.KProperty.Getter]; - })}), KMutableProperty0:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KMutableProperty, _.kotlin.reflect.KProperty0]; - }, null, {Setter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function1, _.kotlin.reflect.KMutableProperty.Setter]; - })}), KProperty1:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function1, _.kotlin.reflect.KProperty]; - }, null, {Getter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function1, _.kotlin.reflect.KProperty.Getter]; - })}), KMutableProperty1:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KMutableProperty, _.kotlin.reflect.KProperty1]; - }, null, {Setter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function2, _.kotlin.reflect.KMutableProperty.Setter]; - })}), KProperty2:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function2, _.kotlin.reflect.KProperty]; - }, null, {Getter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function2, _.kotlin.reflect.KProperty.Getter]; - })}), KMutableProperty2:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KMutableProperty, _.kotlin.reflect.KProperty2]; - }, null, {Setter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function3, _.kotlin.reflect.KMutableProperty.Setter]; - })}), KType:Kotlin.createTrait(null)}), ranges:Kotlin.definePackage(null, {contains_axyzkj$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_noyhde$:function($receiver, value) { - return $receiver.start.compareTo_za3rmp$(Kotlin.Long.fromInt(value)) <= 0 && Kotlin.Long.fromInt(value).compareTo_za3rmp$($receiver.endInclusive) <= 0; - }, contains_7vxq2o$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_qod4al$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_tzsk0w$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_3hpgcq$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_uw1xdx$:function($receiver, value) { - return $receiver.start.toNumber() <= value && value <= $receiver.endInclusive.toNumber(); - }, contains_o0k7u7$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_jz6vw7$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_d9tryv$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_fyef13$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_o8j6lu$:function($receiver, value) { - return $receiver.start.toNumber() <= value && value <= $receiver.endInclusive.toNumber(); - }, contains_sas5oe$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_vgo278$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_pc36rd$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_8efj5n$:function($receiver, value) { - return $receiver.start.compareTo_za3rmp$(Kotlin.Long.fromInt(value)) <= 0 && Kotlin.Long.fromInt(value).compareTo_za3rmp$($receiver.endInclusive) <= 0; - }, contains_ro5ap$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_8wsbwp$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_8aysva$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_ll81hz$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_axst9b$:function($receiver, value) { - return Kotlin.Long.fromInt($receiver.start).compareTo_za3rmp$(value) <= 0 && value.compareTo_za3rmp$(Kotlin.Long.fromInt($receiver.endInclusive)) <= 0; - }, contains_ntuhui$:function($receiver, value) { - return Kotlin.Long.fromInt($receiver.start).compareTo_za3rmp$(value) <= 0 && value.compareTo_za3rmp$(Kotlin.Long.fromInt($receiver.endInclusive)) <= 0; - }, contains_7w3wdw$:function($receiver, value) { - return Kotlin.Long.fromInt($receiver.start).compareTo_za3rmp$(value) <= 0 && value.compareTo_za3rmp$(Kotlin.Long.fromInt($receiver.endInclusive)) <= 0; - }, contains_qojalt$:function($receiver, value) { - return $receiver.start <= value.toNumber() && value.toNumber() <= $receiver.endInclusive; - }, contains_tzyqc4$:function($receiver, value) { - return $receiver.start <= value.toNumber() && value.toNumber() <= $receiver.endInclusive; - }, contains_g5h77b$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_oflys2$:function($receiver, value) { - return $receiver.start.compareTo_za3rmp$(Kotlin.Long.fromInt(value)) <= 0 && Kotlin.Long.fromInt(value).compareTo_za3rmp$($receiver.endInclusive) <= 0; - }, contains_shuxum$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_p50el5$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_6o6338$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, downTo_2jcion$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_jzdo0$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, Kotlin.Long.fromInt(to), Kotlin.Long.NEG_ONE); - }, downTo_9q324c$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_9r634a$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_sd97h4$:function($receiver, to) { - return new Kotlin.CharProgression($receiver, to, -1); - }, downTo_rksjo2$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_mw85q1$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, Kotlin.Long.fromInt(to), Kotlin.Long.NEG_ONE); - }, downTo_y20kcl$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_rt69vj$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_2j6cdf$:function($receiver, to) { - return new Kotlin.LongProgression(Kotlin.Long.fromInt($receiver), to, Kotlin.Long.NEG_ONE); - }, downTo_k5jz8$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, to, Kotlin.Long.NEG_ONE); - }, downTo_9q98fk$:function($receiver, to) { - return new Kotlin.LongProgression(Kotlin.Long.fromInt($receiver), to, Kotlin.Long.NEG_ONE); - }, downTo_9qzwt2$:function($receiver, to) { - return new Kotlin.LongProgression(Kotlin.Long.fromInt($receiver), to, Kotlin.Long.NEG_ONE); - }, downTo_7dmh8l$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_hgibo4$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, Kotlin.Long.fromInt(to), Kotlin.Long.NEG_ONE); - }, downTo_hl85u0$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_i0qws2$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, reversed_zf1xzd$:function($receiver) { - return new Kotlin.NumberProgression($receiver.last, $receiver.first, -$receiver.step); - }, reversed_3080ca$:function($receiver) { - return new Kotlin.LongProgression($receiver.last, $receiver.first, $receiver.step.unaryMinus()); - }, reversed_uthk7o$:function($receiver) { - return new Kotlin.CharProgression($receiver.last, $receiver.first, -$receiver.step); - }, step_7isp7r$:function($receiver, step) { - _.kotlin.ranges.checkStepIsPositive(step > 0, step); - return new Kotlin.NumberProgression($receiver.first, $receiver.last, $receiver.step > 0 ? step : -step); - }, step_bwrvkh$:function($receiver, step) { - _.kotlin.ranges.checkStepIsPositive(step.compareTo_za3rmp$(Kotlin.Long.fromInt(0)) > 0, step); - return new Kotlin.LongProgression($receiver.first, $receiver.last, $receiver.step.compareTo_za3rmp$(Kotlin.Long.fromInt(0)) > 0 ? step : step.unaryMinus()); - }, step_kw37re$:function($receiver, step) { - _.kotlin.ranges.checkStepIsPositive(step > 0, step); - return new Kotlin.CharProgression($receiver.first, $receiver.last, $receiver.step > 0 ? step : -step); - }, until_2jcion$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_jzdo0$:function($receiver, to) { - return $receiver.rangeTo(Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1))); - }, until_9q324c$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_9r634a$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_sd97h4$:function($receiver, to) { - var to_ = Kotlin.toChar(to.charCodeAt(0) - 1); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.CharRange($receiver, to_); - }, until_rksjo2$:function($receiver, to) { - var to_ = Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1)).toInt(); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.NumberRange($receiver, to_); - }, until_mw85q1$:function($receiver, to) { - return $receiver.rangeTo(Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1))); - }, until_y20kcl$:function($receiver, to) { - var to_ = Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1)).toInt(); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.NumberRange($receiver, to_); - }, until_rt69vj$:function($receiver, to) { - var to_ = Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1)).toInt(); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.NumberRange($receiver, to_); - }, until_2j6cdf$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return Kotlin.Long.fromInt($receiver).rangeTo(to_); - }, until_k5jz8$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return $receiver.rangeTo(to_); - }, until_9q98fk$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return Kotlin.Long.fromInt($receiver).rangeTo(to_); - }, until_9qzwt2$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return Kotlin.Long.fromInt($receiver).rangeTo(to_); - }, until_7dmh8l$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_hgibo4$:function($receiver, to) { - return $receiver.rangeTo(Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1))); - }, until_hl85u0$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_i0qws2$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, coerceAtLeast_n1zt5e$:function($receiver, minimumValue) { - return Kotlin.compareTo($receiver, minimumValue) < 0 ? minimumValue : $receiver; - }, coerceAtLeast_9q324c$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_i0qws2$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_rksjo2$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_k5jz8$:function($receiver, minimumValue) { - return $receiver.compareTo_za3rmp$(minimumValue) < 0 ? minimumValue : $receiver; - }, coerceAtLeast_3w14zy$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_541hxq$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtMost_n1zt5e$:function($receiver, maximumValue) { - return Kotlin.compareTo($receiver, maximumValue) > 0 ? maximumValue : $receiver; - }, coerceAtMost_9q324c$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_i0qws2$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_rksjo2$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_k5jz8$:function($receiver, maximumValue) { - return $receiver.compareTo_za3rmp$(maximumValue) > 0 ? maximumValue : $receiver; - }, coerceAtMost_3w14zy$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_541hxq$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceIn_bgp82y$:function($receiver, minimumValue, maximumValue) { - if (minimumValue !== null && maximumValue !== null) { - if (Kotlin.compareTo(minimumValue, maximumValue) > 0) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + Kotlin.toString(maximumValue) + " is less than minimum " + Kotlin.toString(minimumValue) + "."); - } - if (Kotlin.compareTo($receiver, minimumValue) < 0) { - return minimumValue; - } - if (Kotlin.compareTo($receiver, maximumValue) > 0) { - return maximumValue; - } - } else { - if (minimumValue !== null && Kotlin.compareTo($receiver, minimumValue) < 0) { - return minimumValue; - } - if (maximumValue !== null && Kotlin.compareTo($receiver, maximumValue) > 0) { - return maximumValue; - } - } - return $receiver; - }, coerceIn_fhjj23$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_j4lnkd$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_n6qkdc$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_dh3qhr$:function($receiver, minimumValue, maximumValue) { - if (minimumValue.compareTo_za3rmp$(maximumValue) > 0) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver.compareTo_za3rmp$(minimumValue) < 0) { - return minimumValue; - } - if ($receiver.compareTo_za3rmp$(maximumValue) > 0) { - return maximumValue; - } - return $receiver; - }, coerceIn_x1n98z$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_rq40gw$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_4yefu9$:function($receiver, range) { - if (range.isEmpty()) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: " + range + "."); - } - return Kotlin.compareTo($receiver, range.start) < 0 ? range.start : Kotlin.compareTo($receiver, range.endInclusive) > 0 ? range.endInclusive : $receiver; - }, coerceIn_3p661y$:function($receiver, range) { - if (range.isEmpty()) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: " + range + "."); - } - return $receiver < range.start ? range.start : $receiver > range.endInclusive ? range.endInclusive : $receiver; - }, coerceIn_zhas5s$:function($receiver, range) { - if (range.isEmpty()) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: " + range + "."); - } - return $receiver.compareTo_za3rmp$(range.start) < 0 ? range.start : $receiver.compareTo_za3rmp$(range.endInclusive) > 0 ? range.endInclusive : $receiver; - }, ComparableRange:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange]; - }, function(start, endInclusive) { - this.$start_v9qu5w$ = start; - this.$endInclusive_edlu3r$ = endInclusive; - }, {start:{get:function() { - return this.$start_v9qu5w$; - }}, endInclusive:{get:function() { - return this.$endInclusive_edlu3r$; - }}, equals_za3rmp$:function(other) { - return Kotlin.isType(other, _.kotlin.ranges.ComparableRange) && (this.isEmpty() && other.isEmpty() || Kotlin.equals(this.start, other.start) && Kotlin.equals(this.endInclusive, other.endInclusive)); - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * Kotlin.hashCode(this.start) + Kotlin.hashCode(this.endInclusive); - }, toString:function() { - return this.start + ".." + this.endInclusive; - }}), rangeTo_n1zt5e$:function($receiver, that) { - return new _.kotlin.ranges.ComparableRange($receiver, that); - }, checkStepIsPositive:function(isPositive, step) { - if (!isPositive) { - throw new Kotlin.IllegalArgumentException("Step must be positive, was: " + step + "."); - } - }}), comparisons:Kotlin.definePackage(null, {compareValuesBy_hhbmn6$:function(a, b, selectors) { - var tmp$0, tmp$1, tmp$2; - if (!(selectors.length > 0)) { - var message = "Failed requirement."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - tmp$0 = selectors, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var fn = tmp$0[tmp$2]; - var v1 = fn(a); - var v2 = fn(b); - var diff = _.kotlin.comparisons.compareValues_cj5vqg$(v1, v2); - if (diff !== 0) { - return diff; - } - } - return 0; - }, compareValuesBy_mpbrga$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareValuesBy_mpbrga$", function(a, b, selector) { - return _.kotlin.comparisons.compareValues_cj5vqg$(selector(a), selector(b)); - }), compareValuesBy_hfyz69$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareValuesBy_hfyz69$", function(a, b, comparator, selector) { - return comparator.compare(selector(a), selector(b)); - }), compareValues_cj5vqg$:function(a, b) { - var tmp$0; - if (a === b) { - return 0; - } - if (a == null) { - return-1; - } - if (b == null) { - return 1; - } - return Kotlin.compareTo(Kotlin.isComparable(tmp$0 = a) ? tmp$0 : Kotlin.throwCCE(), b); - }, compareBy$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$selectors_0) { - this.closure$selectors_0 = closure$selectors_0; - }, {compare:function(a, b) { - return _.kotlin.comparisons.compareValuesBy_hhbmn6$(a, b, this.closure$selectors_0); - }}, {}), compareBy_so0gvy$:function(selectors) { - return new _.kotlin.comparisons.compareBy$f(selectors); - }, compareBy$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$selector_0) { - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), compareBy_lw40be$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareBy_lw40be$", function(selector) { - return new _.kotlin.comparisons.compareBy$f_0(selector); - }), compareBy$f_1:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0, closure$selector_0) { - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return this.closure$comparator_0.compare(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), compareBy_ej7qdr$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareBy_ej7qdr$", function(comparator, selector) { - return new _.kotlin.comparisons.compareBy$f_1(comparator, selector); - }), compareByDescending$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$selector_0) { - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), compareByDescending_lw40be$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareByDescending_lw40be$", function(selector) { - return new _.kotlin.comparisons.compareByDescending$f(selector); - }), compareByDescending$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0, closure$selector_0) { - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return this.closure$comparator_0.compare(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), compareByDescending_ej7qdr$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareByDescending_ej7qdr$", function(comparator, selector) { - return new _.kotlin.comparisons.compareByDescending$f_0(comparator, selector); - }), thenBy$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenBy_0, closure$selector_0) { - this.this$thenBy_0 = this$thenBy_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenBy_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), thenBy_602gcl$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenBy_602gcl$", function($receiver, selector) { - return new _.kotlin.comparisons.thenBy$f($receiver, selector); - }), thenBy$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenBy_0, closure$comparator_0, closure$selector_0) { - this.this$thenBy_0 = this$thenBy_0; - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenBy_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), thenBy_njrgee$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenBy_njrgee$", function($receiver, comparator, selector) { - return new _.kotlin.comparisons.thenBy$f_0($receiver, comparator, selector); - }), thenByDescending$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenByDescending_0, closure$selector_0) { - this.this$thenByDescending_0 = this$thenByDescending_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenByDescending_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), thenByDescending_602gcl$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenByDescending_602gcl$", function($receiver, selector) { - return new _.kotlin.comparisons.thenByDescending$f($receiver, selector); - }), thenByDescending$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenByDescending_0, closure$comparator_0, closure$selector_0) { - this.this$thenByDescending_0 = this$thenByDescending_0; - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenByDescending_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), thenByDescending_njrgee$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenByDescending_njrgee$", function($receiver, comparator, selector) { - return new _.kotlin.comparisons.thenByDescending$f_0($receiver, comparator, selector); - }), thenComparator$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenComparator_0, closure$comparison_0) { - this.this$thenComparator_0 = this$thenComparator_0; - this.closure$comparison_0 = closure$comparison_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenComparator_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparison_0(a, b); - }}, {}), thenComparator_y0jjk4$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenComparator_y0jjk4$", function($receiver, comparison) { - return new _.kotlin.comparisons.thenComparator$f($receiver, comparison); - }), then$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$then_0, closure$comparator_0) { - this.this$then_0 = this$then_0; - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - var previousCompare = this.this$then_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(a, b); - }}, {}), then_zdlmq6$:function($receiver, comparator) { - return new _.kotlin.comparisons.then$f($receiver, comparator); - }, thenDescending$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenDescending_0, closure$comparator_0) { - this.this$thenDescending_0 = this$thenDescending_0; - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenDescending_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(b, a); - }}, {}), thenDescending_zdlmq6$:function($receiver, comparator) { - return new _.kotlin.comparisons.thenDescending$f($receiver, comparator); - }, nullsFirst$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0) { - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - if (a === b) { - return 0; - } - if (a == null) { - return-1; - } - if (b == null) { - return 1; - } - return this.closure$comparator_0.compare(a, b); - }}, {}), nullsFirst_9wwew7$:function(comparator) { - return new _.kotlin.comparisons.nullsFirst$f(comparator); - }, nullsFirst:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.nullsFirst", function() { - return _.kotlin.comparisons.nullsFirst_9wwew7$(_.kotlin.comparisons.naturalOrder()); - }), nullsLast$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0) { - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - if (a === b) { - return 0; - } - if (a == null) { - return 1; - } - if (b == null) { - return-1; - } - return this.closure$comparator_0.compare(a, b); - }}, {}), nullsLast_9wwew7$:function(comparator) { - return new _.kotlin.comparisons.nullsLast$f(comparator); - }, nullsLast:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.nullsLast", function() { - return _.kotlin.comparisons.nullsLast_9wwew7$(_.kotlin.comparisons.naturalOrder()); - }), naturalOrder:function() { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.comparisons.NaturalOrderComparator, Kotlin.Comparator) ? tmp$0 : Kotlin.throwCCE(); - }, reverseOrder:function() { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.comparisons.ReverseOrderComparator, Kotlin.Comparator) ? tmp$0 : Kotlin.throwCCE(); - }, reversed_n7glsb$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, _.kotlin.comparisons.ReversedComparator)) { - return $receiver.comparator; - } else { - if ($receiver === _.kotlin.comparisons.NaturalOrderComparator) { - return Kotlin.isType(tmp$0 = _.kotlin.comparisons.ReverseOrderComparator, Kotlin.Comparator) ? tmp$0 : Kotlin.throwCCE(); - } else { - if ($receiver === _.kotlin.comparisons.ReverseOrderComparator) { - return Kotlin.isType(tmp$1 = _.kotlin.comparisons.NaturalOrderComparator, Kotlin.Comparator) ? tmp$1 : Kotlin.throwCCE(); - } else { - return new _.kotlin.comparisons.ReversedComparator($receiver); - } - } - } - }, ReversedComparator:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(comparator) { - this.comparator = comparator; - }, {compare:function(a, b) { - return this.comparator.compare(b, a); - }, reversed:function() { - return this.comparator; - }}), NaturalOrderComparator:Kotlin.createObject(function() { - return[Kotlin.Comparator]; - }, null, {compare:function(c1, c2) { - return Kotlin.compareTo(c1, c2); - }, reversed:function() { - return _.kotlin.comparisons.ReverseOrderComparator; - }}), ReverseOrderComparator:Kotlin.createObject(function() { - return[Kotlin.Comparator]; - }, null, {compare:function(c1, c2) { - return Kotlin.compareTo(c2, c1); - }, reversed:function() { - return _.kotlin.comparisons.NaturalOrderComparator; - }})}), internal:Kotlin.definePackage(null, {NoInfer:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), Exact:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), LowPriorityInOverloadResolution:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), HidesMembers:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), OnlyInputTypes:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), InlineOnly:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), InlineExposed:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)}), properties:Kotlin.definePackage(null, {Delegates:Kotlin.createObject(null, null, {notNull:function() { - return new _.kotlin.properties.NotNullVar; - }, observable_toa4sq$:Kotlin.defineInlineFunction("stdlib.kotlin.properties.Delegates.observable_toa4sq$", function(initialValue, onChange) { - return new _.kotlin.properties.Delegates.observable$f(onChange, initialValue); - }), vetoable_jyribq$:Kotlin.defineInlineFunction("stdlib.kotlin.properties.Delegates.vetoable_jyribq$", function(initialValue, onChange) { - return new _.kotlin.properties.Delegates.vetoable$f(onChange, initialValue); - })}, {observable$f:Kotlin.createClass(function() { - return[_.kotlin.properties.ObservableProperty]; - }, function $fun(closure$onChange_0, initialValue) { - this.closure$onChange_0 = closure$onChange_0; - $fun.baseInitializer.call(this, initialValue); - }, {afterChange_lle7lx$:function(property, oldValue, newValue) { - this.closure$onChange_0(property, oldValue, newValue); - }}, {}), vetoable$f:Kotlin.createClass(function() { - return[_.kotlin.properties.ObservableProperty]; - }, function $fun(closure$onChange_0, initialValue) { - this.closure$onChange_0 = closure$onChange_0; - $fun.baseInitializer.call(this, initialValue); - }, {beforeChange_lle7lx$:function(property, oldValue, newValue) { - return this.closure$onChange_0(property, oldValue, newValue); - }}, {})}), NotNullVar:Kotlin.createClass(function() { - return[_.kotlin.properties.ReadWriteProperty]; - }, function() { - this.value_s2ygim$ = null; - }, {getValue_dsk1ci$:function(thisRef, property) { - var tmp$0; - tmp$0 = this.value_s2ygim$; - if (tmp$0 == null) { - throw new Kotlin.IllegalStateException("Property " + property.name + " should be initialized before get."); - } - return tmp$0; - }, setValue_w32e13$:function(thisRef, property, value) { - this.value_s2ygim$ = value; - }}), ReadOnlyProperty:Kotlin.createTrait(null), ReadWriteProperty:Kotlin.createTrait(null), ObservableProperty:Kotlin.createClass(function() { - return[_.kotlin.properties.ReadWriteProperty]; - }, function(initialValue) { - this.value_gpmoc7$ = initialValue; - }, {beforeChange_lle7lx$:function(property, oldValue, newValue) { - return true; - }, afterChange_lle7lx$:function(property, oldValue, newValue) { - }, getValue_dsk1ci$:function(thisRef, property) { - return this.value_gpmoc7$; - }, setValue_w32e13$:function(thisRef, property, value) { - var oldValue = this.value_gpmoc7$; - if (!this.beforeChange_lle7lx$(property, oldValue, value)) { - return; - } - this.value_gpmoc7$ = value; - this.afterChange_lle7lx$(property, oldValue, value); - }})})}), java:Kotlin.definePackage(null, {io:Kotlin.definePackage(null, {Serializable:Kotlin.createTrait(null)}), lang:Kotlin.definePackage(null, {Runnable$f:Kotlin.createClass(function() { - return[Kotlin.Runnable]; - }, function(closure$action_0) { - this.closure$action_0 = closure$action_0; - }, {run:function() { - this.closure$action_0(); - }}, {}), Runnable_qshda6$:function(action) { - return new _.java.lang.Runnable$f(action); - }, StringBuilder_za3lpa$:Kotlin.defineInlineFunction("stdlib.java.lang.StringBuilder_za3lpa$", function(capacity) { - return new Kotlin.StringBuilder; - }), StringBuilder_6bul2c$:Kotlin.defineInlineFunction("stdlib.java.lang.StringBuilder_6bul2c$", function(content) { - return new Kotlin.StringBuilder(content.toString()); - })}), util:Kotlin.definePackage(null, {Comparator$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparison_0) { - this.closure$comparison_0 = closure$comparison_0; - }, {compare:function(obj1, obj2) { - return this.closure$comparison_0(obj1, obj2); - }}, {}), Comparator_67l1x5$:Kotlin.defineInlineFunction("stdlib.java.util.Comparator_67l1x5$", function(comparison) { - return new _.java.util.Comparator$f(comparison); - }), HashSet_wtfk93$:function(c) { - var $receiver = new Kotlin.ComplexHashSet(c.size); - $receiver.addAll_wtfk93$(c); - return $receiver; - }, LinkedHashSet_wtfk93$:function(c) { - var $receiver = new Kotlin.LinkedHashSet(c.size); - $receiver.addAll_wtfk93$(c); - return $receiver; - }, HashMap_r12sna$:function(m) { - var $receiver = new Kotlin.ComplexHashMap(m.size); - $receiver.putAll_r12sna$(m); - return $receiver; - }, LinkedHashMap_r12sna$:function(m) { - var $receiver = new Kotlin.LinkedHashMap(m.size); - $receiver.putAll_r12sna$(m); - return $receiver; - }, ArrayList_wtfk93$:function(c) { - var $receiver = new Kotlin.ArrayList; - $receiver.array = Kotlin.copyToArray(c); - return $receiver; - }, Collections:Kotlin.createObject(null, null, {max_kqnpsu$:function(col, comp) { - return Kotlin.collectionsMax(col, comp); - }, sort_pr3zit$:function(list) { - Kotlin.collectionsSort(list, _.kotlin.comparisons.naturalOrder()); - }, sort_k5qxi4$:function(list, comparator) { - Kotlin.collectionsSort(list, comparator); - }, reverse_heioe9$:function(list) { - var tmp$0; - var size = list.size; - tmp$0 = (size / 2 | 0) - 1; - for (var i = 0;i <= tmp$0;i++) { - var i2 = size - i - 1; - var tmp = list.get_za3lpa$(i); - list.set_vux3hl$(i, list.get_za3lpa$(i2)); - list.set_vux3hl$(i2, tmp); - } - }})})}), org:Kotlin.definePackage(null, {khronos:Kotlin.definePackage(null, {webgl:Kotlin.definePackage(null, {WebGLContextAttributes_aby97w$:Kotlin.defineInlineFunction("stdlib.org.khronos.webgl.WebGLContextAttributes_aby97w$", function(alpha, depth, stencil, antialias, premultipliedAlpha, preserveDrawingBuffer, preferLowPowerToHighPerformance, failIfMajorPerformanceCaveat) { - if (alpha === void 0) { - alpha = true; - } - if (depth === void 0) { - depth = true; - } - if (stencil === void 0) { - stencil = false; - } - if (antialias === void 0) { - antialias = true; - } - if (premultipliedAlpha === void 0) { - premultipliedAlpha = true; - } - if (preserveDrawingBuffer === void 0) { - preserveDrawingBuffer = false; - } - if (preferLowPowerToHighPerformance === void 0) { - preferLowPowerToHighPerformance = false; - } - if (failIfMajorPerformanceCaveat === void 0) { - failIfMajorPerformanceCaveat = false; - } - var o = {}; - o["alpha"] = alpha; - o["depth"] = depth; - o["stencil"] = stencil; - o["antialias"] = antialias; - o["premultipliedAlpha"] = premultipliedAlpha; - o["preserveDrawingBuffer"] = preserveDrawingBuffer; - o["preferLowPowerToHighPerformance"] = preferLowPowerToHighPerformance; - o["failIfMajorPerformanceCaveat"] = failIfMajorPerformanceCaveat; - return o; - }), WebGLContextEventInit_o0ij6q$:Kotlin.defineInlineFunction("stdlib.org.khronos.webgl.WebGLContextEventInit_o0ij6q$", function(statusMessage, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["statusMessage"] = statusMessage; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })})}), w3c:Kotlin.definePackage(null, {dom:Kotlin.definePackage(null, {events:Kotlin.definePackage(null, {UIEventInit_vz9i9r$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.UIEventInit_vz9i9r$", function(view, detail, bubbles, cancelable) { - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), FocusEventInit_n9ip3s$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.FocusEventInit_n9ip3s$", function(relatedTarget, view, detail, bubbles, cancelable) { - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["relatedTarget"] = relatedTarget; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), MouseEventInit_h05so9$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.MouseEventInit_h05so9$", function(screenX, screenY, clientX, clientY, button, buttons, relatedTarget, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (screenX === void 0) { - screenX = 0; - } - if (screenY === void 0) { - screenY = 0; - } - if (clientX === void 0) { - clientX = 0; - } - if (clientY === void 0) { - clientY = 0; - } - if (button === void 0) { - button = 0; - } - if (buttons === void 0) { - buttons = 0; - } - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["screenX"] = screenX; - o["screenY"] = screenY; - o["clientX"] = clientX; - o["clientY"] = clientY; - o["button"] = button; - o["buttons"] = buttons; - o["relatedTarget"] = relatedTarget; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EventModifierInit_wnf6pc$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.EventModifierInit_wnf6pc$", function(ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), WheelEventInit_2knbe1$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.WheelEventInit_2knbe1$", function(deltaX, deltaY, deltaZ, deltaMode, screenX, screenY, clientX, clientY, button, buttons, relatedTarget, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (deltaX === void 0) { - deltaX = 0; - } - if (deltaY === void 0) { - deltaY = 0; - } - if (deltaZ === void 0) { - deltaZ = 0; - } - if (deltaMode === void 0) { - deltaMode = 0; - } - if (screenX === void 0) { - screenX = 0; - } - if (screenY === void 0) { - screenY = 0; - } - if (clientX === void 0) { - clientX = 0; - } - if (clientY === void 0) { - clientY = 0; - } - if (button === void 0) { - button = 0; - } - if (buttons === void 0) { - buttons = 0; - } - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["deltaX"] = deltaX; - o["deltaY"] = deltaY; - o["deltaZ"] = deltaZ; - o["deltaMode"] = deltaMode; - o["screenX"] = screenX; - o["screenY"] = screenY; - o["clientX"] = clientX; - o["clientY"] = clientY; - o["button"] = button; - o["buttons"] = buttons; - o["relatedTarget"] = relatedTarget; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), KeyboardEventInit_f73pgi$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.KeyboardEventInit_f73pgi$", function(key, code, location, repeat, isComposing, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (key === void 0) { - key = ""; - } - if (code === void 0) { - code = ""; - } - if (location === void 0) { - location = 0; - } - if (repeat === void 0) { - repeat = false; - } - if (isComposing === void 0) { - isComposing = false; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["key"] = key; - o["code"] = code; - o["location"] = location; - o["repeat"] = repeat; - o["isComposing"] = isComposing; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CompositionEventInit_v3o02b$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.CompositionEventInit_v3o02b$", function(data, view, detail, bubbles, cancelable) { - if (data === void 0) { - data = ""; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })}), TrackEventInit_u7e3y1$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.TrackEventInit_u7e3y1$", function(track, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["track"] = track; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), AutocompleteErrorEventInit_o0ij6q$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.AutocompleteErrorEventInit_o0ij6q$", function(reason, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["reason"] = reason; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), RelatedEventInit_w30gy5$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.RelatedEventInit_w30gy5$", function(relatedTarget, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["relatedTarget"] = relatedTarget; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CanvasRenderingContext2DSettings_6taknv$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.CanvasRenderingContext2DSettings_6taknv$", function(alpha) { - if (alpha === void 0) { - alpha = true; - } - var o = {}; - o["alpha"] = alpha; - return o; - }), HitRegionOptions_7peykz$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.HitRegionOptions_7peykz$", function(path, fillRule, id, parentID, cursor, control, label, role) { - if (path === void 0) { - path = null; - } - if (fillRule === void 0) { - fillRule = "nonzero"; - } - if (id === void 0) { - id = ""; - } - if (parentID === void 0) { - parentID = null; - } - if (cursor === void 0) { - cursor = "inherit"; - } - if (control === void 0) { - control = null; - } - if (label === void 0) { - label = null; - } - if (role === void 0) { - role = null; - } - var o = {}; - o["path"] = path; - o["fillRule"] = fillRule; - o["id"] = id; - o["parentID"] = parentID; - o["cursor"] = cursor; - o["control"] = control; - o["label"] = label; - o["role"] = role; - return o; - }), DragEventInit_mm3m7l$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.DragEventInit_mm3m7l$", function(dataTransfer, screenX, screenY, clientX, clientY, button, buttons, relatedTarget, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (screenX === void 0) { - screenX = 0; - } - if (screenY === void 0) { - screenY = 0; - } - if (clientX === void 0) { - clientX = 0; - } - if (clientY === void 0) { - clientY = 0; - } - if (button === void 0) { - button = 0; - } - if (buttons === void 0) { - buttons = 0; - } - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["dataTransfer"] = dataTransfer; - o["screenX"] = screenX; - o["screenY"] = screenY; - o["clientX"] = clientX; - o["clientY"] = clientY; - o["button"] = button; - o["buttons"] = buttons; - o["relatedTarget"] = relatedTarget; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), PopStateEventInit_xro667$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.PopStateEventInit_xro667$", function(state, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["state"] = state; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), HashChangeEventInit_9djc0g$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.HashChangeEventInit_9djc0g$", function(oldURL, newURL, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["oldURL"] = oldURL; - o["newURL"] = newURL; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), PageTransitionEventInit_ws0pad$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.PageTransitionEventInit_ws0pad$", function(persisted, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["persisted"] = persisted; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), ErrorEventInit_os3ye3$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ErrorEventInit_os3ye3$", function(message, filename, lineno, colno, error, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["message"] = message; - o["filename"] = filename; - o["lineno"] = lineno; - o["colno"] = colno; - o["error"] = error; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), MessageEventInit_b4x2sp$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.MessageEventInit_b4x2sp$", function(data, origin, lastEventId, source, ports, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["origin"] = origin; - o["lastEventId"] = lastEventId; - o["source"] = source; - o["ports"] = ports; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EventSourceInit_6taknv$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EventSourceInit_6taknv$", function(withCredentials) { - if (withCredentials === void 0) { - withCredentials = false; - } - var o = {}; - o["withCredentials"] = withCredentials; - return o; - }), CloseEventInit_kz92y6$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.CloseEventInit_kz92y6$", function(wasClean, code, reason, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["wasClean"] = wasClean; - o["code"] = code; - o["reason"] = reason; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), StorageEventInit_hhd9ie$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.StorageEventInit_hhd9ie$", function(key, oldValue, newValue, url, storageArea, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["key"] = key; - o["oldValue"] = oldValue; - o["newValue"] = newValue; - o["url"] = url; - o["storageArea"] = storageArea; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EventInit_dqye30$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EventInit_dqye30$", function(bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CustomEventInit_xro667$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.CustomEventInit_xro667$", function(detail, bubbles, cancelable) { - if (detail === void 0) { - detail = null; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), MutationObserverInit_aj2h80$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.MutationObserverInit_aj2h80$", function(childList, attributes, characterData, subtree, attributeOldValue, characterDataOldValue, attributeFilter) { - if (childList === void 0) { - childList = false; - } - if (subtree === void 0) { - subtree = false; - } - var o = {}; - o["childList"] = childList; - o["attributes"] = attributes; - o["characterData"] = characterData; - o["subtree"] = subtree; - o["attributeOldValue"] = attributeOldValue; - o["characterDataOldValue"] = characterDataOldValue; - o["attributeFilter"] = attributeFilter; - return o; - }), EditingBeforeInputEventInit_9djc0g$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EditingBeforeInputEventInit_9djc0g$", function(command, value, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["command"] = command; - o["value"] = value; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EditingInputEventInit_9djc0g$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EditingInputEventInit_9djc0g$", function(command, value, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["command"] = command; - o["value"] = value; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), DOMPointInit_6y0v78$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.DOMPointInit_6y0v78$", function(x, y, z, w) { - if (x === void 0) { - x = 0; - } - if (y === void 0) { - y = 0; - } - if (z === void 0) { - z = 0; - } - if (w === void 0) { - w = 1; - } - var o = {}; - o["x"] = x; - o["y"] = y; - o["z"] = z; - o["w"] = w; - return o; - }), DOMRectInit_6y0v78$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.DOMRectInit_6y0v78$", function(x, y, width, height) { - if (x === void 0) { - x = 0; - } - if (y === void 0) { - y = 0; - } - if (width === void 0) { - width = 0; - } - if (height === void 0) { - height = 0; - } - var o = {}; - o["x"] = x; - o["y"] = y; - o["width"] = width; - o["height"] = height; - return o; - }), ScrollOptions_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ScrollOptions_61zpoe$", function(behavior) { - if (behavior === void 0) { - behavior = "auto"; - } - var o = {}; - o["behavior"] = behavior; - return o; - }), ScrollOptionsHorizontal_t0es5s$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ScrollOptionsHorizontal_t0es5s$", function(x, behavior) { - if (behavior === void 0) { - behavior = "auto"; - } - var o = {}; - o["x"] = x; - o["behavior"] = behavior; - return o; - }), ScrollOptionsVertical_t0es5s$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ScrollOptionsVertical_t0es5s$", function(y, behavior) { - if (behavior === void 0) { - behavior = "auto"; - } - var o = {}; - o["y"] = y; - o["behavior"] = behavior; - return o; - }), BoxQuadOptions_axdi75$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.BoxQuadOptions_axdi75$", function(box, relativeTo) { - if (box === void 0) { - box = "border"; - } - var o = {}; - o["box"] = box; - o["relativeTo"] = relativeTo; - return o; - }), ConvertCoordinateOptions_puj7f4$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ConvertCoordinateOptions_puj7f4$", function(fromBox, toBox) { - if (fromBox === void 0) { - fromBox = "border"; - } - if (toBox === void 0) { - toBox = "border"; - } - var o = {}; - o["fromBox"] = fromBox; - o["toBox"] = toBox; - return o; - })}), fetch:Kotlin.definePackage(null, {RequestInit_rz7b8m$:Kotlin.defineInlineFunction("stdlib.org.w3c.fetch.RequestInit_rz7b8m$", function(method, headers, body, mode, credentials, cache, redirect) { - var o = {}; - o["method"] = method; - o["headers"] = headers; - o["body"] = body; - o["mode"] = mode; - o["credentials"] = credentials; - o["cache"] = cache; - o["redirect"] = redirect; - return o; - }), ResponseInit_v2gkk6$:Kotlin.defineInlineFunction("stdlib.org.w3c.fetch.ResponseInit_v2gkk6$", function(status, statusText, headers) { - if (status === void 0) { - status = 200; - } - if (statusText === void 0) { - statusText = "OK"; - } - var o = {}; - o["status"] = status; - o["statusText"] = statusText; - o["headers"] = headers; - return o; - })}), files:Kotlin.definePackage(null, {BlobPropertyBag_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.files.BlobPropertyBag_61zpoe$", function(type) { - if (type === void 0) { - type = ""; - } - var o = {}; - o["type"] = type; - return o; - }), FilePropertyBag_bm4lxs$:Kotlin.defineInlineFunction("stdlib.org.w3c.files.FilePropertyBag_bm4lxs$", function(type, lastModified) { - if (type === void 0) { - type = ""; - } - var o = {}; - o["type"] = type; - o["lastModified"] = lastModified; - return o; - })}), notifications:Kotlin.definePackage(null, {NotificationOptions_kav9qg$:Kotlin.defineInlineFunction("stdlib.org.w3c.notifications.NotificationOptions_kav9qg$", function(dir, lang, body, tag, icon, sound, vibrate, renotify, silent, noscreen, sticky, data) { - if (dir === void 0) { - dir = "auto"; - } - if (lang === void 0) { - lang = ""; - } - if (body === void 0) { - body = ""; - } - if (tag === void 0) { - tag = ""; - } - if (renotify === void 0) { - renotify = false; - } - if (silent === void 0) { - silent = false; - } - if (noscreen === void 0) { - noscreen = false; - } - if (sticky === void 0) { - sticky = false; - } - if (data === void 0) { - data = null; - } - var o = {}; - o["dir"] = dir; - o["lang"] = lang; - o["body"] = body; - o["tag"] = tag; - o["icon"] = icon; - o["sound"] = sound; - o["vibrate"] = vibrate; - o["renotify"] = renotify; - o["silent"] = silent; - o["noscreen"] = noscreen; - o["sticky"] = sticky; - o["data"] = data; - return o; - }), GetNotificationOptions_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.notifications.GetNotificationOptions_61zpoe$", function(tag) { - if (tag === void 0) { - tag = ""; - } - var o = {}; - o["tag"] = tag; - return o; - }), NotificationEventInit_feq8qm$:Kotlin.defineInlineFunction("stdlib.org.w3c.notifications.NotificationEventInit_feq8qm$", function(notification, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["notification"] = notification; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })}), workers:Kotlin.definePackage(null, {RegistrationOptions_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.RegistrationOptions_61zpoe$", function(scope) { - var o = {}; - o["scope"] = scope; - return o; - }), ServiceWorkerMessageEventInit_sy6pe0$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ServiceWorkerMessageEventInit_sy6pe0$", function(data, origin, lastEventId, source, ports, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["origin"] = origin; - o["lastEventId"] = lastEventId; - o["source"] = source; - o["ports"] = ports; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), ClientQueryOptions_8kj6y5$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ClientQueryOptions_8kj6y5$", function(includeUncontrolled, type) { - if (includeUncontrolled === void 0) { - includeUncontrolled = false; - } - if (type === void 0) { - type = "window"; - } - var o = {}; - o["includeUncontrolled"] = includeUncontrolled; - o["type"] = type; - return o; - }), ExtendableEventInit_dqye30$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ExtendableEventInit_dqye30$", function(bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), FetchEventInit_b3bcq8$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.FetchEventInit_b3bcq8$", function(request, client, isReload, bubbles, cancelable) { - if (isReload === void 0) { - isReload = false; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["request"] = request; - o["client"] = client; - o["isReload"] = isReload; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), ExtendableMessageEventInit_9wcmnd$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ExtendableMessageEventInit_9wcmnd$", function(data, origin, lastEventId, source, ports, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["origin"] = origin; - o["lastEventId"] = lastEventId; - o["source"] = source; - o["ports"] = ports; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CacheQueryOptions_qfoyx9$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.CacheQueryOptions_qfoyx9$", function(ignoreSearch, ignoreMethod, ignoreVary, cacheName) { - if (ignoreSearch === void 0) { - ignoreSearch = false; - } - if (ignoreMethod === void 0) { - ignoreMethod = false; - } - if (ignoreVary === void 0) { - ignoreVary = false; - } - var o = {}; - o["ignoreSearch"] = ignoreSearch; - o["ignoreMethod"] = ignoreMethod; - o["ignoreVary"] = ignoreVary; - o["cacheName"] = cacheName; - return o; - }), CacheBatchOperation_2un2y0$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.CacheBatchOperation_2un2y0$", function(type, request, response, options) { - var o = {}; - o["type"] = type; - o["request"] = request; - o["response"] = response; - o["options"] = options; - return o; - })}), xhr:Kotlin.definePackage(null, {ProgressEventInit_vo5a85$:Kotlin.defineInlineFunction("stdlib.org.w3c.xhr.ProgressEventInit_vo5a85$", function(lengthComputable, loaded, total, bubbles, cancelable) { - if (lengthComputable === void 0) { - lengthComputable = false; - } - if (loaded === void 0) { - loaded = 0; - } - if (total === void 0) { - total = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["lengthComputable"] = lengthComputable; - o["loaded"] = loaded; - o["total"] = total; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })})})})}); - Kotlin.defineModule("stdlib", _); -})(Kotlin); -if (typeof module !== "undefined" && module.exports) { - module.exports = Kotlin; -} -; \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8aac928..69c7d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) web/js/generated +*.iml +*.ipr +*.iws +.gradle +build diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..f992d56 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + kotlin("js") version "1.7.10" +} + +group = "nl.astraeus" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +kotlin { + js(IR) { + binaries.executable() + browser() + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8af57df --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +kotlin.code.style=official +kotlin.js.generate.executable.default=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..41d9927 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..41dfb87 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/mandelbrot.iml b/mandelbrot.iml deleted file mode 100644 index 3c71942..0000000 --- a/mandelbrot.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/mandelbrot.ipr b/mandelbrot.ipr deleted file mode 100644 index be8209a..0000000 --- a/mandelbrot.ipr +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.7 - - - - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..9af3710 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "kotlin-mandelbrot" + diff --git a/src/Julia.kt b/src/Julia.kt deleted file mode 100644 index c1ee4de..0000000 --- a/src/Julia.kt +++ /dev/null @@ -1,149 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - uniform vec2 u_julia; - uniform float u_iteratorOffset; - - varying vec2 v_coord; - - void main(void) { - float xx = v_coord.x; - float yy = v_coord.y; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - if (xx*xx + yy*yy < 4.0) { - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0); - //mu = sqrt(mu); - - float it = mod(mu * 23.0, 768.0); - - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; - float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; - - gl_FragColor = vec4( blue, green, red, 1.0); - break; - } - xt = xx*xx - yy*yy + u_julia.x; - yy = 2.0*xx*yy + u_julia.y; - xx = xt; - } - } - } -""" - -class JuliaData { - var juliaX: Float = 0f - var juliaY: Float = 0f - - var offsetX: Float = 0f - var offsetY: Float = 0f - var scaleX: Float = 1f - var scaleY: Float = 1f - - var iteratorOffset: Float = 0f -} - -class Julia(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: JuliaData = JuliaData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: JuliaData -> - program.setUniform2f("u_julia", data.juliaX, data.juliaY) - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) - program.setUniform1f("u_iteratorOffset", data.iteratorOffset) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 500.0 - -// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() -// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() - -// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() -// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.juliaX = 0.28f + (Math.sin(time / 31) / 100f).toFloat() - data.juliaY = 0.008f + (Math.cos(time / 23.07) / 100f).toFloat() - - data.scaleX = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - data.scaleY = 1.3f - Math.sin(time / 10.0).toFloat() * 0.5f - - data.iteratorOffset = 0f //time.toFloat() * 10f - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/Main.kt b/src/Main.kt deleted file mode 100644 index 2b2907d..0000000 --- a/src/Main.kt +++ /dev/null @@ -1,197 +0,0 @@ -import org.khronos.webgl.WebGLRenderingContext -import org.w3c.dom.HTMLCanvasElement -import org.w3c.dom.HTMLElement -import kotlin.browser.document -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -class HTMLElements { - val container: HTMLElement - val canvas: HTMLCanvasElement - var webgl: WebGLRenderingContext - - var windowWidth = 0 - var windowHeight = 0 - - init { - container = document.createElement("div") as HTMLElement - - canvas = document.createElement("canvas") as HTMLCanvasElement - - container.setAttribute("style", "position: relative;") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) - - document.body!!.appendChild(container) - container.appendChild(canvas) - - webgl = canvas.getContext("webgl") as WebGLRenderingContext - } - - fun resize() { - val windowWidth = window.innerWidth.toInt() - val windowHeight = window.innerHeight.toInt() - - if (this.windowWidth != windowWidth || - this.windowHeight != windowHeight) { - - this.windowWidth = windowWidth - this.windowHeight = windowHeight - canvas.setAttribute("width", "${windowWidth}px") - canvas.setAttribute("height", "${windowHeight}px") - canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") - webgl.viewport(0, 0, windowWidth, windowHeight) - } - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - - fun drawMandel() { - /* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*/ - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - } - - fun render() { - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - - -// window.requestAnimationFrame { -// render() -// } - } -} - -fun main(args: Array) { - val html = HTMLElements() - - val mandelBrot = MandelBrot(html) - val julia = Julia(html) - - julia.render() - //html.drawJulia(-0.493, -0.587) -} \ No newline at end of file diff --git a/src/MandelBrot.kt b/src/MandelBrot.kt deleted file mode 100644 index 7199cf3..0000000 --- a/src/MandelBrot.kt +++ /dev/null @@ -1,245 +0,0 @@ -import com.persesgames.shader.ShaderProgram -import com.persesgames.shader.VertextAttributeInfo -import org.khronos.webgl.Float32Array -import org.khronos.webgl.WebGLBuffer -import org.khronos.webgl.WebGLRenderingContext -import kotlin.browser.window - -/** - * User: rnentjes - * Date: 21-5-16 - * Time: 17:06 - */ - -private val vertexShader = """ - attribute vec2 a_position; - - uniform vec4 u_viewWindow; - - varying vec2 v_coord; - - void main(void) { - v_coord = a_position + u_viewWindow.xy; - - gl_Position = vec4(a_position, 0.0, 1.0); - } -""" - -private val fragmentShader = """ - precision mediump float; - - varying vec2 v_coord; - - void main(void) { - float xx = 0.0; - float yy = 0.0; - float xt = 0.0; - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); - - for (int iteration = 0; iteration < 1000; iteration++) { - if (xx*xx + yy*yy > 4.0) { - float it = mod(float(iteration) * 13.0, 768.0); - float red = min(it, 255.0) / 255.0; - float green = max(0.0, min(it, 511.0) - 256.0); - float blue = max(0.0, min(it, 767.0) - 512.0); - gl_FragColor = vec4( red, green, blue, 1.0); - break; - } - xt = xx*xx - yy*yy + v_coord.x; - yy = 2.0*xx*yy + v_coord.y; - xx = xt; - } - } -""" - -class ShaderData { - var offsetX: Float = 0f - var offsetY: Float = 0f -} - -class MandelBrot(val html: HTMLElements) { - val webgl = html.webgl - val shaderProgram: ShaderProgram - val data: ShaderData = ShaderData() - val attribBuffer: WebGLBuffer - val vertices: Float32Array - val start = Date().getTime() - - init { - val array: Array = arrayOf( - -1f,-1f, - 1f,-1f, - 1f, 1f, - 1f, 1f, - -1f, 1f, - -1f,-1f - ) - - vertices = Float32Array(array.size) - vertices.set(array, 0) - - val setter = { program: ShaderProgram, data: ShaderData -> - program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) - } - - val vainfo = arrayOf( - VertextAttributeInfo("a_position", 2) - ) - - shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) - - - attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - } - - fun getColor(mu: Double) { - var clr1 = mu.toInt() - var t2 = mu - clr1 - var t1 = 1 - t2 - clr1 = clr1 % 768 - -// int clr1 = (int)mu; -// double t2 = mu - clr1; -// double t1 = 1 - t2; -// clr1 = clr1 % Colors.Count; -// int clr2 = (clr1 + 1) % Colors.Count; -// -// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); -// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); -// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); -// -// return Color.FromArgb(255, r, g, b); - } - -/* fun drawMandel() { - *//* - For each pixel (Px, Py) on the screen, do: - { - x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) - y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) - x = 0.0 - y = 0.0 - iteration = 0 - max_iteration = 1000 - while (x*x + y*y < 2*2 AND iteration < max_iteration) { - xtemp = x*x - y*y + x0 - y = 2*x*y + y0 - x = xtemp - iteration = iteration + 1 - } - color = palette[iteration] - plot(Px, Py, color) - }*//* - - var xs: Double - var ys: Double - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 767 - val halfWindowHeight = windowHeight / 2 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - var mu: Double - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xs = (4.0 / windowWidth.toFloat()) * x - 2.0 - ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - xx = 0.0 - yy = 0.0 - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xs - yy = 2*xx*yy + ys - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 13) % 768 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - -/* fun drawJulia(xc: Double, yc: Double) { - var xx: Double - var yy: Double - var xt: Double - var iteration: Int - val max_iteration: Int = 511 - var red: Int - var green: Int - var blue: Int - var fillStyle: String - - for (x in 0..windowWidth) { - for (y in 0..windowHeight) { - xx = (4.0 / windowWidth.toFloat()) * x - 2.0 - yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 - - iteration = 0 - while(xx*xx + yy*yy < 4 && iteration < max_iteration) { - xt = xx*xx - yy*yy + xc - yy = 2*xx*yy + yc - xx = xt - iteration++ - } - if (iteration == max_iteration) { - fillStyle = "rgb(0, 0, 0)" - } else { - //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); - iteration = (iteration * 31) % 512 - red = Math.min(iteration, 255) - green = Math.max(0, Math.min(iteration, 511) - 256) - blue = Math.max(0, Math.min(iteration, 767) - 512) - fillStyle = "rgb($red, $green, $blue)" - } - - //canvas2d.fillStyle = fillStyle - //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) - } - } - - }*/ - - fun render() { - html.resize() - - webgl.clearColor(1f, 1f, 1f, 1f) - webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) - - var time = (start - (Date().getTime())) / 1000.0 - - data.offsetX = Math.sin(time).toFloat() - data.offsetY = Math.cos(time).toFloat() - - shaderProgram.begin(attribBuffer, data) - - webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); - webgl.drawArrays(shaderProgram.drawType, 0, 6) - - shaderProgram.end() - - window.requestAnimationFrame { - render() - } - } -} diff --git a/src/ShaderProgram.kt b/src/ShaderProgram.kt deleted file mode 100644 index dcdb8c8..0000000 --- a/src/ShaderProgram.kt +++ /dev/null @@ -1,116 +0,0 @@ -package com.persesgames.shader - -import org.khronos.webgl.* - -/** - * User: rnentjes - * Date: 17-4-16 - * Time: 15:15 - */ - -class VertextAttributeInfo(val locationName: String, val numElements: Int) { - var location = 0 - var offset = 0 -} - -class ShaderProgram( - val webgl: WebGLRenderingContext, - val drawType: Int, - vertexShaderSource: String, - fragmentShaderSource: String, - val vainfo: Array, - val setter: (program: ShaderProgram, data: T) -> Unit) { - - var shaderProgram: WebGLProgram - var vertex: WebGLShader - var fragment: WebGLShader - - var verticesBlockSize = 0 - var drawLength = 0 - - init { - vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) - fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) - - shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") - webgl.attachShader(shaderProgram, vertex) - webgl.attachShader(shaderProgram, fragment) - webgl.linkProgram(shaderProgram) - - if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { - //println(webgl.getProgramInfoLog(shaderProgram)) - throw IllegalStateException("Unable to compile shader program!") - } - - webgl.useProgram(shaderProgram) - - this.verticesBlockSize = 0; - - // set attribute locations... - for (info in vainfo.iterator()) { - info.location = webgl.getAttribLocation(shaderProgram, info.locationName) - info.offset = verticesBlockSize; - - verticesBlockSize += info.numElements; - //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); - } - - when(drawType) { - WebGLRenderingContext.TRIANGLES -> { - drawLength = verticesBlockSize * 3 - } - else -> { - drawLength = verticesBlockSize - } - } - - //println("verticesBlockSize $verticesBlockSize"); - - //println("ShaderProgram constructor done"); - } - - private fun compileShader(source: String, type: Int): WebGLShader { - val result: WebGLShader - - result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") - webgl.shaderSource(result, source) - webgl.compileShader(result) - - if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { - throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") - } - - return result; - } - - fun begin(attribBuffer: WebGLBuffer, userdata: T) { - webgl.useProgram(shaderProgram); - webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - - // set attribute locations... - for (info in vainfo.iterator()) { - webgl.enableVertexAttribArray(info.location); - webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); - } - - setter(this, userdata) - } - - fun end() { - for (info in vainfo.iterator()) { - webgl.disableVertexAttribArray(info.location); - } - webgl.useProgram(null) - } - - fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); - - fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); - - fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } - fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } - fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } - fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } - fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } - -} diff --git a/src/main/kotlin/Julia.kt b/src/main/kotlin/Julia.kt new file mode 100644 index 0000000..9e99a4a --- /dev/null +++ b/src/main/kotlin/Julia.kt @@ -0,0 +1,176 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + uniform float u_aspect; + + varying vec2 v_coord; + + void main(void) { + v_coord = vec2(a_position.x / u_aspect, a_position.y * u_aspect) * u_viewWindow.zw + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + uniform vec2 u_julia; + uniform int u_max_iterations; + uniform float u_iteratorOffset; + + varying vec2 v_coord; + + vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + } + + void main(void) { + float xx = v_coord.x; + float yy = v_coord.y; + float xt = 0.0; + float sc = xx*xx + yy*yy; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + if (sc < 4.0) { + for (int iteration = 0; iteration < 1000; iteration++) { + sc = xx*xx + yy*yy; + if (sc > 4.0) { + float mu = float(iteration) + 1.0 - log(log(sc)) / log(2.0); + //mu = sqrt(mu); + + float ci = sc / float(u_max_iterations); + + vec3 hsl = vec3(mod(u_iteratorOffset + mu * 13.0, float(u_max_iterations)) / float(u_max_iterations), 1.0, 0.75); + vec3 rgb = hsv2rgb(hsl); + + //float it = mod(mu * 23.0, 768.0); + + //float red = min(it, 255.0) / 255.0; + //float green = max(0.0, min(it, 511.0) - 256.0) / 255.0; + //float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0; + + //gl_FragColor = vec4( blue, green, red, 1.0); + gl_FragColor = vec4( rgb, 1.0); + break; + } + xt = xx*xx - yy*yy + u_julia.x; + yy = 2.0*xx*yy + u_julia.y; + xx = xt; + } + } + } +""" + +class JuliaData { + var juliaX: Float = 0f + var juliaY: Float = 0f + + var offsetX: Float = 0f + var offsetY: Float = 0f + var scaleX: Float = 1f + var scaleY: Float = 1f + + var aspect: Float = 1f + + var max_iterations: Int = 25 + var iteratorOffset: Float = 0f +} + +class Julia(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: JuliaData = JuliaData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: JuliaData -> + program.setUniform2f("u_julia", data.juliaX, data.juliaY) + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, data.scaleX, data.scaleY) + program.setUniform1f("u_iteratorOffset", data.iteratorOffset) + program.setUniform1f("u_aspect", data.aspect) + program.setUniform1i("u_max_iterations", data.max_iterations) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2), + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun render() { + html.resize() + + //webgl.clearColor(1f, 1f, 1f, 1f) + //webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + val time = (start - (Date().getTime())) / 500.0 + +// data.juliaX = -0.391f + (Math.sin(time / 31) / 10f).toFloat() +// data.juliaY = -0.587f + (Math.cos(time / 23.07) / 10f).toFloat() + +// data.juliaX = -0.79f + (Math.sin(time / 31) / 100f).toFloat() +// data.juliaY = 0.15f + (Math.cos(time / 23.07) / 100f).toFloat() + + data.juliaX = 0f + (sin(time * 1 / 11) / 1f).toFloat() + data.juliaY = 0f + (cos(time * 1 / 13) / 1f).toFloat() + + //data.scaleX = 1.3f - sin(time / 10.0).toFloat() * 0.5f + //data.scaleY = 1.3f - sin(time / 10.0).toFloat() * 0.5f + + data.scaleX = 1f + data.scaleY = 1f / (html.windowWidth.toFloat() / html.windowHeight.toFloat()) + + data.iteratorOffset = time.toFloat() * 10f + + data.aspect = 1f //html.windowHeight.toFloat() / html.windowWidth.toFloat() * 2f + data.max_iterations = 360 + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt new file mode 100644 index 0000000..5d945ef --- /dev/null +++ b/src/main/kotlin/Main.kt @@ -0,0 +1,199 @@ +import org.khronos.webgl.WebGLRenderingContext +import org.w3c.dom.HTMLCanvasElement +import org.w3c.dom.HTMLElement +import kotlinx.browser.document +import kotlinx.browser.window +import kotlin.math.max +import kotlin.math.min + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +class HTMLElements { + val container: HTMLElement + val canvas: HTMLCanvasElement + var webgl: WebGLRenderingContext + + var windowWidth = 0 + var windowHeight = 0 + + init { + container = document.createElement("div") as HTMLElement + + canvas = document.createElement("canvas") as HTMLCanvasElement + + container.setAttribute("style", "position: relative;") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;" ) + + document.body!!.appendChild(container) + container.appendChild(canvas) + + webgl = canvas.getContext("webgl") as WebGLRenderingContext + } + + fun resize() { + val windowWidth = window.innerWidth.toInt() + val windowHeight = window.innerHeight.toInt() + + if (this.windowWidth != windowWidth || + this.windowHeight != windowHeight) { + + this.windowWidth = windowWidth + this.windowHeight = windowHeight + canvas.setAttribute("width", "${windowWidth}px") + canvas.setAttribute("height", "${windowHeight}px") + canvas.setAttribute("style", "position: absolute; left: 0px; top: 0px; z-index: 5; width: ${windowWidth}px; height: ${windowHeight}px;") + webgl.viewport(0, 0, windowWidth, windowHeight) + } + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + + fun drawMandel() { + /* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*/ + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = min(iteration, 255) + green = max(0, min(iteration, 511) - 256) + blue = max(0, min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + } + + fun render() { + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + + +// window.requestAnimationFrame { +// render() +// } + } +} + +fun main(args: Array) { + val html = HTMLElements() + + val mandelBrot = MandelBrot(html) + val julia = Julia(html) + + julia.render() + //html.drawJulia(-0.493, -0.587) +} \ No newline at end of file diff --git a/src/main/kotlin/MandelBrot.kt b/src/main/kotlin/MandelBrot.kt new file mode 100644 index 0000000..c836c74 --- /dev/null +++ b/src/main/kotlin/MandelBrot.kt @@ -0,0 +1,246 @@ +import org.khronos.webgl.Float32Array +import org.khronos.webgl.WebGLBuffer +import org.khronos.webgl.WebGLRenderingContext +import kotlinx.browser.window +import kotlin.js.Date +import kotlin.math.cos +import kotlin.math.sin + +/** + * User: rnentjes + * Date: 21-5-16 + * Time: 17:06 + */ + +private val vertexShader = """ + attribute vec2 a_position; + + uniform vec4 u_viewWindow; + + varying vec2 v_coord; + + void main(void) { + v_coord = a_position + u_viewWindow.xy; + + gl_Position = vec4(a_position, 0.0, 1.0); + } +""" + +private val fragmentShader = """ + precision mediump float; + + varying vec2 v_coord; + + void main(void) { + float xx = 0.0; + float yy = 0.0; + float xt = 0.0; + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0); + + for (int iteration = 0; iteration < 1000; iteration++) { + if (xx*xx + yy*yy > 4.0) { + float it = mod(float(iteration) * 13.0, 768.0); + float red = min(it, 255.0) / 255.0; + float green = max(0.0, min(it, 511.0) - 256.0); + float blue = max(0.0, min(it, 767.0) - 512.0); + gl_FragColor = vec4( red, green, blue, 1.0); + break; + } + xt = xx*xx - yy*yy + v_coord.x; + yy = 2.0*xx*yy + v_coord.y; + xx = xt; + } + } +""" + +class ShaderData { + var offsetX: Float = 0f + var offsetY: Float = 0f +} + +class MandelBrot(val html: HTMLElements) { + val webgl = html.webgl + val shaderProgram: ShaderProgram + val data: ShaderData = ShaderData() + val attribBuffer: WebGLBuffer + val vertices: Float32Array + val start = Date().getTime() + + init { + val array: Array = arrayOf( + -1f,-1f, + 1f,-1f, + 1f, 1f, + 1f, 1f, + -1f, 1f, + -1f,-1f + ) + + vertices = Float32Array(array.size) + vertices.set(array, 0) + + val setter = { program: ShaderProgram, data: ShaderData -> + program.setUniform4f("u_viewWindow", data.offsetX, data.offsetY, 0f, 0f) + } + + val vainfo = arrayOf( + VertextAttributeInfo("a_position", 2) + ) + + shaderProgram = ShaderProgram(webgl, WebGLRenderingContext.TRIANGLES, vertexShader, fragmentShader, vainfo, setter) + + + attribBuffer = webgl.createBuffer() ?: throw IllegalStateException("Unable to create webgl buffer!") + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + } + + fun getColor(mu: Double) { + var clr1 = mu.toInt() + var t2 = mu - clr1 + var t1 = 1 - t2 + clr1 = clr1 % 768 + +// int clr1 = (int)mu; +// double t2 = mu - clr1; +// double t1 = 1 - t2; +// clr1 = clr1 % Colors.Count; +// int clr2 = (clr1 + 1) % Colors.Count; +// +// byte r = (byte)(Colors[clr1].R * t1 + Colors[clr2].R * t2); +// byte g = (byte)(Colors[clr1].G * t1 + Colors[clr2].G * t2); +// byte b = (byte)(Colors[clr1].B * t1 + Colors[clr2].B * t2); +// +// return Color.FromArgb(255, r, g, b); + } + +/* fun drawMandel() { + *//* + For each pixel (Px, Py) on the screen, do: + { + x0 = scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) + y0 = scaled y coordinate of pixel (scaled to lie in the Mandelbrot Y scale (-1, 1)) + x = 0.0 + y = 0.0 + iteration = 0 + max_iteration = 1000 + while (x*x + y*y < 2*2 AND iteration < max_iteration) { + xtemp = x*x - y*y + x0 + y = 2*x*y + y0 + x = xtemp + iteration = iteration + 1 + } + color = palette[iteration] + plot(Px, Py, color) + }*//* + + var xs: Double + var ys: Double + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 767 + val halfWindowHeight = windowHeight / 2 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + var mu: Double + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xs = (4.0 / windowWidth.toFloat()) * x - 2.0 + ys = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + xx = 0.0 + yy = 0.0 + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xs + yy = 2*xx*yy + ys + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 13) % 768 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + +/* fun drawJulia(xc: Double, yc: Double) { + var xx: Double + var yy: Double + var xt: Double + var iteration: Int + val max_iteration: Int = 511 + var red: Int + var green: Int + var blue: Int + var fillStyle: String + + for (x in 0..windowWidth) { + for (y in 0..windowHeight) { + xx = (4.0 / windowWidth.toFloat()) * x - 2.0 + yy = 4.0 - ((4.0 / windowHeight) * y) - 2.0 + + iteration = 0 + while(xx*xx + yy*yy < 4 && iteration < max_iteration) { + xt = xx*xx - yy*yy + xc + yy = 2*xx*yy + yc + xx = xt + iteration++ + } + if (iteration == max_iteration) { + fillStyle = "rgb(0, 0, 0)" + } else { + //mu = iteration + 1 - Math.log(Math.log(xx*xx + yy*yy)) / Math.log(2.0); + iteration = (iteration * 31) % 512 + red = Math.min(iteration, 255) + green = Math.max(0, Math.min(iteration, 511) - 256) + blue = Math.max(0, Math.min(iteration, 767) - 512) + fillStyle = "rgb($red, $green, $blue)" + } + + //canvas2d.fillStyle = fillStyle + //canvas2d.fillRect(x.toDouble(), y.toDouble(), 1.0, 1.0) + } + } + + }*/ + + fun render() { + html.resize() + + webgl.clearColor(1f, 1f, 1f, 1f) + webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT) + + var time = (start - (Date().getTime())) / 1000.0 + + data.offsetX = sin(time).toFloat() + data.offsetY = cos(time).toFloat() + + shaderProgram.begin(attribBuffer, data) + + webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, vertices, WebGLRenderingContext.DYNAMIC_DRAW); + webgl.drawArrays(shaderProgram.drawType, 0, 6) + + shaderProgram.end() + + window.requestAnimationFrame { + render() + } + } +} diff --git a/src/main/kotlin/ShaderProgram.kt b/src/main/kotlin/ShaderProgram.kt new file mode 100644 index 0000000..1db78f2 --- /dev/null +++ b/src/main/kotlin/ShaderProgram.kt @@ -0,0 +1,114 @@ +import org.khronos.webgl.* + +/** + * User: rnentjes + * Date: 17-4-16 + * Time: 15:15 + */ + +class VertextAttributeInfo(val locationName: String, val numElements: Int) { + var location = 0 + var offset = 0 +} + +class ShaderProgram( + val webgl: WebGLRenderingContext, + val drawType: Int, + vertexShaderSource: String, + fragmentShaderSource: String, + val vainfo: Array, + val setter: (program: ShaderProgram, data: T) -> Unit) { + + var shaderProgram: WebGLProgram + var vertex: WebGLShader + var fragment: WebGLShader + + var verticesBlockSize = 0 + var drawLength = 0 + + init { + vertex = compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER) + fragment = compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER) + + shaderProgram = webgl.createProgram() ?: throw IllegalStateException("Unable to request shader program from webgl context!") + webgl.attachShader(shaderProgram, vertex) + webgl.attachShader(shaderProgram, fragment) + webgl.linkProgram(shaderProgram) + + if (webgl.getProgramParameter(shaderProgram, WebGLRenderingContext.LINK_STATUS) == false) { + //println(webgl.getProgramInfoLog(shaderProgram)) + throw IllegalStateException("Unable to compile shader program!") + } + + webgl.useProgram(shaderProgram) + + this.verticesBlockSize = 0; + + // set attribute locations... + for (info in vainfo.iterator()) { + info.location = webgl.getAttribLocation(shaderProgram, info.locationName) + info.offset = verticesBlockSize; + + verticesBlockSize += info.numElements; + //println("attrib: ${info.locationName}, info.location: ${info.location}, info.offset: ${info.offset}"); + } + + when(drawType) { + WebGLRenderingContext.TRIANGLES -> { + drawLength = verticesBlockSize * 3 + } + else -> { + drawLength = verticesBlockSize + } + } + + //println("verticesBlockSize $verticesBlockSize"); + + //println("ShaderProgram constructor done"); + } + + private fun compileShader(source: String, type: Int): WebGLShader { + val result: WebGLShader + + result = webgl.createShader(type) ?: throw IllegalStateException("Unable to request shader from webgl context!") + webgl.shaderSource(result, source) + webgl.compileShader(result) + + if (webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS) == false) { + throw IllegalStateException("Unable to compile shader!\n${source}\n\n${webgl.getShaderInfoLog(result)}") + } + + return result; + } + + fun begin(attribBuffer: WebGLBuffer, userdata: T) { + webgl.useProgram(shaderProgram); + webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); + + // set attribute locations... + for (info in vainfo.iterator()) { + webgl.enableVertexAttribArray(info.location); + webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, verticesBlockSize * 4, info.offset * 4); + } + + setter(this, userdata) + } + + fun end() { + for (info in vainfo.iterator()) { + webgl.disableVertexAttribArray(info.location); + } + webgl.useProgram(null) + } + + fun getAttribLocation(location: String) = webgl.getAttribLocation(shaderProgram, location); + + fun getUniformLocation(location: String) = webgl.getUniformLocation(shaderProgram, location); + + fun setUniform1f(location: String, value: Float) { webgl.uniform1f(getUniformLocation(location), value); } + fun setUniform2f(location: String, v1: Float, v2: Float) { webgl.uniform2f(getUniformLocation(location), v1, v2); } + fun setUniform4f(location: String, v1: Float, v2: Float, v3: Float, v4: Float) { webgl.uniform4f(getUniformLocation(location), v1, v2, v3, v4); } + fun setUniform1i(location: String, value: Int) { webgl.uniform1i(getUniformLocation(location), value); } + fun setUniformMatrix4fv(location: String, value: Float32Array) { webgl.uniformMatrix4fv(getUniformLocation(location), false, value); } + +} diff --git a/src/main/resources/index.html b/src/main/resources/index.html new file mode 100644 index 0000000..3f08116 --- /dev/null +++ b/src/main/resources/index.html @@ -0,0 +1,28 @@ + + + + + Julia + + + + + + + diff --git a/web/index.html b/web/index.html deleted file mode 100644 index f2b66c5..0000000 --- a/web/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Julia - - - - - - - - - diff --git a/web/js/generated/mandelbrot.js b/web/js/generated/mandelbrot.js deleted file mode 100644 index 0fd9983..0000000 --- a/web/js/generated/mandelbrot.js +++ /dev/null @@ -1,344 +0,0 @@ -(function (Kotlin) { - 'use strict'; - var _ = Kotlin.defineRootPackage(function () { - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = 0.0;\n float yy = 0.0;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float it = mod(float(iteration) * 13.0, 768.0);\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0);\n float blue = max(0.0, min(it, 767.0) - 512.0);\n gl_FragColor = vec4( red, green, blue, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + v_coord.x;\n yy = 2.0*xx*yy + v_coord.y;\n xx = xt;\n }\n }\n'; - this.vertexShader_rfnujb$ = '\n attribute vec2 a_position;\n\n uniform vec4 u_viewWindow;\n\n varying vec2 v_coord;\n\n void main(void) {\n v_coord = a_position * u_viewWindow.zw + u_viewWindow.xy;\n\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n'; - this.fragmentShader_jzx1nv$ = '\n precision mediump float;\n\n uniform vec2 u_julia;\n uniform float u_iteratorOffset;\n\n varying vec2 v_coord;\n\n void main(void) {\n float xx = v_coord.x;\n float yy = v_coord.y;\n float xt = 0.0;\n\n gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0);\n\n if (xx*xx + yy*yy < 4.0) {\n for (int iteration = 0; iteration < 1000; iteration++) {\n if (xx*xx + yy*yy > 4.0) {\n float mu = u_iteratorOffset + float(iteration) + 1.0 - log(log(xx*xx + yy*yy)) / log(2.0);\n //mu = sqrt(mu);\n\n float it = mod(mu * 23.0, 768.0);\n\n float red = min(it, 255.0) / 255.0;\n float green = max(0.0, min(it, 511.0) - 256.0) / 255.0;\n float blue = max(0.0, min(it, 767.0) - 512.0) / 255.0;\n\n gl_FragColor = vec4( blue, green, red, 1.0);\n break;\n }\n xt = xx*xx - yy*yy + u_julia.x;\n yy = 2.0*xx*yy + u_julia.y;\n xx = xt;\n }\n }\n }\n'; - }, /** @lends _ */ { - com: Kotlin.definePackage(null, /** @lends _.com */ { - persesgames: Kotlin.definePackage(null, /** @lends _.com.persesgames */ { - shader: Kotlin.definePackage(null, /** @lends _.com.persesgames.shader */ { - VertextAttributeInfo: Kotlin.createClass(null, function (locationName, numElements) { - this.locationName = locationName; - this.numElements = numElements; - this.location = 0; - this.offset = 0; - }), - ShaderProgram: Kotlin.createClass(null, function (webgl, drawType, vertexShaderSource, fragmentShaderSource, vainfo, setter) { - var tmp$0, tmp$1, tmp$2; - this.webgl = webgl; - this.drawType = drawType; - this.vainfo = vainfo; - this.setter = setter; - this.verticesBlockSize = 0; - this.drawLength = 0; - this.vertex = this.compileShader(vertexShaderSource, WebGLRenderingContext.VERTEX_SHADER); - this.fragment = this.compileShader(fragmentShaderSource, WebGLRenderingContext.FRAGMENT_SHADER); - tmp$0 = this.webgl.createProgram(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader program from webgl context!'); - this.shaderProgram = tmp$0; - this.webgl.attachShader(this.shaderProgram, this.vertex); - this.webgl.attachShader(this.shaderProgram, this.fragment); - this.webgl.linkProgram(this.shaderProgram); - if (Kotlin.equals(this.webgl.getProgramParameter(this.shaderProgram, WebGLRenderingContext.LINK_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader program!'); - } - this.webgl.useProgram(this.shaderProgram); - this.verticesBlockSize = 0; - tmp$1 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$1.hasNext()) { - var info = tmp$1.next(); - info.location = this.webgl.getAttribLocation(this.shaderProgram, info.locationName); - info.offset = this.verticesBlockSize; - this.verticesBlockSize += info.numElements; - } - tmp$2 = this.drawType; - if (tmp$2 === WebGLRenderingContext.TRIANGLES) - this.drawLength = this.verticesBlockSize * 3; - else { - this.drawLength = this.verticesBlockSize; - } - }, /** @lends _.com.persesgames.shader.ShaderProgram.prototype */ { - compileShader: function (source, type) { - var tmp$0; - var result; - tmp$0 = this.webgl.createShader(type); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to request shader from webgl context!'); - result = tmp$0; - this.webgl.shaderSource(result, source); - this.webgl.compileShader(result); - if (Kotlin.equals(this.webgl.getShaderParameter(result, WebGLRenderingContext.COMPILE_STATUS), false)) { - throw new Kotlin.IllegalStateException('Unable to compile shader!' + '\n' + source + '\n' + '\n' + Kotlin.toString(this.webgl.getShaderInfoLog(result))); - } - return result; - }, - begin_t0l48p$: function (attribBuffer, userdata) { - var tmp$0; - this.webgl.useProgram(this.shaderProgram); - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, attribBuffer); - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.enableVertexAttribArray(info.location); - this.webgl.vertexAttribPointer(info.location, info.numElements, WebGLRenderingContext.FLOAT, false, this.verticesBlockSize * 4, info.offset * 4); - } - this.setter(this, userdata); - }, - end: function () { - var tmp$0; - tmp$0 = Kotlin.modules['stdlib'].kotlin.collections.iterator_123wqf$(Kotlin.arrayIterator(this.vainfo)); - while (tmp$0.hasNext()) { - var info = tmp$0.next(); - this.webgl.disableVertexAttribArray(info.location); - } - this.webgl.useProgram(null); - }, - getAttribLocation_61zpoe$: function (location) { - return this.webgl.getAttribLocation(this.shaderProgram, location); - }, - getUniformLocation_61zpoe$: function (location) { - return this.webgl.getUniformLocation(this.shaderProgram, location); - }, - setUniform1f_9sobi5$: function (location, value) { - this.webgl.uniform1f(this.getUniformLocation_61zpoe$(location), value); - }, - setUniform2f_9xt0da$: function (location, v1, v2) { - this.webgl.uniform2f(this.getUniformLocation_61zpoe$(location), v1, v2); - }, - setUniform4f_kjn4ou$: function (location, v1, v2, v3, v4) { - this.webgl.uniform4f(this.getUniformLocation_61zpoe$(location), v1, v2, v3, v4); - }, - setUniform1i_bm4lxs$: function (location, value) { - this.webgl.uniform1i(this.getUniformLocation_61zpoe$(location), value); - }, - setUniformMatrix4fv_pphpxd$: function (location, value) { - this.webgl.uniformMatrix4fv(this.getUniformLocation_61zpoe$(location), false, value); - } - }) - }) - }) - }), - ShaderData: Kotlin.createClass(null, function () { - this.offsetX = 0.0; - this.offsetY = 0.0; - }), - MandelBrot: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.ShaderData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.MandelBrot.MandelBrot$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.MandelBrot.prototype */ { - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 1000.0; - this.data.offsetX = Math.sin(time); - this.data.offsetY = Math.cos(time); - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.MandelBrot.render$f(this)); - } - }, /** @lends _.MandelBrot */ { - render$f: function (this$MandelBrot) { - return function (it) { - this$MandelBrot.render(); - }; - }, - MandelBrot$f: function (program, data) { - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, 0.0, 0.0); - } - }), - HTMLElements: Kotlin.createClass(null, function () { - var tmp$0, tmp$1, tmp$2, tmp$3; - this.windowWidth = 0; - this.windowHeight = 0; - this.container = Kotlin.isType(tmp$0 = document.createElement('div'), HTMLElement) ? tmp$0 : Kotlin.throwCCE(); - this.canvas = Kotlin.isType(tmp$1 = document.createElement('canvas'), HTMLCanvasElement) ? tmp$1 : Kotlin.throwCCE(); - this.container.setAttribute('style', 'position: relative;'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 10; width: 2000px; height: 1000px;'); - ((tmp$2 = document.body) != null ? tmp$2 : Kotlin.throwNPE()).appendChild(this.container); - this.container.appendChild(this.canvas); - this.webgl = Kotlin.isType(tmp$3 = this.canvas.getContext('webgl'), WebGLRenderingContext) ? tmp$3 : Kotlin.throwCCE(); - }, /** @lends _.HTMLElements.prototype */ { - resize: function () { - var windowWidth = window.innerWidth | 0; - var windowHeight = window.innerHeight | 0; - if (this.windowWidth !== windowWidth || this.windowHeight !== windowHeight) { - this.windowWidth = windowWidth; - this.windowHeight = windowHeight; - this.canvas.setAttribute('width', windowWidth.toString() + 'px'); - this.canvas.setAttribute('height', windowHeight.toString() + 'px'); - this.canvas.setAttribute('style', 'position: absolute; left: 0px; top: 0px; z-index: 5; width: ' + windowWidth + 'px; height: ' + windowHeight + 'px;'); - this.webgl.viewport(0, 0, windowWidth, windowHeight); - } - }, - getColor_14dthe$: function (mu) { - var clr1 = mu | 0; - var t2 = mu - clr1; - var t1 = 1 - t2; - clr1 = clr1 % 768; - }, - drawMandel: function () { - var tmp$0, tmp$1; - var xs; - var ys; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 767; - var halfWindowHeight = this.windowHeight / 2 | 0; - var red; - var green; - var blue; - var fillStyle; - var mu; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xs = 4.0 / this.windowWidth * x - 2.0; - ys = 4.0 - 4.0 / this.windowHeight * y - 2.0; - xx = 0.0; - yy = 0.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xs; - yy = 2 * xx * yy + ys; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 13 % 768; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - drawJulia_lu1900$: function (xc, yc) { - var tmp$0, tmp$1; - var xx; - var yy; - var xt; - var iteration; - var max_iteration = 511; - var red; - var green; - var blue; - var fillStyle; - tmp$0 = this.windowWidth; - for (var x = 0; x <= tmp$0; x++) { - tmp$1 = this.windowHeight; - for (var y = 0; y <= tmp$1; y++) { - xx = 4.0 / this.windowWidth * x - 2.0; - yy = 4.0 - 4.0 / this.windowHeight * y - 2.0; - iteration = 0; - while (xx * xx + yy * yy < 4 && iteration < max_iteration) { - xt = xx * xx - yy * yy + xc; - yy = 2 * xx * yy + yc; - xx = xt; - iteration++; - } - if (iteration === max_iteration) { - fillStyle = 'rgb(0, 0, 0)'; - } - else { - iteration = iteration * 31 % 512; - red = Math.min(iteration, 255); - green = Math.max(0, Math.min(iteration, 511) - 256); - blue = Math.max(0, Math.min(iteration, 767) - 512); - fillStyle = 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - } - } - }, - render: function () { - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - } - }), - main_kand9s$: function (args) { - var html = new _.HTMLElements(); - var mandelBrot = new _.MandelBrot(html); - var julia = new _.Julia(html); - julia.render(); - }, - JuliaData: Kotlin.createClass(null, function () { - this.juliaX = 0.0; - this.juliaY = 0.0; - this.offsetX = 0.0; - this.offsetY = 0.0; - this.scaleX = 1.0; - this.scaleY = 1.0; - this.iteratorOffset = 0.0; - }), - Julia: Kotlin.createClass(null, function (html) { - var tmp$0; - this.html = html; - this.webgl = this.html.webgl; - this.data = new _.JuliaData(); - this.start = (new Date()).getTime(); - var array = [-1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0]; - this.vertices = new Float32Array(array.length); - this.vertices.set(array, 0); - var setter = _.Julia.Julia$f; - var vainfo = [new _.com.persesgames.shader.VertextAttributeInfo('a_position', 2)]; - this.shaderProgram = new _.com.persesgames.shader.ShaderProgram(this.webgl, WebGLRenderingContext.TRIANGLES, _.vertexShader_rfnujb$, _.fragmentShader_jzx1nv$, vainfo, setter); - tmp$0 = this.webgl.createBuffer(); - if (tmp$0 == null) - throw new Kotlin.IllegalStateException('Unable to create webgl buffer!'); - this.attribBuffer = tmp$0; - this.webgl.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, this.attribBuffer); - }, /** @lends _.Julia.prototype */ { - render: function () { - this.html.resize(); - this.webgl.clearColor(1.0, 1.0, 1.0, 1.0); - this.webgl.clear(WebGLRenderingContext.COLOR_BUFFER_BIT); - var time = (this.start - (new Date()).getTime()) / 500.0; - this.data.juliaX = 0.2800000011920929 + Math.sin(time / 31) / 100.0; - this.data.juliaY = 0.00800000037997961 + Math.cos(time / 23.07) / 100.0; - this.data.scaleX = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.scaleY = 1.2999999523162842 - Math.sin(time / 10.0) * 0.5; - this.data.iteratorOffset = 0.0; - this.shaderProgram.begin_t0l48p$(this.attribBuffer, this.data); - this.webgl.bufferData(WebGLRenderingContext.ARRAY_BUFFER, this.vertices, WebGLRenderingContext.DYNAMIC_DRAW); - this.webgl.drawArrays(this.shaderProgram.drawType, 0, 6); - this.shaderProgram.end(); - window.requestAnimationFrame(_.Julia.render$f(this)); - } - }, /** @lends _.Julia */ { - render$f: function (this$Julia) { - return function (it) { - this$Julia.render(); - }; - }, - Julia$f: function (program, data) { - program.setUniform2f_9xt0da$('u_julia', data.juliaX, data.juliaY); - program.setUniform4f_kjn4ou$('u_viewWindow', data.offsetX, data.offsetY, data.scaleX, data.scaleY); - program.setUniform1f_9sobi5$('u_iteratorOffset', data.iteratorOffset); - } - }) - }); - Kotlin.defineModule('mandelbrot', _); - _.main_kand9s$([]); -}(Kotlin)); diff --git a/web/js/generated/mandelbrot.meta.js b/web/js/generated/mandelbrot.meta.js deleted file mode 100644 index ecbef71..0000000 --- a/web/js/generated/mandelbrot.meta.js +++ /dev/null @@ -1 +0,0 @@ -// Kotlin.kotlin_module_metadata(3, "mandelbrot", "H4sIAAAAAAAAAOPS4xKJd0lNSyzNKQlITM5OTE/Vy84qzhUSkxIRYJBiMmA04hFgluIQYhFiMmA2YOLK41JOgSjXLYCpzy/JycyLLy4pysxLjy9JTMpJFXLX5GLJTczM42KDyHKxhOZllnCxJBalF3OxOhYVJVZysQWDdchwMQkwcrFxMAgwSTCAaRYozSrBAAB2qhMjoAAAAA=="); diff --git a/web/js/kotlin/kotlin.js b/web/js/kotlin/kotlin.js deleted file mode 100644 index bf7f1a6..0000000 --- a/web/js/kotlin/kotlin.js +++ /dev/null @@ -1,23870 +0,0 @@ -'use strict';var Kotlin = {}; -(function(Kotlin) { - function toArray(obj) { - var array; - if (obj == null) { - array = []; - } else { - if (!Array.isArray(obj)) { - array = [obj]; - } else { - array = obj; - } - } - return array; - } - function copyProperties(to, from) { - if (to == null || from == null) { - return; - } - for (var p in from) { - if (from.hasOwnProperty(p)) { - to[p] = from[p]; - } - } - } - function getClass(basesArray) { - for (var i = 0;i < basesArray.length;i++) { - if (isNativeClass(basesArray[i]) || basesArray[i].$metadata$.type === Kotlin.TYPE.CLASS) { - return basesArray[i]; - } - } - return null; - } - var emptyFunction = function() { - return function() { - }; - }; - Kotlin.TYPE = {CLASS:"class", TRAIT:"trait", OBJECT:"object", INIT_FUN:"init fun"}; - Kotlin.classCount = 0; - Kotlin.newClassIndex = function() { - var tmp = Kotlin.classCount; - Kotlin.classCount++; - return tmp; - }; - function isNativeClass(obj) { - return!(obj == null) && obj.$metadata$ == null; - } - function applyExtension(current, bases, baseGetter) { - for (var i = 0;i < bases.length;i++) { - if (isNativeClass(bases[i])) { - continue; - } - var base = baseGetter(bases[i]); - for (var p in base) { - if (base.hasOwnProperty(p)) { - if (!current.hasOwnProperty(p) || current[p].$classIndex$ < base[p].$classIndex$) { - current[p] = base[p]; - } - } - } - } - } - function computeMetadata(bases, properties, staticProperties) { - var metadata = {}; - var p, property; - metadata.baseClasses = toArray(bases); - metadata.baseClass = getClass(metadata.baseClasses); - metadata.classIndex = Kotlin.newClassIndex(); - metadata.functions = {}; - metadata.properties = {}; - metadata.types = {}; - metadata.staticMembers = {}; - if (!(properties == null)) { - for (p in properties) { - if (properties.hasOwnProperty(p)) { - property = properties[p]; - property.$classIndex$ = metadata.classIndex; - if (typeof property === "function") { - metadata.functions[p] = property; - } else { - metadata.properties[p] = property; - } - } - } - } - if (typeof staticProperties !== "undefined") { - for (p in staticProperties) { - property = staticProperties[p]; - if (typeof property === "function" && property.type === Kotlin.TYPE.INIT_FUN) { - metadata.types[p] = property; - } else { - metadata.staticMembers[p] = property; - } - } - } - applyExtension(metadata.functions, metadata.baseClasses, function(it) { - return it.$metadata$.functions; - }); - applyExtension(metadata.properties, metadata.baseClasses, function(it) { - return it.$metadata$.properties; - }); - return metadata; - } - Kotlin.createClassNow = function(bases, constructor, properties, staticProperties) { - if (constructor == null) { - constructor = emptyFunction(); - } - var metadata = computeMetadata(bases, properties, staticProperties); - metadata.type = Kotlin.TYPE.CLASS; - copyProperties(constructor, metadata.staticMembers); - var prototypeObj; - if (metadata.baseClass !== null) { - prototypeObj = Object.create(metadata.baseClass.prototype); - } else { - prototypeObj = {}; - } - Object.defineProperties(prototypeObj, metadata.properties); - copyProperties(prototypeObj, metadata.functions); - prototypeObj.constructor = constructor; - defineNestedTypes(constructor, metadata.types); - if (metadata.baseClass != null) { - constructor.baseInitializer = metadata.baseClass; - } - constructor.$metadata$ = metadata; - constructor.prototype = prototypeObj; - return constructor; - }; - function defineNestedTypes(constructor, types) { - for (var innerTypeName in types) { - var innerType = types[innerTypeName]; - innerType.className = innerTypeName; - Object.defineProperty(constructor, innerTypeName, {get:innerType, configurable:true}); - } - } - Kotlin.createTraitNow = function(bases, properties, staticProperties) { - var obj = function() { - }; - obj.$metadata$ = computeMetadata(bases, properties, staticProperties); - obj.$metadata$.type = Kotlin.TYPE.TRAIT; - copyProperties(obj, obj.$metadata$.staticMembers); - obj.prototype = {}; - Object.defineProperties(obj.prototype, obj.$metadata$.properties); - copyProperties(obj.prototype, obj.$metadata$.functions); - defineNestedTypes(obj, obj.$metadata$.types); - return obj; - }; - function getBases(basesFun) { - if (typeof basesFun === "function") { - return basesFun(); - } else { - return basesFun; - } - } - Kotlin.createClass = function(basesFun, constructor, properties, staticProperties) { - function $o() { - var klass = Kotlin.createClassNow(getBases(basesFun), constructor, properties, staticProperties); - Object.defineProperty(this, $o.className, {value:klass}); - if (staticProperties && staticProperties.object_initializer$) { - staticProperties.object_initializer$(klass); - } - return klass; - } - $o.type = Kotlin.TYPE.INIT_FUN; - return $o; - }; - Kotlin.createEnumClass = function(basesFun, constructor, enumEntries, properties, staticProperties) { - staticProperties = staticProperties || {}; - staticProperties.object_initializer$ = function(cls) { - var enumEntryList = enumEntries(); - var i = 0; - var values = []; - for (var entryName in enumEntryList) { - if (enumEntryList.hasOwnProperty(entryName)) { - var entryFactory = enumEntryList[entryName]; - values.push(entryName); - var entryObject; - if (typeof entryFactory === "function" && entryFactory.type === Kotlin.TYPE.INIT_FUN) { - entryFactory.className = entryName; - entryObject = entryFactory.apply(cls); - } else { - entryObject = entryFactory(); - } - entryObject.ordinal$ = i++; - entryObject.name$ = entryName; - cls[entryName] = entryObject; - } - } - cls.valuesNames$ = values; - cls.values$ = null; - }; - staticProperties.values = function() { - if (this.values$ == null) { - this.values$ = []; - for (var i = 0;i < this.valuesNames$.length;++i) { - this.values$.push(this[this.valuesNames$[i]]); - } - } - return this.values$; - }; - staticProperties.valueOf_61zpoe$ = function(name) { - return this[name]; - }; - return Kotlin.createClass(basesFun, constructor, properties, staticProperties); - }; - Kotlin.createTrait = function(basesFun, properties, staticProperties) { - function $o() { - var klass = Kotlin.createTraitNow(getBases(basesFun), properties, staticProperties); - Object.defineProperty(this, $o.className, {value:klass}); - return klass; - } - $o.type = Kotlin.TYPE.INIT_FUN; - return $o; - }; - Kotlin.createObject = function(basesFun, constructor, functions, staticProperties) { - constructor = constructor || function() { - }; - function $o() { - var klass = Kotlin.createClassNow(getBases(basesFun), null, functions, staticProperties); - var obj = new klass; - var metadata = klass.$metadata$; - metadata.type = Kotlin.TYPE.OBJECT; - Object.defineProperty(this, $o.className, {value:obj}); - defineNestedTypes(obj, klass.$metadata$.types); - copyProperties(obj, metadata.staticMembers); - if (metadata.baseClass != null) { - constructor.baseInitializer = metadata.baseClass; - } - constructor.apply(obj); - return obj; - } - $o.type = Kotlin.TYPE.INIT_FUN; - return $o; - }; - Kotlin.callGetter = function(thisObject, klass, propertyName) { - return klass.$metadata$.properties[propertyName].get.call(thisObject); - }; - Kotlin.callSetter = function(thisObject, klass, propertyName, value) { - klass.$metadata$.properties[propertyName].set.call(thisObject, value); - }; - function isInheritanceFromTrait(objConstructor, trait) { - if (isNativeClass(objConstructor) || objConstructor.$metadata$.classIndex < trait.$metadata$.classIndex) { - return false; - } - var baseClasses = objConstructor.$metadata$.baseClasses; - var i; - for (i = 0;i < baseClasses.length;i++) { - if (baseClasses[i] === trait) { - return true; - } - } - for (i = 0;i < baseClasses.length;i++) { - if (isInheritanceFromTrait(baseClasses[i], trait)) { - return true; - } - } - return false; - } - Kotlin.isType = function(object, klass) { - if (object == null || klass == null) { - return false; - } else { - if (object instanceof klass) { - return true; - } else { - if (isNativeClass(klass) || klass.$metadata$.type == Kotlin.TYPE.CLASS) { - return false; - } else { - return isInheritanceFromTrait(object.constructor, klass); - } - } - } - }; - Kotlin.getCallableRefForMemberFunction = function(klass, memberName) { - return function() { - var args = [].slice.call(arguments); - var instance = args.shift(); - return instance[memberName].apply(instance, args); - }; - }; - Kotlin.getCallableRefForExtensionFunction = function(extFun) { - return function() { - return extFun.apply(null, arguments); - }; - }; - Kotlin.getCallableRefForLocalExtensionFunction = function(extFun) { - return function() { - var args = [].slice.call(arguments); - var instance = args.shift(); - return extFun.apply(instance, args); - }; - }; - Kotlin.getCallableRefForConstructor = function(klass) { - return function() { - var obj = Object.create(klass.prototype); - klass.apply(obj, arguments); - return obj; - }; - }; - Kotlin.getCallableRefForTopLevelProperty = function(packageName, name, isVar) { - var obj = {}; - obj.name = name; - obj.get = function() { - return packageName[name]; - }; - if (isVar) { - obj.set_za3rmp$ = function(value) { - packageName[name] = value; - }; - } - return obj; - }; - Kotlin.getCallableRefForMemberProperty = function(name, isVar) { - var obj = {}; - obj.name = name; - obj.get_za3rmp$ = function(receiver) { - return receiver[name]; - }; - if (isVar) { - obj.set_wn2jw4$ = function(receiver, value) { - receiver[name] = value; - }; - } - return obj; - }; - Kotlin.getCallableRefForExtensionProperty = function(name, getFun, setFun) { - var obj = {}; - obj.name = name; - obj.get_za3rmp$ = getFun; - if (typeof setFun === "function") { - obj.set_wn2jw4$ = setFun; - } - return obj; - }; - Kotlin.modules = {}; - function createPackageGetter(instance, initializer) { - return function() { - if (initializer !== null) { - var tmp = initializer; - initializer = null; - tmp.call(instance); - } - return instance; - }; - } - function createDefinition(members, definition) { - if (typeof definition === "undefined") { - definition = {}; - } - if (members == null) { - return definition; - } - for (var p in members) { - if (members.hasOwnProperty(p)) { - if (typeof members[p] === "function") { - if (members[p].type === Kotlin.TYPE.INIT_FUN) { - members[p].className = p; - Object.defineProperty(definition, p, {get:members[p], configurable:true}); - } else { - definition[p] = members[p]; - } - } else { - Object.defineProperty(definition, p, members[p]); - } - } - } - return definition; - } - Kotlin.createDefinition = createDefinition; - Kotlin.definePackage = function(initializer, members) { - var definition = createDefinition(members); - if (initializer === null) { - return{value:definition}; - } else { - var getter = createPackageGetter(definition, initializer); - return{get:getter}; - } - }; - Kotlin.defineRootPackage = function(initializer, members) { - var definition = createDefinition(members); - if (initializer === null) { - definition.$initializer$ = emptyFunction(); - } else { - definition.$initializer$ = initializer; - } - return definition; - }; - Kotlin.defineModule = function(id, declaration) { - if (id in Kotlin.modules) { - throw new Error("Module " + id + " is already defined"); - } - declaration.$initializer$.call(declaration); - Object.defineProperty(Kotlin.modules, id, {value:declaration}); - }; - Kotlin.defineInlineFunction = function(tag, fun) { - return fun; - }; - Kotlin.isTypeOf = function(type) { - return function(object) { - return typeof object === type; - }; - }; - Kotlin.isInstanceOf = function(klass) { - return function(object) { - return Kotlin.isType(object, klass); - }; - }; - Kotlin.orNull = function(fn) { - return function(object) { - return object == null || fn(object); - }; - }; - Kotlin.isAny = function() { - return function(object) { - return object != null; - }; - }; - Kotlin.andPredicate = function(a, b) { - return function(object) { - return a(object) && b(object); - }; - }; - Kotlin.kotlinModuleMetadata = function(abiVersion, moduleName, data) { - }; -})(Kotlin); -(function(Kotlin) { - var CharSequence = Kotlin.createTraitNow(null); - if (typeof String.prototype.startsWith === "undefined") { - String.prototype.startsWith = function(searchString, position) { - position = position || 0; - return this.lastIndexOf(searchString, position) === position; - }; - } - if (typeof String.prototype.endsWith === "undefined") { - String.prototype.endsWith = function(searchString, position) { - var subjectString = this.toString(); - if (position === undefined || position > subjectString.length) { - position = subjectString.length; - } - position -= searchString.length; - var lastIndex = subjectString.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; - }; - } - String.prototype.contains = function(s) { - return this.indexOf(s) !== -1; - }; - Kotlin.equals = function(obj1, obj2) { - if (obj1 == null) { - return obj2 == null; - } - if (obj2 == null) { - return false; - } - if (Array.isArray(obj1)) { - return Kotlin.arrayEquals(obj1, obj2); - } - if (typeof obj1 == "object" && typeof obj1.equals_za3rmp$ === "function") { - return obj1.equals_za3rmp$(obj2); - } - return obj1 === obj2; - }; - Kotlin.hashCode = function(obj) { - if (obj == null) { - return 0; - } - if ("function" == typeof obj.hashCode) { - return obj.hashCode(); - } - var objType = typeof obj; - if ("object" == objType || "function" == objType) { - return getObjectHashCode(obj); - } else { - if ("number" == objType) { - return obj | 0; - } - } - if ("boolean" == objType) { - return Number(obj); - } - var str = String(obj); - return getStringHashCode(str); - }; - Kotlin.toString = function(o) { - if (o == null) { - return "null"; - } else { - if (Array.isArray(o)) { - return Kotlin.arrayToString(o); - } else { - return o.toString(); - } - } - }; - Kotlin.arrayToString = function(a) { - return "[" + a.map(Kotlin.toString).join(", ") + "]"; - }; - Kotlin.compareTo = function(a, b) { - var typeA = typeof a; - var typeB = typeof a; - if (Kotlin.isChar(a) && typeB == "number") { - return Kotlin.primitiveCompareTo(a.charCodeAt(0), b); - } - if (typeA == "number" && Kotlin.isChar(b)) { - return Kotlin.primitiveCompareTo(a, b.charCodeAt(0)); - } - if (typeA == "number" || typeA == "string") { - return a < b ? -1 : a > b ? 1 : 0; - } - return a.compareTo_za3rmp$(b); - }; - Kotlin.primitiveCompareTo = function(a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }; - Kotlin.isNumber = function(a) { - return typeof a == "number" || a instanceof Kotlin.Long; - }; - Kotlin.isChar = function(value) { - return typeof value == "string" && value.length == 1; - }; - Kotlin.isComparable = function(value) { - var type = typeof value; - return type === "string" || (type === "boolean" || (Kotlin.isNumber(value) || Kotlin.isType(value, Kotlin.Comparable))); - }; - Kotlin.isCharSequence = function(value) { - return typeof value === "string" || Kotlin.isType(value, CharSequence); - }; - Kotlin.charInc = function(value) { - return String.fromCharCode(value.charCodeAt(0) + 1); - }; - Kotlin.charDec = function(value) { - return String.fromCharCode(value.charCodeAt(0) - 1); - }; - Kotlin.toShort = function(a) { - return(a & 65535) << 16 >> 16; - }; - Kotlin.toByte = function(a) { - return(a & 255) << 24 >> 24; - }; - Kotlin.toChar = function(a) { - return String.fromCharCode(((a | 0) % 65536 & 65535) << 16 >>> 16); - }; - Kotlin.numberToLong = function(a) { - return a instanceof Kotlin.Long ? a : Kotlin.Long.fromNumber(a); - }; - Kotlin.numberToInt = function(a) { - return a instanceof Kotlin.Long ? a.toInt() : a | 0; - }; - Kotlin.numberToShort = function(a) { - return Kotlin.toShort(Kotlin.numberToInt(a)); - }; - Kotlin.numberToByte = function(a) { - return Kotlin.toByte(Kotlin.numberToInt(a)); - }; - Kotlin.numberToDouble = function(a) { - return+a; - }; - Kotlin.numberToChar = function(a) { - return Kotlin.toChar(Kotlin.numberToInt(a)); - }; - Kotlin.intUpto = function(from, to) { - return new Kotlin.NumberRange(from, to); - }; - Kotlin.intDownto = function(from, to) { - return new Kotlin.Progression(from, to, -1); - }; - Kotlin.Throwable = Error; - function createClassNowWithMessage(base) { - return Kotlin.createClassNow(base, function(message) { - this.message = message !== void 0 ? message : null; - }); - } - Kotlin.Error = createClassNowWithMessage(Kotlin.Throwable); - Kotlin.Exception = createClassNowWithMessage(Kotlin.Throwable); - Kotlin.RuntimeException = createClassNowWithMessage(Kotlin.Exception); - Kotlin.NullPointerException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.NoSuchElementException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IllegalArgumentException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IllegalStateException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.UnsupportedOperationException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IndexOutOfBoundsException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.ClassCastException = createClassNowWithMessage(Kotlin.RuntimeException); - Kotlin.IOException = createClassNowWithMessage(Kotlin.Exception); - Kotlin.AssertionError = createClassNowWithMessage(Kotlin.Error); - Kotlin.throwNPE = function(message) { - throw new Kotlin.NullPointerException(message); - }; - Kotlin.throwCCE = function() { - throw new Kotlin.ClassCastException("Illegal cast"); - }; - function throwAbstractFunctionInvocationError(funName) { - return function() { - var message; - if (funName !== void 0) { - message = "Function " + funName + " is abstract"; - } else { - message = "Function is abstract"; - } - throw new TypeError(message); - }; - } - var POW_2_32 = 4294967296; - var OBJECT_HASH_CODE_PROPERTY_NAME = "kotlinHashCodeValue$"; - function getObjectHashCode(obj) { - if (!(OBJECT_HASH_CODE_PROPERTY_NAME in obj)) { - var hash = Math.random() * POW_2_32 | 0; - Object.defineProperty(obj, OBJECT_HASH_CODE_PROPERTY_NAME, {value:hash, enumerable:false}); - } - return obj[OBJECT_HASH_CODE_PROPERTY_NAME]; - } - function getStringHashCode(str) { - var hash = 0; - for (var i = 0;i < str.length;i++) { - var code = str.charCodeAt(i); - hash = hash * 31 + code | 0; - } - return hash; - } - var lazyInitClasses = {}; - lazyInitClasses.ArrayIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableIterator]; - }, function(array) { - this.array = array; - this.index = 0; - }, {next:function() { - return this.array[this.index++]; - }, hasNext:function() { - return this.index < this.array.length; - }, remove:function() { - if (this.index < 0 || this.index > this.array.length) { - throw new RangeError; - } - this.index--; - this.array.splice(this.index, 1); - }}); - lazyInitClasses.ListIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.ListIterator]; - }, function(list, index) { - this.list = list; - this.size = list.size; - this.index = index === undefined ? 0 : index; - }, {hasNext:function() { - return this.index < this.size; - }, nextIndex:function() { - return this.index; - }, next:function() { - var index = this.index; - var result = this.list.get_za3lpa$(index); - this.index = index + 1; - return result; - }, hasPrevious:function() { - return this.index > 0; - }, previousIndex:function() { - return this.index - 1; - }, previous:function() { - var index = this.index - 1; - var result = this.list.get_za3lpa$(index); - this.index = index; - return result; - }}); - Kotlin.Enum = Kotlin.createClassNow(null, function() { - this.name$ = void 0; - this.ordinal$ = void 0; - }, {name:{get:function() { - return this.name$; - }}, ordinal:{get:function() { - return this.ordinal$; - }}, equals_za3rmp$:function(o) { - return this === o; - }, hashCode:function() { - return getObjectHashCode(this); - }, compareTo_za3rmp$:function(o) { - return this.ordinal$ < o.ordinal$ ? -1 : this.ordinal$ > o.ordinal$ ? 1 : 0; - }, toString:function() { - return this.name; - }}); - Kotlin.RandomAccess = Kotlin.createTraitNow(null); - Kotlin.PropertyMetadata = Kotlin.createClassNow(null, function(name) { - this.name = name; - }); - lazyInitClasses.AbstractCollection = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableCollection]; - }, null, {addAll_wtfk93$:function(collection) { - var modified = false; - var it = collection.iterator(); - while (it.hasNext()) { - if (this.add_za3rmp$(it.next())) { - modified = true; - } - } - return modified; - }, removeAll_wtfk93$:function(c) { - var modified = false; - var it = this.iterator(); - while (it.hasNext()) { - if (c.contains_za3rmp$(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - }, retainAll_wtfk93$:function(c) { - var modified = false; - var it = this.iterator(); - while (it.hasNext()) { - if (!c.contains_za3rmp$(it.next())) { - it.remove(); - modified = true; - } - } - return modified; - }, clear:function() { - throw new Kotlin.NotImplementedError("Not implemented yet, see KT-7809"); - }, containsAll_wtfk93$:function(c) { - var it = c.iterator(); - while (it.hasNext()) { - if (!this.contains_za3rmp$(it.next())) { - return false; - } - } - return true; - }, isEmpty:function() { - return this.size === 0; - }, iterator:function() { - return new Kotlin.ArrayIterator(this.toArray()); - }, equals_za3rmp$:function(o) { - if (this.size !== o.size) { - return false; - } - var iterator1 = this.iterator(); - var iterator2 = o.iterator(); - var i = this.size; - while (i-- > 0) { - if (!Kotlin.equals(iterator1.next(), iterator2.next())) { - return false; - } - } - return true; - }, toString:function() { - var builder = "["; - var iterator = this.iterator(); - var first = true; - var i = this.size; - while (i-- > 0) { - if (first) { - first = false; - } else { - builder += ", "; - } - builder += Kotlin.toString(iterator.next()); - } - builder += "]"; - return builder; - }, toJSON:function() { - return this.toArray(); - }}); - lazyInitClasses.AbstractList = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableList, Kotlin.AbstractCollection]; - }, null, {iterator:function() { - return new Kotlin.ListIterator(this); - }, listIterator:function() { - return new Kotlin.ListIterator(this); - }, listIterator_za3lpa$:function(index) { - if (index < 0 || index > this.size) { - throw new Kotlin.IndexOutOfBoundsException("Index: " + index + ", size: " + this.size); - } - return new Kotlin.ListIterator(this, index); - }, add_za3rmp$:function(element) { - this.add_vux3hl$(this.size, element); - return true; - }, addAll_j97iir$:function(index, collection) { - throw new Kotlin.NotImplementedError("Not implemented yet, see KT-7809"); - }, remove_za3rmp$:function(o) { - var index = this.indexOf_za3rmp$(o); - if (index !== -1) { - this.removeAt_za3lpa$(index); - return true; - } - return false; - }, clear:function() { - throw new Kotlin.NotImplementedError("Not implemented yet, see KT-7809"); - }, contains_za3rmp$:function(o) { - return this.indexOf_za3rmp$(o) !== -1; - }, indexOf_za3rmp$:function(o) { - var i = this.listIterator(); - while (i.hasNext()) { - if (Kotlin.equals(i.next(), o)) { - return i.previousIndex(); - } - } - return-1; - }, lastIndexOf_za3rmp$:function(o) { - var i = this.listIterator_za3lpa$(this.size); - while (i.hasPrevious()) { - if (Kotlin.equals(i.previous(), o)) { - return i.nextIndex(); - } - } - return-1; - }, subList_vux9f0$:function(fromIndex, toIndex) { - if (fromIndex < 0 || toIndex > this.size) { - throw new Kotlin.IndexOutOfBoundsException; - } - if (fromIndex > toIndex) { - throw new Kotlin.IllegalArgumentException; - } - return new Kotlin.SubList(this, fromIndex, toIndex); - }, hashCode:function() { - var result = 1; - var i = this.iterator(); - while (i.hasNext()) { - var obj = i.next(); - result = 31 * result + Kotlin.hashCode(obj) | 0; - } - return result; - }}); - lazyInitClasses.SubList = Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function(list, fromIndex, toIndex) { - this.list = list; - this.offset = fromIndex; - this._size = toIndex - fromIndex; - }, {get_za3lpa$:function(index) { - this.checkRange(index); - return this.list.get_za3lpa$(index + this.offset); - }, set_vux3hl$:function(index, value) { - this.checkRange(index); - this.list.set_vux3hl$(index + this.offset, value); - }, size:{get:function() { - return this._size; - }}, add_vux3hl$:function(index, element) { - if (index < 0 || index > this.size) { - throw new Kotlin.IndexOutOfBoundsException; - } - this.list.add_vux3hl$(index + this.offset, element); - }, removeAt_za3lpa$:function(index) { - this.checkRange(index); - var result = this.list.removeAt_za3lpa$(index + this.offset); - this._size--; - return result; - }, checkRange:function(index) { - if (index < 0 || index >= this._size) { - throw new Kotlin.IndexOutOfBoundsException; - } - }}); - lazyInitClasses.ArrayList = Kotlin.createClass(function() { - return[Kotlin.AbstractList, Kotlin.RandomAccess]; - }, function() { - this.array = []; - }, {get_za3lpa$:function(index) { - this.checkRange(index); - return this.array[index]; - }, set_vux3hl$:function(index, value) { - this.checkRange(index); - this.array[index] = value; - }, size:{get:function() { - return this.array.length; - }}, iterator:function() { - return Kotlin.arrayIterator(this.array); - }, add_za3rmp$:function(element) { - this.array.push(element); - return true; - }, add_vux3hl$:function(index, element) { - this.array.splice(index, 0, element); - }, addAll_wtfk93$:function(collection) { - if (collection.size == 0) { - return false; - } - var it = collection.iterator(); - for (var i = this.array.length, n = collection.size;n-- > 0;) { - this.array[i++] = it.next(); - } - return true; - }, removeAt_za3lpa$:function(index) { - this.checkRange(index); - return this.array.splice(index, 1)[0]; - }, clear:function() { - this.array.length = 0; - }, indexOf_za3rmp$:function(o) { - for (var i = 0;i < this.array.length;i++) { - if (Kotlin.equals(this.array[i], o)) { - return i; - } - } - return-1; - }, lastIndexOf_za3rmp$:function(o) { - for (var i = this.array.length - 1;i >= 0;i--) { - if (Kotlin.equals(this.array[i], o)) { - return i; - } - } - return-1; - }, toArray:function() { - return this.array.slice(0); - }, toString:function() { - return Kotlin.arrayToString(this.array); - }, toJSON:function() { - return this.array; - }, checkRange:function(index) { - if (index < 0 || index >= this.array.length) { - throw new Kotlin.IndexOutOfBoundsException; - } - }}); - Kotlin.Runnable = Kotlin.createClassNow(null, null, {run:throwAbstractFunctionInvocationError("Runnable#run")}); - Kotlin.Comparable = Kotlin.createClassNow(null, null, {compareTo:throwAbstractFunctionInvocationError("Comparable#compareTo")}); - Kotlin.Appendable = Kotlin.createClassNow(null, null, {append:throwAbstractFunctionInvocationError("Appendable#append")}); - Kotlin.Closeable = Kotlin.createClassNow(null, null, {close:throwAbstractFunctionInvocationError("Closeable#close")}); - Kotlin.safeParseInt = function(str) { - var r = parseInt(str, 10); - return isNaN(r) ? null : r; - }; - Kotlin.safeParseDouble = function(str) { - var r = parseFloat(str); - return isNaN(r) ? null : r; - }; - Kotlin.arrayEquals = function(a, b) { - if (a === b) { - return true; - } - if (!Array.isArray(b) || a.length !== b.length) { - return false; - } - for (var i = 0, n = a.length;i < n;i++) { - if (!Kotlin.equals(a[i], b[i])) { - return false; - } - } - return true; - }; - var BaseOutput = Kotlin.createClassNow(null, null, {println:function(a) { - if (typeof a !== "undefined") { - this.print(a); - } - this.print("\n"); - }, flush:function() { - }}); - Kotlin.NodeJsOutput = Kotlin.createClassNow(BaseOutput, function(outputStream) { - this.outputStream = outputStream; - }, {print:function(a) { - this.outputStream.write(a); - }}); - Kotlin.OutputToConsoleLog = Kotlin.createClassNow(BaseOutput, null, {print:function(a) { - console.log(a); - }, println:function(a) { - this.print(typeof a !== "undefined" ? a : ""); - }}); - Kotlin.BufferedOutput = Kotlin.createClassNow(BaseOutput, function() { - this.buffer = ""; - }, {print:function(a) { - this.buffer += String(a); - }, flush:function() { - this.buffer = ""; - }}); - Kotlin.BufferedOutputToConsoleLog = Kotlin.createClassNow(Kotlin.BufferedOutput, function() { - Kotlin.BufferedOutput.call(this); - }, {print:function(a) { - var s = String(a); - var i = s.lastIndexOf("\n"); - if (i != -1) { - this.buffer += s.substr(0, i); - this.flush(); - s = s.substr(i + 1); - } - this.buffer += s; - }, flush:function() { - console.log(this.buffer); - this.buffer = ""; - }}); - Kotlin.out = function() { - var isNode = typeof process !== "undefined" && (process.versions && !!process.versions.node); - if (isNode) { - return new Kotlin.NodeJsOutput(process.stdout); - } - return new Kotlin.BufferedOutputToConsoleLog; - }(); - Kotlin.println = function(s) { - Kotlin.out.println(s); - }; - Kotlin.print = function(s) { - Kotlin.out.print(s); - }; - lazyInitClasses.RangeIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(start, end, step) { - this.start = start; - this.end = end; - this.step = step; - this.i = start; - }, {next:function() { - var value = this.i; - this.i = this.i + this.step; - return value; - }, hasNext:function() { - if (this.step > 0) { - return this.i <= this.end; - } else { - return this.i >= this.end; - } - }}); - function isSameNotNullRanges(other) { - var classObject = this.constructor; - if (this instanceof classObject && other instanceof classObject) { - return this.isEmpty() && other.isEmpty() || this.first === other.first && (this.last === other.last && this.step === other.step); - } - return false; - } - function isSameLongRanges(other) { - var classObject = this.constructor; - if (this instanceof classObject && other instanceof classObject) { - return this.isEmpty() && other.isEmpty() || this.first.equals_za3rmp$(other.first) && (this.last.equals_za3rmp$(other.last) && this.step.equals_za3rmp$(other.step)); - } - return false; - } - function getProgressionFinalElement(start, end, step) { - function mod(a, b) { - var mod = a % b; - return mod >= 0 ? mod : mod + b; - } - function differenceModulo(a, b, c) { - return mod(mod(a, c) - mod(b, c), c); - } - if (step > 0) { - return end - differenceModulo(end, start, step); - } else { - if (step < 0) { - return end + differenceModulo(start, end, -step); - } else { - throw new Kotlin.IllegalArgumentException("Step is zero."); - } - } - } - function getProgressionFinalElementLong(start, end, step) { - function mod(a, b) { - var mod = a.modulo(b); - return!mod.isNegative() ? mod : mod.add(b); - } - function differenceModulo(a, b, c) { - return mod(mod(a, c).subtract(mod(b, c)), c); - } - var diff; - if (step.compareTo_za3rmp$(Kotlin.Long.ZERO) > 0) { - diff = differenceModulo(end, start, step); - return diff.isZero() ? end : end.subtract(diff); - } else { - if (step.compareTo_za3rmp$(Kotlin.Long.ZERO) < 0) { - diff = differenceModulo(start, end, step.unaryMinus()); - return diff.isZero() ? end : end.add(diff); - } else { - throw new Kotlin.IllegalArgumentException("Step is zero."); - } - } - } - lazyInitClasses.NumberProgression = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(start, end, step) { - this.first = start; - this.last = getProgressionFinalElement(start, end, step); - this.step = step; - if (this.step === 0) { - throw new Kotlin.IllegalArgumentException("Step must be non-zero"); - } - }, {iterator:function() { - return new Kotlin.RangeIterator(this.first, this.last, this.step); - }, isEmpty:function() { - return this.step > 0 ? this.first > this.last : this.first < this.last; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * (31 * this.first + this.last) + this.step; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.step > 0 ? this.first.toString() + ".." + this.last + " step " + this.step : this.first.toString() + " downTo " + this.last + " step " + -this.step; - }}); - lazyInitClasses.NumberRange = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange, Kotlin.NumberProgression]; - }, function $fun(start, endInclusive) { - $fun.baseInitializer.call(this, start, endInclusive, 1); - this.start = start; - this.endInclusive = endInclusive; - }, {contains_htax2k$:function(item) { - return this.start <= item && item <= this.endInclusive; - }, isEmpty:function() { - return this.start > this.endInclusive; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * this.start + this.endInclusive; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.start.toString() + ".." + this.endInclusive; - }}, {Companion:Kotlin.createObject(null, function() { - this.EMPTY = new Kotlin.NumberRange(1, 0); - })}); - lazyInitClasses.LongRangeIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(start, end, step) { - this.start = start; - this.end = end; - this.step = step; - this.i = start; - }, {next:function() { - var value = this.i; - this.i = this.i.add(this.step); - return value; - }, hasNext:function() { - if (this.step.isNegative()) { - return this.i.compare(this.end) >= 0; - } else { - return this.i.compare(this.end) <= 0; - } - }}); - lazyInitClasses.LongProgression = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(start, end, step) { - this.first = start; - this.last = getProgressionFinalElementLong(start, end, step); - this.step = step; - if (this.step.isZero()) { - throw new Kotlin.IllegalArgumentException("Step must be non-zero"); - } - }, {iterator:function() { - return new Kotlin.LongRangeIterator(this.first, this.last, this.step); - }, isEmpty:function() { - return this.step.isNegative() ? this.first.compare(this.last) < 0 : this.first.compare(this.last) > 0; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * (31 * this.first.toInt() + this.last.toInt()) + this.step.toInt(); - }, equals_za3rmp$:isSameLongRanges, toString:function() { - return!this.step.isNegative() ? this.first.toString() + ".." + this.last + " step " + this.step : this.first.toString() + " downTo " + this.last + " step " + this.step.unaryMinus(); - }}); - lazyInitClasses.LongRange = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange, Kotlin.LongProgression]; - }, function $fun(start, endInclusive) { - $fun.baseInitializer.call(this, start, endInclusive, Kotlin.Long.ONE); - this.start = start; - this.endInclusive = endInclusive; - }, {contains_htax2k$:function(item) { - return this.start.compareTo_za3rmp$(item) <= 0 && item.compareTo_za3rmp$(this.endInclusive) <= 0; - }, isEmpty:function() { - return this.start.compare(this.endInclusive) > 0; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * this.start.toInt() + this.endInclusive.toInt(); - }, equals_za3rmp$:isSameLongRanges, toString:function() { - return this.start.toString() + ".." + this.endInclusive; - }}, {Companion:Kotlin.createObject(null, function() { - this.EMPTY = new Kotlin.LongRange(Kotlin.Long.ONE, Kotlin.Long.ZERO); - })}); - lazyInitClasses.CharRangeIterator = Kotlin.createClass(function() { - return[Kotlin.RangeIterator]; - }, function(start, end, step) { - Kotlin.RangeIterator.call(this, start, end, step); - }, {next:function() { - var value = this.i; - this.i = this.i + this.step; - return String.fromCharCode(value); - }}); - lazyInitClasses.CharProgression = Kotlin.createClassNow(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(start, end, step) { - this.first = start; - this.startCode = start.charCodeAt(0); - this.endCode = getProgressionFinalElement(this.startCode, end.charCodeAt(0), step); - this.last = String.fromCharCode(this.endCode); - this.step = step; - if (this.step === 0) { - throw new Kotlin.IllegalArgumentException("Increment must be non-zero"); - } - }, {iterator:function() { - return new Kotlin.CharRangeIterator(this.startCode, this.endCode, this.step); - }, isEmpty:function() { - return this.step > 0 ? this.startCode > this.endCode : this.startCode < this.endCode; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * (31 * this.startCode | 0 + this.endCode | 0) + this.step | 0; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.step > 0 ? this.first.toString() + ".." + this.last + " step " + this.step : this.first.toString() + " downTo " + this.last + " step " + -this.step; - }}); - lazyInitClasses.CharRange = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange, Kotlin.CharProgression]; - }, function $fun(start, endInclusive) { - $fun.baseInitializer.call(this, start, endInclusive, 1); - this.start = start; - this.endInclusive = endInclusive; - }, {contains_htax2k$:function(item) { - return this.start <= item && item <= this.endInclusive; - }, isEmpty:function() { - return this.start > this.endInclusive; - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * this.startCode | 0 + this.endCode | 0; - }, equals_za3rmp$:isSameNotNullRanges, toString:function() { - return this.start.toString() + ".." + this.endInclusive; - }}, {Companion:Kotlin.createObject(null, function() { - this.EMPTY = new Kotlin.CharRange(Kotlin.toChar(1), Kotlin.toChar(0)); - })}); - Kotlin.Comparator = Kotlin.createClassNow(null, null, {compare:throwAbstractFunctionInvocationError("Comparator#compare")}); - Kotlin.collectionsMax = function(c, comp) { - if (c.isEmpty()) { - throw new Error; - } - var it = c.iterator(); - var max = it.next(); - while (it.hasNext()) { - var el = it.next(); - if (comp.compare(max, el) < 0) { - max = el; - } - } - return max; - }; - Kotlin.collectionsSort = function(mutableList, comparator) { - var boundComparator = void 0; - if (comparator !== void 0) { - boundComparator = comparator.compare.bind(comparator); - } - if (mutableList instanceof Array) { - mutableList.sort(boundComparator); - } - if (mutableList.size > 1) { - var array = Kotlin.copyToArray(mutableList); - array.sort(boundComparator); - for (var i = 0, n = array.length;i < n;i++) { - mutableList.set_vux3hl$(i, array[i]); - } - } - }; - Kotlin.primitiveArraySort = function(array) { - array.sort(Kotlin.primitiveCompareTo); - }; - Kotlin.copyToArray = function(collection) { - if (typeof collection.toArray !== "undefined") { - return collection.toArray(); - } - var array = []; - var it = collection.iterator(); - while (it.hasNext()) { - array.push(it.next()); - } - return array; - }; - Kotlin.StringBuilder = Kotlin.createClassNow([CharSequence], function(content) { - this.string = typeof content == "string" ? content : ""; - }, {length:{get:function() { - return this.string.length; - }}, substring:function(start, end) { - return this.string.substring(start, end); - }, charAt:function(index) { - return this.string.charAt(index); - }, append:function(obj, from, to) { - if (from == void 0 && to == void 0) { - this.string = this.string + obj.toString(); - } else { - if (to == void 0) { - this.string = this.string + obj.toString().substring(from); - } else { - this.string = this.string + obj.toString().substring(from, to); - } - } - return this; - }, reverse:function() { - this.string = this.string.split("").reverse().join(""); - return this; - }, toString:function() { - return this.string; - }}); - Kotlin.splitString = function(str, regex, limit) { - return str.split(new RegExp(regex), limit); - }; - Kotlin.nullArray = function(size) { - var res = []; - var i = size; - while (i > 0) { - res[--i] = null; - } - return res; - }; - Kotlin.numberArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return 0; - }); - }; - Kotlin.charArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return "\x00"; - }); - }; - Kotlin.booleanArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return false; - }); - }; - Kotlin.longArrayOfSize = function(size) { - return Kotlin.arrayFromFun(size, function() { - return Kotlin.Long.ZERO; - }); - }; - Kotlin.arrayFromFun = function(size, initFun) { - var result = new Array(size); - for (var i = 0;i < size;i++) { - result[i] = initFun(i); - } - return result; - }; - Kotlin.arrayIterator = function(array) { - return new Kotlin.ArrayIterator(array); - }; - Kotlin.jsonAddProperties = function(obj1, obj2) { - for (var p in obj2) { - if (obj2.hasOwnProperty(p)) { - obj1[p] = obj2[p]; - } - } - return obj1; - }; - Kotlin.createDefinition(lazyInitClasses, Kotlin); -})(Kotlin); -(function(Kotlin) { - function Entry(key, value) { - this.key = key; - this.value = value; - } - Entry.prototype.getKey = function() { - return this.key; - }; - Entry.prototype.getValue = function() { - return this.value; - }; - Entry.prototype.hashCode = function() { - return mapEntryHashCode(this.key, this.value); - }; - Entry.prototype.equals_za3rmp$ = function(o) { - return o instanceof Entry && (Kotlin.equals(this.key, o.getKey()) && Kotlin.equals(this.value, o.getValue())); - }; - Entry.prototype.toString = function() { - return Kotlin.toString(this.key) + "\x3d" + Kotlin.toString(this.value); - }; - function hashMapPutAll(fromMap) { - var entries = fromMap.entries; - var it = entries.iterator(); - while (it.hasNext()) { - var e = it.next(); - this.put_wn2jw4$(e.getKey(), e.getValue()); - } - } - function hashSetEquals(o) { - if (o == null || this.size !== o.size) { - return false; - } - return this.containsAll_wtfk93$(o); - } - function hashSetHashCode() { - var h = 0; - var i = this.iterator(); - while (i.hasNext()) { - var obj = i.next(); - h += Kotlin.hashCode(obj); - } - return h; - } - function convertKeyToString(key) { - return key; - } - function convertKeyToNumber(key) { - return+key; - } - function convertKeyToBoolean(key) { - return key == "true"; - } - var FUNCTION = "function"; - var arrayRemoveAt = typeof Array.prototype.splice == FUNCTION ? function(arr, idx) { - arr.splice(idx, 1); - } : function(arr, idx) { - var itemsAfterDeleted, i, len; - if (idx === arr.length - 1) { - arr.length = idx; - } else { - itemsAfterDeleted = arr.slice(idx + 1); - arr.length = idx; - for (i = 0, len = itemsAfterDeleted.length;i < len;++i) { - arr[idx + i] = itemsAfterDeleted[i]; - } - } - }; - function hashObject(obj) { - if (obj == null) { - return ""; - } - var hashCode; - if (typeof obj == "string") { - return obj; - } else { - if (typeof obj.hashCode == FUNCTION) { - hashCode = obj.hashCode(); - return typeof hashCode == "string" ? hashCode : hashObject(hashCode); - } else { - if (typeof obj.toString == FUNCTION) { - return obj.toString(); - } else { - try { - return String(obj); - } catch (ex) { - return Object.prototype.toString.call(obj); - } - } - } - } - } - function mapEntryHashCode(key, value) { - return Kotlin.hashCode(key) ^ Kotlin.hashCode(value); - } - function equals_fixedValueHasEquals(fixedValue, variableValue) { - return fixedValue.equals_za3rmp$(variableValue); - } - function equals_fixedValueNoEquals(fixedValue, variableValue) { - return variableValue != null && typeof variableValue.equals_za3rmp$ == FUNCTION ? variableValue.equals_za3rmp$(fixedValue) : fixedValue === variableValue; - } - function Bucket(hash, firstKey, firstValue, equalityFunction) { - this[0] = hash; - this.entries = []; - this.addEntry(firstKey, firstValue); - if (equalityFunction !== null) { - this.getEqualityFunction = function() { - return equalityFunction; - }; - } - } - var EXISTENCE = 0, ENTRY = 1, ENTRY_INDEX_AND_VALUE = 2; - function createBucketSearcher(mode) { - return function(key) { - var i = this.entries.length, entry, equals = this.getEqualityFunction(key); - while (i--) { - entry = this.entries[i]; - if (equals(key, entry[0])) { - switch(mode) { - case EXISTENCE: - return true; - case ENTRY: - return entry; - case ENTRY_INDEX_AND_VALUE: - return[i, entry[1]]; - } - } - } - return false; - }; - } - function createBucketLister(entryProperty) { - return function(aggregatedArr) { - var startIndex = aggregatedArr.length; - for (var i = 0, len = this.entries.length;i < len;++i) { - aggregatedArr[startIndex + i] = this.entries[i][entryProperty]; - } - }; - } - Bucket.prototype = {getEqualityFunction:function(searchValue) { - return searchValue != null && typeof searchValue.equals_za3rmp$ == FUNCTION ? equals_fixedValueHasEquals : equals_fixedValueNoEquals; - }, getEntryForKey:createBucketSearcher(ENTRY), getEntryAndIndexForKey:createBucketSearcher(ENTRY_INDEX_AND_VALUE), removeEntryForKey:function(key) { - var result = this.getEntryAndIndexForKey(key); - if (result) { - arrayRemoveAt(this.entries, result[0]); - return result; - } - return null; - }, addEntry:function(key, value) { - this.entries[this.entries.length] = [key, value]; - }, keys:createBucketLister(0), values:createBucketLister(1), getEntries:function(entries) { - var startIndex = entries.length; - for (var i = 0, len = this.entries.length;i < len;++i) { - entries[startIndex + i] = this.entries[i].slice(0); - } - }, containsKey_za3rmp$:createBucketSearcher(EXISTENCE), containsValue_za3rmp$:function(value) { - var i = this.entries.length; - while (i--) { - if (value === this.entries[i][1]) { - return true; - } - } - return false; - }}; - function searchBuckets(buckets, hash) { - var i = buckets.length, bucket; - while (i--) { - bucket = buckets[i]; - if (hash === bucket[0]) { - return i; - } - } - return null; - } - function getBucketForHash(bucketsByHash, hash) { - var bucket = bucketsByHash[hash]; - return bucket && bucket instanceof Bucket ? bucket : null; - } - var Hashtable = function(hashingFunctionParam, equalityFunctionParam) { - var that = this; - var buckets = []; - var bucketsByHash = {}; - var hashingFunction = typeof hashingFunctionParam == FUNCTION ? hashingFunctionParam : hashObject; - var equalityFunction = typeof equalityFunctionParam == FUNCTION ? equalityFunctionParam : null; - this.put_wn2jw4$ = function(key, value) { - var hash = hashingFunction(key), bucket, bucketEntry, oldValue = null; - bucket = getBucketForHash(bucketsByHash, hash); - if (bucket) { - bucketEntry = bucket.getEntryForKey(key); - if (bucketEntry) { - oldValue = bucketEntry[1]; - bucketEntry[1] = value; - } else { - bucket.addEntry(key, value); - } - } else { - bucket = new Bucket(hash, key, value, equalityFunction); - buckets[buckets.length] = bucket; - bucketsByHash[hash] = bucket; - } - return oldValue; - }; - this.get_za3rmp$ = function(key) { - var hash = hashingFunction(key); - var bucket = getBucketForHash(bucketsByHash, hash); - if (bucket) { - var bucketEntry = bucket.getEntryForKey(key); - if (bucketEntry) { - return bucketEntry[1]; - } - } - return null; - }; - this.containsKey_za3rmp$ = function(key) { - var bucketKey = hashingFunction(key); - var bucket = getBucketForHash(bucketsByHash, bucketKey); - return bucket ? bucket.containsKey_za3rmp$(key) : false; - }; - this.containsValue_za3rmp$ = function(value) { - var i = buckets.length; - while (i--) { - if (buckets[i].containsValue_za3rmp$(value)) { - return true; - } - } - return false; - }; - this.clear = function() { - buckets.length = 0; - bucketsByHash = {}; - }; - this.isEmpty = function() { - return!buckets.length; - }; - var createBucketAggregator = function(bucketFuncName) { - return function() { - var aggregated = [], i = buckets.length; - while (i--) { - buckets[i][bucketFuncName](aggregated); - } - return aggregated; - }; - }; - this._keys = createBucketAggregator("keys"); - this._values = createBucketAggregator("values"); - this._entries = createBucketAggregator("getEntries"); - Object.defineProperty(this, "values", {get:function() { - var values = this._values(); - var i = values.length; - var result = new Kotlin.ArrayList; - while (i--) { - result.add_za3rmp$(values[i]); - } - return result; - }, configurable:true}); - this.remove_za3rmp$ = function(key) { - var hash = hashingFunction(key), bucketIndex, oldValue = null, result = null; - var bucket = getBucketForHash(bucketsByHash, hash); - if (bucket) { - result = bucket.removeEntryForKey(key); - if (result !== null) { - oldValue = result[1]; - if (!bucket.entries.length) { - bucketIndex = searchBuckets(buckets, hash); - arrayRemoveAt(buckets, bucketIndex); - delete bucketsByHash[hash]; - } - } - } - return oldValue; - }; - Object.defineProperty(this, "size", {get:function() { - var total = 0, i = buckets.length; - while (i--) { - total += buckets[i].entries.length; - } - return total; - }}); - this.each = function(callback) { - var entries = that._entries(), i = entries.length, entry; - while (i--) { - entry = entries[i]; - callback(entry[0], entry[1]); - } - }; - this.putAll_r12sna$ = hashMapPutAll; - this.clone = function() { - var clone = new Hashtable(hashingFunctionParam, equalityFunctionParam); - clone.putAll_r12sna$(that); - return clone; - }; - Object.defineProperty(this, "keys", {get:function() { - var res = new Kotlin.ComplexHashSet; - var keys = this._keys(); - var i = keys.length; - while (i--) { - res.add_za3rmp$(keys[i]); - } - return res; - }, configurable:true}); - Object.defineProperty(this, "entries", {get:function() { - var result = new Kotlin.ComplexHashSet; - var entries = this._entries(); - var i = entries.length; - while (i--) { - var entry = entries[i]; - result.add_za3rmp$(new Entry(entry[0], entry[1])); - } - return result; - }, configurable:true}); - this.hashCode = function() { - var h = 0; - var entries = this._entries(); - var i = entries.length; - while (i--) { - var entry = entries[i]; - h += mapEntryHashCode(entry[0], entry[1]); - } - return h; - }; - this.equals_za3rmp$ = function(o) { - if (o == null || this.size !== o.size) { - return false; - } - var entries = this._entries(); - var i = entries.length; - while (i--) { - var entry = entries[i]; - var key = entry[0]; - var value = entry[1]; - if (value == null) { - if (!(o.get_za3rmp$(key) == null && o.contains_za3rmp$(key))) { - return false; - } - } else { - if (!Kotlin.equals(value, o.get_za3rmp$(key))) { - return false; - } - } - } - return true; - }; - this.toString = function() { - var entries = this._entries(); - var length = entries.length; - if (length === 0) { - return "{}"; - } - var builder = "{"; - for (var i = 0;;) { - var entry = entries[i]; - var key = entry[0]; - var value = entry[1]; - builder += (key === this ? "(this Map)" : Kotlin.toString(key)) + "\x3d" + (value === this ? "(this Map)" : Kotlin.toString(value)); - if (++i >= length) { - return builder + "}"; - } - builder += ", "; - } - }; - }; - Kotlin.HashTable = Hashtable; - var lazyInitClasses = {}; - lazyInitClasses.HashMap = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableMap]; - }, function() { - Kotlin.HashTable.call(this); - }); - Object.defineProperty(Kotlin, "ComplexHashMap", {get:function() { - return Kotlin.HashMap; - }}); - lazyInitClasses.PrimitiveHashMapValuesIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(map, keys) { - this.map = map; - this.keys = keys; - this.size = keys.length; - this.index = 0; - }, {next:function() { - if (!this.hasNext()) { - throw new Kotlin.NoSuchElementException; - } - return this.map[this.keys[this.index++]]; - }, hasNext:function() { - return this.index < this.size; - }}); - lazyInitClasses.PrimitiveHashMapValues = Kotlin.createClass(function() { - return[Kotlin.AbstractCollection]; - }, function(map) { - this.map = map; - }, {iterator:function() { - return new Kotlin.PrimitiveHashMapValuesIterator(this.map.map, Object.keys(this.map.map)); - }, isEmpty:function() { - return this.map.isEmpty(); - }, size:{get:function() { - return this.map.size; - }}, contains_za3rmp$:function(o) { - return this.map.containsValue_za3rmp$(o); - }}); - lazyInitClasses.AbstractPrimitiveHashMap = Kotlin.createClass(function() { - return[Kotlin.HashMap]; - }, function() { - this.$size = 0; - this.map = Object.create(null); - }, {size:{get:function() { - return this.$size; - }}, isEmpty:function() { - return this.$size === 0; - }, containsKey_za3rmp$:function(key) { - return this.map[key] !== void 0; - }, containsValue_za3rmp$:function(value) { - var map = this.map; - for (var key in map) { - if (map[key] === value) { - return true; - } - } - return false; - }, get_za3rmp$:function(key) { - return this.map[key]; - }, put_wn2jw4$:function(key, value) { - var prevValue = this.map[key]; - this.map[key] = value === void 0 ? null : value; - if (prevValue === void 0) { - this.$size++; - } - return prevValue; - }, remove_za3rmp$:function(key) { - var prevValue = this.map[key]; - if (prevValue !== void 0) { - delete this.map[key]; - this.$size--; - } - return prevValue; - }, clear:function() { - this.$size = 0; - this.map = {}; - }, putAll_r12sna$:hashMapPutAll, entries:{get:function() { - var result = new Kotlin.ComplexHashSet; - var map = this.map; - for (var key in map) { - result.add_za3rmp$(new Entry(this.convertKeyToKeyType(key), map[key])); - } - return result; - }}, getKeySetClass:function() { - throw new Error("Kotlin.AbstractPrimitiveHashMap.getKetSetClass is abstract"); - }, convertKeyToKeyType:function(key) { - throw new Error("Kotlin.AbstractPrimitiveHashMap.convertKeyToKeyType is abstract"); - }, keys:{get:function() { - var result = new (this.getKeySetClass()); - var map = this.map; - for (var key in map) { - result.add_za3rmp$(key); - } - return result; - }}, values:{get:function() { - return new Kotlin.PrimitiveHashMapValues(this); - }}, toJSON:function() { - return this.map; - }, toString:function() { - if (this.isEmpty()) { - return "{}"; - } - var map = this.map; - var isFirst = true; - var builder = "{"; - for (var key in map) { - var value = map[key]; - builder += (isFirst ? "" : ", ") + Kotlin.toString(key) + "\x3d" + (value === this ? "(this Map)" : Kotlin.toString(value)); - isFirst = false; - } - return builder + "}"; - }, equals_za3rmp$:function(o) { - if (o == null || this.size !== o.size) { - return false; - } - var map = this.map; - for (var key in map) { - var key_ = this.convertKeyToKeyType(key); - var value = map[key]; - if (value == null) { - if (!(o.get_za3rmp$(key_) == null && o.contains_za3rmp$(key_))) { - return false; - } - } else { - if (!Kotlin.equals(value, o.get_za3rmp$(key_))) { - return false; - } - } - } - return true; - }, hashCode:function() { - var h = 0; - var map = this.map; - for (var key in map) { - h += mapEntryHashCode(this.convertKeyToKeyType(key), map[key]); - } - return h; - }}); - lazyInitClasses.DefaultPrimitiveHashMap = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashMap]; - }, function() { - Kotlin.AbstractPrimitiveHashMap.call(this); - }, {getKeySetClass:function() { - return Kotlin.DefaultPrimitiveHashSet; - }, convertKeyToKeyType:convertKeyToString}); - lazyInitClasses.PrimitiveNumberHashMap = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashMap]; - }, function() { - Kotlin.AbstractPrimitiveHashMap.call(this); - this.$keySetClass$ = Kotlin.PrimitiveNumberHashSet; - }, {getKeySetClass:function() { - return Kotlin.PrimitiveNumberHashSet; - }, convertKeyToKeyType:convertKeyToNumber}); - lazyInitClasses.PrimitiveBooleanHashMap = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashMap]; - }, function() { - Kotlin.AbstractPrimitiveHashMap.call(this); - }, {getKeySetClass:function() { - return Kotlin.PrimitiveBooleanHashSet; - }, convertKeyToKeyType:convertKeyToBoolean}); - function LinkedHashMap() { - Kotlin.ComplexHashMap.call(this); - this.orderedKeys = []; - this.super_put_wn2jw4$ = this.put_wn2jw4$; - this.put_wn2jw4$ = function(key, value) { - if (!this.containsKey_za3rmp$(key)) { - this.orderedKeys.push(key); - } - return this.super_put_wn2jw4$(key, value); - }; - this.super_remove_za3rmp$ = this.remove_za3rmp$; - this.remove_za3rmp$ = function(key) { - var i = this.orderedKeys.indexOf(key); - if (i != -1) { - this.orderedKeys.splice(i, 1); - } - return this.super_remove_za3rmp$(key); - }; - this.super_clear = this.clear; - this.clear = function() { - this.super_clear(); - this.orderedKeys = []; - }; - Object.defineProperty(this, "keys", {get:function() { - var set = new Kotlin.LinkedHashSet; - set.map = this; - return set; - }}); - Object.defineProperty(this, "entries", {get:function() { - var result = new Kotlin.ArrayList; - for (var i = 0, c = this.orderedKeys, l = c.length;i < l;i++) { - result.add_za3rmp$(this.get_za3rmp$(c[i])); - } - return result; - }}); - Object.defineProperty(this, "entries", {get:function() { - var set = new Kotlin.LinkedHashSet; - for (var i = 0, c = this.orderedKeys, l = c.length;i < l;i++) { - set.add_za3rmp$(new Entry(c[i], this.get_za3rmp$(c[i]))); - } - return set; - }}); - } - lazyInitClasses.LinkedHashMap = Kotlin.createClass(function() { - return[Kotlin.ComplexHashMap]; - }, function() { - LinkedHashMap.call(this); - }); - lazyInitClasses.LinkedHashSet = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableSet, Kotlin.HashSet]; - }, function() { - this.map = new Kotlin.LinkedHashMap; - }, {equals_za3rmp$:hashSetEquals, hashCode:hashSetHashCode, size:{get:function() { - return this.map.size; - }}, contains_za3rmp$:function(element) { - return this.map.containsKey_za3rmp$(element); - }, iterator:function() { - return new Kotlin.SetIterator(this); - }, add_za3rmp$:function(element) { - return this.map.put_wn2jw4$(element, true) == null; - }, remove_za3rmp$:function(element) { - return this.map.remove_za3rmp$(element) != null; - }, clear:function() { - this.map.clear(); - }, toArray:function() { - return this.map.orderedKeys.slice(); - }}); - lazyInitClasses.SetIterator = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableIterator]; - }, function(set) { - this.set = set; - this.keys = set.toArray(); - this.index = 0; - }, {next:function() { - if (!this.hasNext()) { - throw new Kotlin.NoSuchElementException; - } - return this.keys[this.index++]; - }, hasNext:function() { - return this.index < this.keys.length; - }, remove:function() { - if (this.index === 0) { - throw Kotlin.IllegalStateException(); - } - this.set.remove_za3rmp$(this.keys[this.index - 1]); - }}); - lazyInitClasses.AbstractPrimitiveHashSet = Kotlin.createClass(function() { - return[Kotlin.HashSet]; - }, function() { - this.$size = 0; - this.map = Object.create(null); - }, {equals_za3rmp$:hashSetEquals, hashCode:hashSetHashCode, size:{get:function() { - return this.$size; - }}, contains_za3rmp$:function(key) { - return this.map[key] === true; - }, iterator:function() { - return new Kotlin.SetIterator(this); - }, add_za3rmp$:function(element) { - var prevElement = this.map[element]; - this.map[element] = true; - if (prevElement === true) { - return false; - } else { - this.$size++; - return true; - } - }, remove_za3rmp$:function(element) { - if (this.map[element] === true) { - delete this.map[element]; - this.$size--; - return true; - } else { - return false; - } - }, clear:function() { - this.$size = 0; - this.map = {}; - }, convertKeyToKeyType:function(key) { - throw new Error("Kotlin.AbstractPrimitiveHashSet.convertKeyToKeyType is abstract"); - }, toArray:function() { - var result = Object.keys(this.map); - for (var i = 0;i < result.length;i++) { - result[i] = this.convertKeyToKeyType(result[i]); - } - return result; - }}); - lazyInitClasses.DefaultPrimitiveHashSet = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashSet]; - }, function() { - Kotlin.AbstractPrimitiveHashSet.call(this); - }, {toArray:function() { - return Object.keys(this.map); - }, convertKeyToKeyType:convertKeyToString}); - lazyInitClasses.PrimitiveNumberHashSet = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashSet]; - }, function() { - Kotlin.AbstractPrimitiveHashSet.call(this); - }, {convertKeyToKeyType:convertKeyToNumber}); - lazyInitClasses.PrimitiveBooleanHashSet = Kotlin.createClass(function() { - return[Kotlin.AbstractPrimitiveHashSet]; - }, function() { - Kotlin.AbstractPrimitiveHashSet.call(this); - }, {convertKeyToKeyType:convertKeyToBoolean}); - function HashSet(hashingFunction, equalityFunction) { - var hashTable = new Kotlin.HashTable(hashingFunction, equalityFunction); - this.addAll_wtfk93$ = Kotlin.AbstractCollection.prototype.addAll_wtfk93$; - this.removeAll_wtfk93$ = Kotlin.AbstractCollection.prototype.removeAll_wtfk93$; - this.retainAll_wtfk93$ = Kotlin.AbstractCollection.prototype.retainAll_wtfk93$; - this.containsAll_wtfk93$ = Kotlin.AbstractCollection.prototype.containsAll_wtfk93$; - this.add_za3rmp$ = function(o) { - return!hashTable.put_wn2jw4$(o, true); - }; - this.toArray = function() { - return hashTable._keys(); - }; - this.iterator = function() { - return new Kotlin.SetIterator(this); - }; - this.remove_za3rmp$ = function(o) { - return hashTable.remove_za3rmp$(o) != null; - }; - this.contains_za3rmp$ = function(o) { - return hashTable.containsKey_za3rmp$(o); - }; - this.clear = function() { - hashTable.clear(); - }; - Object.defineProperty(this, "size", {get:function() { - return hashTable.size; - }}); - this.isEmpty = function() { - return hashTable.isEmpty(); - }; - this.clone = function() { - var h = new HashSet(hashingFunction, equalityFunction); - h.addAll_wtfk93$(hashTable.keys()); - return h; - }; - this.equals_za3rmp$ = hashSetEquals; - this.toString = function() { - var builder = "["; - var iter = this.iterator(); - var first = true; - while (iter.hasNext()) { - if (first) { - first = false; - } else { - builder += ", "; - } - builder += iter.next(); - } - builder += "]"; - return builder; - }; - this.intersection = function(hashSet) { - var intersection = new HashSet(hashingFunction, equalityFunction); - var values = hashSet.values, i = values.length, val; - while (i--) { - val = values[i]; - if (hashTable.containsKey_za3rmp$(val)) { - intersection.add_za3rmp$(val); - } - } - return intersection; - }; - this.union = function(hashSet) { - var union = this.clone(); - var values = hashSet.values, i = values.length, val; - while (i--) { - val = values[i]; - if (!hashTable.containsKey_za3rmp$(val)) { - union.add_za3rmp$(val); - } - } - return union; - }; - this.isSubsetOf = function(hashSet) { - var values = hashTable.keys(), i = values.length; - while (i--) { - if (!hashSet.contains_za3rmp$(values[i])) { - return false; - } - } - return true; - }; - this.hashCode = hashSetHashCode; - } - lazyInitClasses.HashSet = Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.MutableSet, Kotlin.AbstractCollection]; - }, function() { - HashSet.call(this); - }); - Object.defineProperty(Kotlin, "ComplexHashSet", {get:function() { - return Kotlin.HashSet; - }}); - Kotlin.createDefinition(lazyInitClasses, Kotlin); -})(Kotlin); -(function(Kotlin) { - Kotlin.Long = function(low, high) { - this.low_ = low | 0; - this.high_ = high | 0; - }; - Kotlin.Long.IntCache_ = {}; - Kotlin.Long.fromInt = function(value) { - if (-128 <= value && value < 128) { - var cachedObj = Kotlin.Long.IntCache_[value]; - if (cachedObj) { - return cachedObj; - } - } - var obj = new Kotlin.Long(value | 0, value < 0 ? -1 : 0); - if (-128 <= value && value < 128) { - Kotlin.Long.IntCache_[value] = obj; - } - return obj; - }; - Kotlin.Long.fromNumber = function(value) { - if (isNaN(value) || !isFinite(value)) { - return Kotlin.Long.ZERO; - } else { - if (value <= -Kotlin.Long.TWO_PWR_63_DBL_) { - return Kotlin.Long.MIN_VALUE; - } else { - if (value + 1 >= Kotlin.Long.TWO_PWR_63_DBL_) { - return Kotlin.Long.MAX_VALUE; - } else { - if (value < 0) { - return Kotlin.Long.fromNumber(-value).negate(); - } else { - return new Kotlin.Long(value % Kotlin.Long.TWO_PWR_32_DBL_ | 0, value / Kotlin.Long.TWO_PWR_32_DBL_ | 0); - } - } - } - } - }; - Kotlin.Long.fromBits = function(lowBits, highBits) { - return new Kotlin.Long(lowBits, highBits); - }; - Kotlin.Long.fromString = function(str, opt_radix) { - if (str.length == 0) { - throw Error("number format error: empty string"); - } - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error("radix out of range: " + radix); - } - if (str.charAt(0) == "-") { - return Kotlin.Long.fromString(str.substring(1), radix).negate(); - } else { - if (str.indexOf("-") >= 0) { - throw Error('number format error: interior "-" character: ' + str); - } - } - var radixToPower = Kotlin.Long.fromNumber(Math.pow(radix, 8)); - var result = Kotlin.Long.ZERO; - for (var i = 0;i < str.length;i += 8) { - var size = Math.min(8, str.length - i); - var value = parseInt(str.substring(i, i + size), radix); - if (size < 8) { - var power = Kotlin.Long.fromNumber(Math.pow(radix, size)); - result = result.multiply(power).add(Kotlin.Long.fromNumber(value)); - } else { - result = result.multiply(radixToPower); - result = result.add(Kotlin.Long.fromNumber(value)); - } - } - return result; - }; - Kotlin.Long.TWO_PWR_16_DBL_ = 1 << 16; - Kotlin.Long.TWO_PWR_24_DBL_ = 1 << 24; - Kotlin.Long.TWO_PWR_32_DBL_ = Kotlin.Long.TWO_PWR_16_DBL_ * Kotlin.Long.TWO_PWR_16_DBL_; - Kotlin.Long.TWO_PWR_31_DBL_ = Kotlin.Long.TWO_PWR_32_DBL_ / 2; - Kotlin.Long.TWO_PWR_48_DBL_ = Kotlin.Long.TWO_PWR_32_DBL_ * Kotlin.Long.TWO_PWR_16_DBL_; - Kotlin.Long.TWO_PWR_64_DBL_ = Kotlin.Long.TWO_PWR_32_DBL_ * Kotlin.Long.TWO_PWR_32_DBL_; - Kotlin.Long.TWO_PWR_63_DBL_ = Kotlin.Long.TWO_PWR_64_DBL_ / 2; - Kotlin.Long.ZERO = Kotlin.Long.fromInt(0); - Kotlin.Long.ONE = Kotlin.Long.fromInt(1); - Kotlin.Long.NEG_ONE = Kotlin.Long.fromInt(-1); - Kotlin.Long.MAX_VALUE = Kotlin.Long.fromBits(4294967295 | 0, 2147483647 | 0); - Kotlin.Long.MIN_VALUE = Kotlin.Long.fromBits(0, 2147483648 | 0); - Kotlin.Long.TWO_PWR_24_ = Kotlin.Long.fromInt(1 << 24); - Kotlin.Long.prototype.toInt = function() { - return this.low_; - }; - Kotlin.Long.prototype.toNumber = function() { - return this.high_ * Kotlin.Long.TWO_PWR_32_DBL_ + this.getLowBitsUnsigned(); - }; - Kotlin.Long.prototype.toString = function(opt_radix) { - var radix = opt_radix || 10; - if (radix < 2 || 36 < radix) { - throw Error("radix out of range: " + radix); - } - if (this.isZero()) { - return "0"; - } - if (this.isNegative()) { - if (this.equals(Kotlin.Long.MIN_VALUE)) { - var radixLong = Kotlin.Long.fromNumber(radix); - var div = this.div(radixLong); - var rem = div.multiply(radixLong).subtract(this); - return div.toString(radix) + rem.toInt().toString(radix); - } else { - return "-" + this.negate().toString(radix); - } - } - var radixToPower = Kotlin.Long.fromNumber(Math.pow(radix, 6)); - var rem = this; - var result = ""; - while (true) { - var remDiv = rem.div(radixToPower); - var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt(); - var digits = intval.toString(radix); - rem = remDiv; - if (rem.isZero()) { - return digits + result; - } else { - while (digits.length < 6) { - digits = "0" + digits; - } - result = "" + digits + result; - } - } - }; - Kotlin.Long.prototype.getHighBits = function() { - return this.high_; - }; - Kotlin.Long.prototype.getLowBits = function() { - return this.low_; - }; - Kotlin.Long.prototype.getLowBitsUnsigned = function() { - return this.low_ >= 0 ? this.low_ : Kotlin.Long.TWO_PWR_32_DBL_ + this.low_; - }; - Kotlin.Long.prototype.getNumBitsAbs = function() { - if (this.isNegative()) { - if (this.equals(Kotlin.Long.MIN_VALUE)) { - return 64; - } else { - return this.negate().getNumBitsAbs(); - } - } else { - var val = this.high_ != 0 ? this.high_ : this.low_; - for (var bit = 31;bit > 0;bit--) { - if ((val & 1 << bit) != 0) { - break; - } - } - return this.high_ != 0 ? bit + 33 : bit + 1; - } - }; - Kotlin.Long.prototype.isZero = function() { - return this.high_ == 0 && this.low_ == 0; - }; - Kotlin.Long.prototype.isNegative = function() { - return this.high_ < 0; - }; - Kotlin.Long.prototype.isOdd = function() { - return(this.low_ & 1) == 1; - }; - Kotlin.Long.prototype.equals = function(other) { - return this.high_ == other.high_ && this.low_ == other.low_; - }; - Kotlin.Long.prototype.notEquals = function(other) { - return this.high_ != other.high_ || this.low_ != other.low_; - }; - Kotlin.Long.prototype.lessThan = function(other) { - return this.compare(other) < 0; - }; - Kotlin.Long.prototype.lessThanOrEqual = function(other) { - return this.compare(other) <= 0; - }; - Kotlin.Long.prototype.greaterThan = function(other) { - return this.compare(other) > 0; - }; - Kotlin.Long.prototype.greaterThanOrEqual = function(other) { - return this.compare(other) >= 0; - }; - Kotlin.Long.prototype.compare = function(other) { - if (this.equals(other)) { - return 0; - } - var thisNeg = this.isNegative(); - var otherNeg = other.isNegative(); - if (thisNeg && !otherNeg) { - return-1; - } - if (!thisNeg && otherNeg) { - return 1; - } - if (this.subtract(other).isNegative()) { - return-1; - } else { - return 1; - } - }; - Kotlin.Long.prototype.negate = function() { - if (this.equals(Kotlin.Long.MIN_VALUE)) { - return Kotlin.Long.MIN_VALUE; - } else { - return this.not().add(Kotlin.Long.ONE); - } - }; - Kotlin.Long.prototype.add = function(other) { - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 65535; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 65535; - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 65535; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 65535; - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 65535; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 65535; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 65535; - c48 += a48 + b48; - c48 &= 65535; - return Kotlin.Long.fromBits(c16 << 16 | c00, c48 << 16 | c32); - }; - Kotlin.Long.prototype.subtract = function(other) { - return this.add(other.negate()); - }; - Kotlin.Long.prototype.multiply = function(other) { - if (this.isZero()) { - return Kotlin.Long.ZERO; - } else { - if (other.isZero()) { - return Kotlin.Long.ZERO; - } - } - if (this.equals(Kotlin.Long.MIN_VALUE)) { - return other.isOdd() ? Kotlin.Long.MIN_VALUE : Kotlin.Long.ZERO; - } else { - if (other.equals(Kotlin.Long.MIN_VALUE)) { - return this.isOdd() ? Kotlin.Long.MIN_VALUE : Kotlin.Long.ZERO; - } - } - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().multiply(other.negate()); - } else { - return this.negate().multiply(other).negate(); - } - } else { - if (other.isNegative()) { - return this.multiply(other.negate()).negate(); - } - } - if (this.lessThan(Kotlin.Long.TWO_PWR_24_) && other.lessThan(Kotlin.Long.TWO_PWR_24_)) { - return Kotlin.Long.fromNumber(this.toNumber() * other.toNumber()); - } - var a48 = this.high_ >>> 16; - var a32 = this.high_ & 65535; - var a16 = this.low_ >>> 16; - var a00 = this.low_ & 65535; - var b48 = other.high_ >>> 16; - var b32 = other.high_ & 65535; - var b16 = other.low_ >>> 16; - var b00 = other.low_ & 65535; - var c48 = 0, c32 = 0, c16 = 0, c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 65535; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 65535; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 65535; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 65535; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 65535; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 65535; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 65535; - return Kotlin.Long.fromBits(c16 << 16 | c00, c48 << 16 | c32); - }; - Kotlin.Long.prototype.div = function(other) { - if (other.isZero()) { - throw Error("division by zero"); - } else { - if (this.isZero()) { - return Kotlin.Long.ZERO; - } - } - if (this.equals(Kotlin.Long.MIN_VALUE)) { - if (other.equals(Kotlin.Long.ONE) || other.equals(Kotlin.Long.NEG_ONE)) { - return Kotlin.Long.MIN_VALUE; - } else { - if (other.equals(Kotlin.Long.MIN_VALUE)) { - return Kotlin.Long.ONE; - } else { - var halfThis = this.shiftRight(1); - var approx = halfThis.div(other).shiftLeft(1); - if (approx.equals(Kotlin.Long.ZERO)) { - return other.isNegative() ? Kotlin.Long.ONE : Kotlin.Long.NEG_ONE; - } else { - var rem = this.subtract(other.multiply(approx)); - var result = approx.add(rem.div(other)); - return result; - } - } - } - } else { - if (other.equals(Kotlin.Long.MIN_VALUE)) { - return Kotlin.Long.ZERO; - } - } - if (this.isNegative()) { - if (other.isNegative()) { - return this.negate().div(other.negate()); - } else { - return this.negate().div(other).negate(); - } - } else { - if (other.isNegative()) { - return this.div(other.negate()).negate(); - } - } - var res = Kotlin.Long.ZERO; - var rem = this; - while (rem.greaterThanOrEqual(other)) { - var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber())); - var log2 = Math.ceil(Math.log(approx) / Math.LN2); - var delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48); - var approxRes = Kotlin.Long.fromNumber(approx); - var approxRem = approxRes.multiply(other); - while (approxRem.isNegative() || approxRem.greaterThan(rem)) { - approx -= delta; - approxRes = Kotlin.Long.fromNumber(approx); - approxRem = approxRes.multiply(other); - } - if (approxRes.isZero()) { - approxRes = Kotlin.Long.ONE; - } - res = res.add(approxRes); - rem = rem.subtract(approxRem); - } - return res; - }; - Kotlin.Long.prototype.modulo = function(other) { - return this.subtract(this.div(other).multiply(other)); - }; - Kotlin.Long.prototype.not = function() { - return Kotlin.Long.fromBits(~this.low_, ~this.high_); - }; - Kotlin.Long.prototype.and = function(other) { - return Kotlin.Long.fromBits(this.low_ & other.low_, this.high_ & other.high_); - }; - Kotlin.Long.prototype.or = function(other) { - return Kotlin.Long.fromBits(this.low_ | other.low_, this.high_ | other.high_); - }; - Kotlin.Long.prototype.xor = function(other) { - return Kotlin.Long.fromBits(this.low_ ^ other.low_, this.high_ ^ other.high_); - }; - Kotlin.Long.prototype.shiftLeft = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var low = this.low_; - if (numBits < 32) { - var high = this.high_; - return Kotlin.Long.fromBits(low << numBits, high << numBits | low >>> 32 - numBits); - } else { - return Kotlin.Long.fromBits(0, low << numBits - 32); - } - } - }; - Kotlin.Long.prototype.shiftRight = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return Kotlin.Long.fromBits(low >>> numBits | high << 32 - numBits, high >> numBits); - } else { - return Kotlin.Long.fromBits(high >> numBits - 32, high >= 0 ? 0 : -1); - } - } - }; - Kotlin.Long.prototype.shiftRightUnsigned = function(numBits) { - numBits &= 63; - if (numBits == 0) { - return this; - } else { - var high = this.high_; - if (numBits < 32) { - var low = this.low_; - return Kotlin.Long.fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits); - } else { - if (numBits == 32) { - return Kotlin.Long.fromBits(high, 0); - } else { - return Kotlin.Long.fromBits(high >>> numBits - 32, 0); - } - } - } - }; - Kotlin.Long.prototype.equals_za3rmp$ = function(other) { - return other instanceof Kotlin.Long && this.equals(other); - }; - Kotlin.Long.prototype.compareTo_za3rmp$ = Kotlin.Long.prototype.compare; - Kotlin.Long.prototype.inc = function() { - return this.add(Kotlin.Long.ONE); - }; - Kotlin.Long.prototype.dec = function() { - return this.add(Kotlin.Long.NEG_ONE); - }; - Kotlin.Long.prototype.valueOf = function() { - return this.toNumber(); - }; - Kotlin.Long.prototype.unaryPlus = function() { - return this; - }; - Kotlin.Long.prototype.unaryMinus = Kotlin.Long.prototype.negate; - Kotlin.Long.prototype.inv = Kotlin.Long.prototype.not; - Kotlin.Long.prototype.rangeTo = function(other) { - return new Kotlin.LongRange(this, other); - }; -})(Kotlin); -(function(Kotlin) { - var _ = Kotlin.defineRootPackage(null, {kotlin:Kotlin.definePackage(null, {collections:Kotlin.definePackage(null, {Iterable:Kotlin.createTrait(null), MutableIterable:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterable]; - }), Collection:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterable]; - }), MutableCollection:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableIterable, _.kotlin.collections.Collection]; - }), List:Kotlin.createTrait(function() { - return[_.kotlin.collections.Collection]; - }), MutableList:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableCollection, _.kotlin.collections.List]; - }), Set:Kotlin.createTrait(function() { - return[_.kotlin.collections.Collection]; - }), MutableSet:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableCollection, _.kotlin.collections.Set]; - }), Map:Kotlin.createTrait(null, null, {Entry:Kotlin.createTrait(null)}), MutableMap:Kotlin.createTrait(function() { - return[_.kotlin.collections.Map]; - }, null, {MutableEntry:Kotlin.createTrait(function() { - return[_.kotlin.collections.Map.Entry]; - })}), Iterator:Kotlin.createTrait(null), MutableIterator:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterator]; - }), ListIterator:Kotlin.createTrait(function() { - return[_.kotlin.collections.Iterator]; - }), MutableListIterator:Kotlin.createTrait(function() { - return[_.kotlin.collections.MutableIterator, _.kotlin.collections.ListIterator]; - }), ByteIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextByte(); - }}), CharIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextChar(); - }}), ShortIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextShort(); - }}), IntIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextInt(); - }}), LongIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextLong(); - }}), FloatIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextFloat(); - }}), DoubleIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextDouble(); - }}), BooleanIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.Iterator]; - }, null, {next:function() { - return this.nextBoolean(); - }})}), Function:Kotlin.createTrait(null), ranges:Kotlin.definePackage(null, {ClosedRange:Kotlin.createTrait(null, {contains_htax2k$:function(value) { - return Kotlin.compareTo(value, this.start) >= 0 && Kotlin.compareTo(value, this.endInclusive) <= 0; - }, isEmpty:function() { - return Kotlin.compareTo(this.start, this.endInclusive) > 0; - }})}), annotation:Kotlin.definePackage(null, {AnnotationTarget:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, ANNOTATION_CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FIELD:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, LOCAL_VARIABLE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, VALUE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, CONSTRUCTOR:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FUNCTION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_GETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_SETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, EXPRESSION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FILE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }}; - }), AnnotationRetention:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{SOURCE:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, BINARY:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, RUNTIME:function() { - return new _.kotlin.annotation.AnnotationRetention; - }}; - }), Target:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(allowedTargets) { - this.allowedTargets = allowedTargets; - }), Retention:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(value) { - if (value === void 0) { - value = _.kotlin.annotation.AnnotationRetention.RUNTIME; - } - this.value = value; - }), Repeatable:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), MustBeDocumented:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)})})}); - Kotlin.defineModule("builtins", _); -})(Kotlin); -(function(Kotlin) { - var _ = Kotlin.defineRootPackage(null, {kotlin:Kotlin.definePackage(null, {js:Kotlin.definePackage(null, {jsTypeOf_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.js.jsTypeOf_za3rmp$", function(a) { - return typeof a; - }), asDynamic_s8jyvl$:Kotlin.defineInlineFunction("stdlib.kotlin.js.asDynamic_s8jyvl$", function($receiver) { - return $receiver; - }), iterator_s8jyvl$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var r = $receiver; - if ($receiver["iterator"] != null) { - tmp$2 = $receiver["iterator"](); - } else { - if (Array.isArray(r)) { - tmp$2 = Kotlin.arrayIterator(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - } else { - tmp$2 = (Kotlin.isType(tmp$1 = r, Kotlin.modules["builtins"].kotlin.collections.Iterable) ? tmp$1 : Kotlin.throwCCE()).iterator(); - } - } - return tmp$2; - }, json_eoa9s7$:function(pairs) { - var tmp$1, tmp$2, tmp$3; - var res = {}; - tmp$1 = pairs, tmp$2 = tmp$1.length; - for (var tmp$3 = 0;tmp$3 !== tmp$2;++tmp$3) { - var tmp$0 = tmp$1[tmp$3], name = tmp$0.component1(), value = tmp$0.component2(); - res[name] = value; - } - return res; - }, internal:Kotlin.definePackage(null, {DoubleCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = Number.MIN_VALUE; - this.MAX_VALUE = Number.MAX_VALUE; - this.POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - this.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY; - this.NaN = Number.NaN; - }), FloatCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = Number.MIN_VALUE; - this.MAX_VALUE = Number.MAX_VALUE; - this.POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - this.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY; - this.NaN = Number.NaN; - }), IntCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = -2147483647 - 1; - this.MAX_VALUE = 2147483647; - }), LongCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = Kotlin.Long.MIN_VALUE; - this.MAX_VALUE = Kotlin.Long.MAX_VALUE; - }), ShortCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = -32768; - this.MAX_VALUE = 32767; - }), ByteCompanionObject:Kotlin.createObject(null, function() { - this.MIN_VALUE = -128; - this.MAX_VALUE = 127; - }), CharCompanionObject:Kotlin.createObject(null, function() { - this.MIN_HIGH_SURROGATE = "\ud800"; - this.MAX_HIGH_SURROGATE = "\udbff"; - this.MIN_LOW_SURROGATE = "\udc00"; - this.MAX_LOW_SURROGATE = "\udfff"; - this.MIN_SURROGATE = this.MIN_HIGH_SURROGATE; - this.MAX_SURROGATE = this.MAX_LOW_SURROGATE; - }), StringCompanionObject:Kotlin.createObject(null, null), EnumCompanionObject:Kotlin.createObject(null, null)})}), jvm:Kotlin.definePackage(null, {JvmOverloads:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), JvmName:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(name) { - this.name = name; - }), JvmMultifileClass:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)}), text:Kotlin.definePackage(null, {isWhitespace_myv2d1$:function($receiver) { - var result = $receiver.toString().match("[\\s\\xA0]"); - return result != null && result.length > 0; - }, isHighSurrogate_myv2d1$:function($receiver) { - return(new Kotlin.CharRange(Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MIN_HIGH_SURROGATE, Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MAX_HIGH_SURROGATE)).contains_htax2k$($receiver); - }, isLowSurrogate_myv2d1$:function($receiver) { - return(new Kotlin.CharRange(Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MIN_LOW_SURROGATE, Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MAX_LOW_SURROGATE)).contains_htax2k$($receiver); - }, RegexOption:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun(value) { - $fun.baseInitializer.call(this); - this.value = value; - }, function() { - return{IGNORE_CASE:function() { - return new _.kotlin.text.RegexOption("i"); - }, MULTILINE:function() { - return new _.kotlin.text.RegexOption("m"); - }}; - }), MatchGroup:Kotlin.createClass(null, function(value) { - this.value = value; - }, {component1:function() { - return this.value; - }, copy_61zpoe$:function(value) { - return new _.kotlin.text.MatchGroup(value === void 0 ? this.value : value); - }, toString:function() { - return "MatchGroup(value\x3d" + Kotlin.toString(this.value) + ")"; - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.value) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.value, other.value))); - }}), Regex:Kotlin.createClass(null, function(pattern, options) { - this.pattern = pattern; - this.options = _.kotlin.collections.toSet_q5oq31$(options); - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault(options, 10)); - var tmp$0; - tmp$0 = options.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item.value); - } - this.nativePattern_ug9tz2$ = new RegExp(pattern, _.kotlin.collections.joinToString_ld60a2$(destination, "") + "g"); - }, {matches_6bul2c$:function(input) { - _.kotlin.text.js.reset_bckwes$(this.nativePattern_ug9tz2$); - var match = this.nativePattern_ug9tz2$.exec(input.toString()); - return match != null && (match.index === 0 && this.nativePattern_ug9tz2$.lastIndex === input.length); - }, containsMatchIn_6bul2c$:function(input) { - _.kotlin.text.js.reset_bckwes$(this.nativePattern_ug9tz2$); - return this.nativePattern_ug9tz2$.test(input.toString()); - }, hasMatch_6bul2c$:function(input) { - return this.containsMatchIn_6bul2c$(input); - }, find_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return _.kotlin.text.findNext(this.nativePattern_ug9tz2$, input.toString(), startIndex); - }, match_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return this.find_905azu$(input, startIndex); - }, findAll_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return _.kotlin.sequences.generateSequence_x7nywq$(_.kotlin.text.Regex.findAll_905azu$f(input, startIndex, this), _.kotlin.text.Regex.findAll_905azu$f_0); - }, matchAll_905azu$:function(input, startIndex) { - if (startIndex === void 0) { - startIndex = 0; - } - return this.findAll_905azu$(input, startIndex); - }, matchEntire_6bul2c$:function(input) { - if (_.kotlin.text.startsWith_cjsvxq$(this.pattern, "^") && _.kotlin.text.endsWith_cjsvxq$(this.pattern, "$")) { - return this.find_905azu$(input); - } else { - return(new _.kotlin.text.Regex("^" + _.kotlin.text.trimEnd_1hgcu2$(_.kotlin.text.trimStart_1hgcu2$(this.pattern, ["^"]), ["$"]) + "$", this.options)).find_905azu$(input); - } - }, replace_x2uqeu$:function(input, replacement) { - return input.toString().replace(this.nativePattern_ug9tz2$, replacement); - }, replace_ftxfdg$:Kotlin.defineInlineFunction("stdlib.kotlin.text.Regex.replace_ftxfdg$", function(input, transform) { - var match = this.find_905azu$(input); - if (match == null) { - return input.toString(); - } - var lastStart = 0; - var length = input.length; - var sb = new Kotlin.StringBuilder; - do { - var foundMatch = match != null ? match : Kotlin.throwNPE(); - sb.append(input, lastStart, foundMatch.range.start); - sb.append(transform(foundMatch)); - lastStart = foundMatch.range.endInclusive + 1; - match = foundMatch.next(); - } while (lastStart < length && match != null); - if (lastStart < length) { - sb.append(input, lastStart, length); - } - return sb.toString(); - }), replaceFirst_x2uqeu$:function(input, replacement) { - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault(this.options, 10)); - var tmp$0; - tmp$0 = this.options.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item.value); - } - var nonGlobalOptions = _.kotlin.collections.joinToString_ld60a2$(destination, ""); - return input.toString().replace(new RegExp(this.pattern, nonGlobalOptions), replacement); - }, split_905azu$:function(input, limit) { - var matches; - var tmp$0; - if (limit === void 0) { - limit = 0; - } - if (!(limit >= 0)) { - var message = "Limit must be non-negative, but was " + limit; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var $receiver = this.findAll_905azu$(input); - matches = limit === 0 ? $receiver : _.kotlin.sequences.take_8xunab$($receiver, limit - 1); - var result = new Kotlin.ArrayList; - var lastStart = 0; - tmp$0 = matches.iterator(); - while (tmp$0.hasNext()) { - var match = tmp$0.next(); - result.add_za3rmp$(input.substring(lastStart, match.range.start).toString()); - lastStart = match.range.endInclusive + 1; - } - result.add_za3rmp$(input.substring(lastStart, input.length).toString()); - return result; - }, toString:function() { - return this.nativePattern_ug9tz2$.toString(); - }}, {findAll_905azu$f:function(closure$input, closure$startIndex, this$Regex) { - return function() { - return this$Regex.find_905azu$(closure$input, closure$startIndex); - }; - }, findAll_905azu$f_0:function(match) { - return match.next(); - }, Companion:Kotlin.createObject(null, function() { - _.kotlin.text.Regex.Companion.patternEscape_v9iwb0$ = new RegExp("[-\\\\^$*+?.()|[\\]{}]", "g"); - _.kotlin.text.Regex.Companion.replacementEscape_tq1d2u$ = new RegExp("\\$", "g"); - }, {fromLiteral_61zpoe$:function(literal) { - return _.kotlin.text.Regex_61zpoe$(_.kotlin.text.Regex.Companion.escape_61zpoe$(literal)); - }, escape_61zpoe$:function(literal) { - return literal.replace(_.kotlin.text.Regex.Companion.patternEscape_v9iwb0$, "\\$\x26"); - }, escapeReplacement_61zpoe$:function(literal) { - return literal.replace(_.kotlin.text.Regex.Companion.replacementEscape_tq1d2u$, "$$$$"); - }})}), Regex_sb3q2$:function(pattern, option) { - return new _.kotlin.text.Regex(pattern, _.kotlin.collections.setOf_za3rmp$(option)); - }, Regex_61zpoe$:function(pattern) { - return new _.kotlin.text.Regex(pattern, _.kotlin.collections.emptySet()); - }, findNext$f:Kotlin.createClass(function() { - return[_.kotlin.text.MatchResult]; - }, function(closure$match, this$findNext_0, closure$input_0, closure$range) { - this.closure$match_0 = closure$match; - this.this$findNext_0 = this$findNext_0; - this.closure$input_0 = closure$input_0; - this.closure$range_0 = closure$range; - this.$range_e5n1wm$ = closure$range; - this.$groups_7q1wp7$ = new _.kotlin.text.findNext$f.groups$f(closure$match); - this.groupValues__5s7w6t$ = null; - }, {range:{get:function() { - return this.$range_e5n1wm$; - }}, value:{get:function() { - var tmp$0; - return(tmp$0 = this.closure$match_0[0]) != null ? tmp$0 : Kotlin.throwNPE(); - }}, groups:{get:function() { - return this.$groups_7q1wp7$; - }}, groupValues:{get:function() { - var tmp$0; - if (this.groupValues__5s7w6t$ == null) { - this.groupValues__5s7w6t$ = new _.kotlin.text.findNext$f.f$f(this.closure$match_0); - } - return(tmp$0 = this.groupValues__5s7w6t$) != null ? tmp$0 : Kotlin.throwNPE(); - }}, next:function() { - return _.kotlin.text.findNext(this.this$findNext_0, this.closure$input_0, this.closure$range_0.isEmpty() ? this.closure$range_0.start + 1 : this.closure$range_0.endInclusive + 1); - }}, {f$f:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(closure$match_0) { - this.closure$match_0 = closure$match_0; - $fun.baseInitializer.call(this); - }, {size:{get:function() { - return this.closure$match_0.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - return(tmp$0 = this.closure$match_0[index]) != null ? tmp$0 : ""; - }}, {}), groups$f:Kotlin.createClass(function() { - return[_.kotlin.text.MatchGroupCollection]; - }, function(closure$match_0) { - this.closure$match_0 = closure$match_0; - }, {size:{get:function() { - return this.closure$match_0.length; - }}, isEmpty:function() { - return this.size === 0; - }, contains_za3rmp$:function(element) { - var tmp$0; - tmp$0 = this.iterator(); - while (tmp$0.hasNext()) { - var element_0 = tmp$0.next(); - if (Kotlin.equals(element_0, element)) { - return true; - } - } - return false; - }, containsAll_wtfk93$:function(elements) { - var tmp$0; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!this.contains_za3rmp$(element)) { - return false; - } - } - return true; - }, iterator:function() { - return _.kotlin.sequences.map_mzhnvn$(_.kotlin.collections.asSequence_q5oq31$(_.kotlin.collections.get_indices_mwto7b$(this)), _.kotlin.text.findNext$f.groups$f.iterator$f(this)).iterator(); - }, get_za3lpa$:function(index) { - var tmp$0; - return(tmp$0 = this.closure$match_0[index]) != null ? new _.kotlin.text.MatchGroup(tmp$0) : null; - }}, {iterator$f:function(this$) { - return function(it) { - return this$.get_za3lpa$(it); - }; - }})}), findNext:function($receiver, input, from) { - $receiver.lastIndex = from; - var match = $receiver.exec(input); - if (match == null) { - return null; - } - var range = new Kotlin.NumberRange(match.index, $receiver.lastIndex - 1); - return new _.kotlin.text.findNext$f(match, $receiver, input, range); - }, nativeIndexOf:function($receiver, ch, fromIndex) { - return $receiver.indexOf(ch.toString(), fromIndex); - }, nativeLastIndexOf:function($receiver, ch, fromIndex) { - return $receiver.lastIndexOf(ch.toString(), fromIndex); - }, startsWith_41xvrb$:function($receiver, prefix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase) { - return $receiver.startsWith(prefix, 0); - } else { - return _.kotlin.text.regionMatches_qb0ndp$($receiver, 0, prefix, 0, prefix.length, ignoreCase); - } - }, startsWith_rh6gah$:function($receiver, prefix, startIndex, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase) { - return $receiver.startsWith(prefix, startIndex); - } else { - return _.kotlin.text.regionMatches_qb0ndp$($receiver, startIndex, prefix, 0, prefix.length, ignoreCase); - } - }, endsWith_41xvrb$:function($receiver, suffix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase) { - return $receiver.endsWith(suffix); - } else { - return _.kotlin.text.regionMatches_qb0ndp$($receiver, $receiver.length - suffix.length, suffix, 0, suffix.length, ignoreCase); - } - }, matches_94jgcu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.matches_94jgcu$", function($receiver, regex) { - var result = $receiver.match(regex); - return result != null && result.length > 0; - }), isBlank_gw00vq$:function($receiver) { - var tmp$0 = $receiver.length === 0; - if (!tmp$0) { - var result = (typeof $receiver === "string" ? $receiver : $receiver.toString()).match("^[\\s\\xA0]+$"); - tmp$0 = result != null && result.length > 0; - } - return tmp$0; - }, equals_41xvrb$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver == null ? other == null : !ignoreCase ? Kotlin.equals($receiver, other) : other != null && Kotlin.equals($receiver.toLowerCase(), other.toLowerCase()); - }, regionMatches_qb0ndp$:function($receiver, thisOffset, other, otherOffset, length, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.regionMatchesImpl($receiver, thisOffset, other, otherOffset, length, ignoreCase); - }, capitalize_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.capitalize_pdl1w0$", function($receiver) { - return $receiver.length > 0 ? $receiver.substring(0, 1).toUpperCase() + $receiver.substring(1) : $receiver; - }), decapitalize_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.decapitalize_pdl1w0$", function($receiver) { - return $receiver.length > 0 ? $receiver.substring(0, 1).toLowerCase() + $receiver.substring(1) : $receiver; - }), repeat_kljjvw$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Count 'n' must be non-negative, but was " + n + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - tmp$0 = ""; - } else { - if (n === 1) { - tmp$0 = $receiver.toString(); - } else { - var result = ""; - if (!($receiver.length === 0)) { - var s = $receiver.toString(); - var count = n; - while (true) { - if ((count & 1) === 1) { - result += s; - } - count = count >>> 1; - if (count === 0) { - break; - } - s += s; - } - } - return result; - } - } - return tmp$0; - }, replace_dn5w6f$:function($receiver, oldValue, newValue, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldValue), ignoreCase ? "gi" : "g"), _.kotlin.text.Regex.Companion.escapeReplacement_61zpoe$(newValue)); - }, replace_bt3k83$:function($receiver, oldChar, newChar, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldChar.toString()), ignoreCase ? "gi" : "g"), newChar.toString()); - }, replaceFirstLiteral_dn5w6f$:function($receiver, oldValue, newValue, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldValue), ignoreCase ? "i" : ""), _.kotlin.text.Regex.Companion.escapeReplacement_61zpoe$(newValue)); - }, replaceFirst_dn5w6f$:function($receiver, oldValue, newValue, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldValue), ignoreCase ? "i" : ""), _.kotlin.text.Regex.Companion.escapeReplacement_61zpoe$(newValue)); - }, replaceFirst_bt3k83$:function($receiver, oldChar, newChar, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.replace(new RegExp(_.kotlin.text.Regex.Companion.escape_61zpoe$(oldChar.toString()), ignoreCase ? "i" : ""), newChar.toString()); - }, elementAt_kljjvw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.elementAt_kljjvw$", function($receiver, index) { - return $receiver.charAt(index); - }), elementAtOrElse_a9lqqp$:Kotlin.defineInlineFunction("stdlib.kotlin.text.elementAtOrElse_a9lqqp$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.text.get_lastIndex_gw00vq$($receiver) ? $receiver.charAt(index) : defaultValue(index); - }), elementAtOrNull_kljjvw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.elementAtOrNull_kljjvw$", function($receiver, index) { - return _.kotlin.text.getOrNull_kljjvw$($receiver, index); - }), find_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.find_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.findLast_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.charAt(index); - if (predicate(element)) { - return element; - } - } - return null; - }), first_gw00vq$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Char sequence is empty."); - } - return $receiver.charAt(0); - }, first_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.first_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Char sequence contains no character matching the predicate."); - }), firstOrNull_gw00vq$:function($receiver) { - return $receiver.length === 0 ? null : $receiver.charAt(0); - }, firstOrNull_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.firstOrNull_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), getOrElse_a9lqqp$:Kotlin.defineInlineFunction("stdlib.kotlin.text.getOrElse_a9lqqp$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.text.get_lastIndex_gw00vq$($receiver) ? $receiver.charAt(index) : defaultValue(index); - }), getOrNull_kljjvw$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.text.get_lastIndex_gw00vq$($receiver) ? $receiver.charAt(index) : null; - }, indexOfFirst_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.indexOfFirst_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver.charAt(index))) { - return index; - } - } - return-1; - }), indexOfLast_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.indexOfLast_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver.charAt(index))) { - return index; - } - } - return-1; - }), last_gw00vq$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Char sequence is empty."); - } - return $receiver.charAt(_.kotlin.text.get_lastIndex_gw00vq$($receiver)); - }, last_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.last_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.charAt(index); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Char sequence contains no character matching the predicate."); - }), lastOrNull_gw00vq$:function($receiver) { - return $receiver.length === 0 ? null : $receiver.charAt($receiver.length - 1); - }, lastOrNull_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.lastOrNull_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.charAt(index); - if (predicate(element)) { - return element; - } - } - return null; - }), single_gw00vq$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Char sequence is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver.charAt(0); - } else { - throw new Kotlin.IllegalArgumentException("Char sequence has more than one element."); - } - } - return tmp$1; - }, single_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.single_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Char sequence contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Char sequence contains no character matching the predicate."); - } - return Kotlin.isChar(tmp$1 = single) ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_gw00vq$:function($receiver) { - return $receiver.length === 1 ? $receiver.charAt(0) : null; - }, singleOrNull_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.singleOrNull_gwcya$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(_.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length), $receiver.length); - }, drop_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(_.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length)); - }, dropLast_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.text.take_kljjvw$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.text.take_n7iutu$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLastWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropLastWhile_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index + 1); - } - } - return ""; - }), dropLastWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropLastWhile_ggikb8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index + 1); - } - } - return ""; - }), dropWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropWhile_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }), dropWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.dropWhile_ggikb8$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index); - } - } - return ""; - }), filter_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filter_gwcya$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - var element = $receiver.charAt(index); - if (predicate(element)) { - destination.append(element); - } - } - return destination; - }), filter_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filter_ggikb8$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - var element = $receiver.charAt(index); - if (predicate(element)) { - destination.append(element); - } - } - return destination.toString(); - }), filterIndexed_ig59fr$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterIndexed_ig59fr$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.append(item); - } - } - return destination; - }), filterIndexed_kq57hd$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterIndexed_kq57hd$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.append(item); - } - } - return destination.toString(); - }), filterIndexedTo_ulxqbb$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterIndexedTo_ulxqbb$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.append(item); - } - } - return destination; - }), filterNot_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterNot_gwcya$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.append(element); - } - } - return destination; - }), filterNot_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterNot_ggikb8$", function($receiver, predicate) { - var destination = new Kotlin.StringBuilder; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.append(element); - } - } - return destination.toString(); - }), filterNotTo_ppzoqm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterNotTo_ppzoqm$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.append(element); - } - } - return destination; - }), filterTo_ppzoqm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.filterTo_ppzoqm$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - var element = $receiver.charAt(index); - if (predicate(element)) { - destination.append(element); - } - } - return destination; - }), slice_2g2kgt$:function($receiver, indices) { - if (indices.isEmpty()) { - return ""; - } - return _.kotlin.text.subSequence_2g2kgt$($receiver, indices); - }, slice_590b93$:function($receiver, indices) { - if (indices.isEmpty()) { - return ""; - } - return _.kotlin.text.substring_590b93$($receiver, indices); - }, slice_8iyt66$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return ""; - } - var result = new Kotlin.StringBuilder; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var i = tmp$0.next(); - result.append($receiver.charAt(i)); - } - return result; - }, slice_fxv5mg$:Kotlin.defineInlineFunction("stdlib.kotlin.text.slice_fxv5mg$", function($receiver, indices) { - var tmp$0; - return _.kotlin.text.slice_8iyt66$($receiver, indices).toString(); - }), take_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(0, _.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length)); - }, take_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return $receiver.substring(0, _.kotlin.ranges.coerceAtMost_rksjo2$(n, $receiver.length)); - }, takeLast_kljjvw$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var length = $receiver.length; - return $receiver.substring(length - _.kotlin.ranges.coerceAtMost_rksjo2$(n, length), length); - }, takeLast_n7iutu$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested character count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var length = $receiver.length; - return $receiver.substring(length - _.kotlin.ranges.coerceAtMost_rksjo2$(n, length)); - }, takeLastWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeLastWhile_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.text.get_lastIndex_gw00vq$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index + 1, $receiver.length); - } - } - return $receiver.substring(0, $receiver.length); - }), takeLastWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeLastWhile_ggikb8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.text.get_lastIndex_gw00vq$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index + 1); - } - } - return $receiver; - }), takeWhile_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeWhile_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index); - } - } - return $receiver.substring(0, $receiver.length); - }), takeWhile_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.takeWhile_ggikb8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.length - 1; - for (var index = 0;index <= tmp$0;index++) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index); - } - } - return $receiver; - }), reversed_gw00vq$:function($receiver) { - return(new Kotlin.StringBuilder($receiver.toString())).reverse(); - }, reversed_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reversed_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.reversed_gw00vq$($receiver).toString(); - }), associate_1p4vo8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associate_1p4vo8$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateBy_g3n5bm$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_27fiyi$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateBy_27fiyi$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_cggu5g$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateByTo_cggu5g$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_bo8xay$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateByTo_bo8xay$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_vkk1fc$:Kotlin.defineInlineFunction("stdlib.kotlin.text.associateTo_vkk1fc$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_7095o1$:function($receiver, destination) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_gw00vq$:function($receiver) { - return _.kotlin.text.toCollection_7095o1$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toList_gw00vq$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver.charAt(0)); - } else { - tmp$1 = _.kotlin.text.toMutableList_gw00vq$($receiver); - } - } - return tmp$1; - }, toMutableList_gw00vq$:function($receiver) { - return _.kotlin.text.toCollection_7095o1$($receiver, new Kotlin.ArrayList($receiver.length)); - }, toSet_gw00vq$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver.charAt(0)); - } else { - tmp$1 = _.kotlin.text.toCollection_7095o1$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, flatMap_1mpcl3$:Kotlin.defineInlineFunction("stdlib.kotlin.text.flatMap_1mpcl3$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_qq0qxe$:Kotlin.defineInlineFunction("stdlib.kotlin.text.flatMapTo_qq0qxe$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), groupBy_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupBy_g3n5bm$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_27fiyi$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupBy_27fiyi$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_j5rwb5$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupByTo_j5rwb5$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_eemzmj$:Kotlin.defineInlineFunction("stdlib.kotlin.text.groupByTo_eemzmj$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.map_g3n5bm$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapIndexed_psxq2r$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexed_psxq2r$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedNotNull_psxq2r$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexedNotNull_psxq2r$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedNotNullTo_rct1as$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexedNotNullTo_rct1as$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedTo_rct1as$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapIndexedTo_rct1as$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_g3n5bm$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapNotNull_g3n5bm$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapNotNullTo_4sukax$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapNotNullTo_4sukax$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_4sukax$:Kotlin.defineInlineFunction("stdlib.kotlin.text.mapTo_4sukax$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_gw00vq$f:function(this$withIndex) { - return function() { - return _.kotlin.text.iterator_gw00vq$(this$withIndex); - }; - }, withIndex_gw00vq$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.text.withIndex_gw00vq$f($receiver)); - }, all_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.all_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_gw00vq$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.any_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.count_gw00vq$", function($receiver) { - return $receiver.length; - }), count_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.count_gwcya$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_u4nbyf$:Kotlin.defineInlineFunction("stdlib.kotlin.text.fold_u4nbyf$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_hj7gsc$:Kotlin.defineInlineFunction("stdlib.kotlin.text.foldIndexed_hj7gsc$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldRight_dr5uf3$:Kotlin.defineInlineFunction("stdlib.kotlin.text.foldRight_dr5uf3$", function($receiver, initial, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver.charAt(index--), accumulator); - } - return accumulator; - }), foldRightIndexed_qclpl6$:Kotlin.defineInlineFunction("stdlib.kotlin.text.foldRightIndexed_qclpl6$", function($receiver, initial, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver.charAt(index), accumulator); - --index; - } - return accumulator; - }), forEach_1m5ltu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.forEach_1m5ltu$", function($receiver, action) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_ivsfzd$:Kotlin.defineInlineFunction("stdlib.kotlin.text.forEachIndexed_ivsfzd$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_gw00vq$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (max < e) { - max = e; - } - } - return max; - }, maxBy_eowu5k$:Kotlin.defineInlineFunction("stdlib.kotlin.text.maxBy_eowu5k$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver.charAt(0); - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_ho1wg9$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_gw00vq$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (min > e) { - min = e; - } - } - return min; - }, minBy_eowu5k$:Kotlin.defineInlineFunction("stdlib.kotlin.text.minBy_eowu5k$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver.charAt(0); - var minValue = selector(minElem); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_ho1wg9$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver.charAt(i); - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_gw00vq$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.none_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_jbdc00$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduce_jbdc00$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver.charAt(index)); - } - return accumulator; - }), reduceIndexed_dv672j$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduceIndexed_dv672j$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(0); - tmp$0 = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver.charAt(index)); - } - return accumulator; - }), reduceRight_jbdc00$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduceRight_jbdc00$", function($receiver, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(index--); - while (index >= 0) { - accumulator = operation($receiver.charAt(index--), accumulator); - } - return accumulator; - }), reduceRightIndexed_dv672j$:Kotlin.defineInlineFunction("stdlib.kotlin.text.reduceRightIndexed_dv672j$", function($receiver, operation) { - var index = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty char sequence can't be reduced."); - } - var accumulator = $receiver.charAt(index--); - while (index >= 0) { - accumulator = operation(index, $receiver.charAt(index), accumulator); - --index; - } - return accumulator; - }), sumBy_g3i1jp$:Kotlin.defineInlineFunction("stdlib.kotlin.text.sumBy_g3i1jp$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_pj8hgv$:Kotlin.defineInlineFunction("stdlib.kotlin.text.sumByDouble_pj8hgv$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), partition_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.partition_gwcya$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.StringBuilder; - var second = new Kotlin.StringBuilder; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.append(element); - } else { - second.append(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.partition_ggikb8$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.StringBuilder; - var second = new Kotlin.StringBuilder; - tmp$0 = _.kotlin.text.iterator_gw00vq$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.append(element); - } else { - second.append(element); - } - } - return new _.kotlin.Pair(first.toString(), second.toString()); - }), zip_4ewbza$:function($receiver, other) { - var tmp$0; - var length = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(length); - tmp$0 = length - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver.charAt(i), other.charAt(i))); - } - return list; - }, zip_3n5ypu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.zip_3n5ypu$", function($receiver, other, transform) { - var tmp$0; - var length = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(length); - tmp$0 = length - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver.charAt(i), other.charAt(i))); - } - return list; - }), asIterable_gw00vq$f:function(this$asIterable) { - return function() { - return _.kotlin.text.iterator_gw00vq$(this$asIterable); - }; - }, asIterable_gw00vq$:function($receiver) { - var tmp$0 = typeof $receiver === "string"; - if (tmp$0) { - tmp$0 = $receiver.length === 0; - } - if (tmp$0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.text.asIterable_gw00vq$f($receiver)); - }, asSequence_gw00vq$f:function(this$asSequence) { - return function() { - return _.kotlin.text.iterator_gw00vq$(this$asSequence); - }; - }, asSequence_gw00vq$:function($receiver) { - var tmp$0 = typeof $receiver === "string"; - if (tmp$0) { - tmp$0 = $receiver.length === 0; - } - if (tmp$0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.text.asSequence_gw00vq$f($receiver)); - }, plus_68uai5$:Kotlin.defineInlineFunction("stdlib.kotlin.text.plus_68uai5$", function($receiver, other) { - return $receiver.toString() + other; - }), equals_bapbyp$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if ($receiver === other) { - return true; - } - if (!ignoreCase) { - return false; - } - if ($receiver.toUpperCase() === other.toUpperCase()) { - return true; - } - if ($receiver.toLowerCase() === other.toLowerCase()) { - return true; - } - return false; - }, isSurrogate_myv2d1$:function($receiver) { - return(new Kotlin.CharRange(Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MIN_SURROGATE, Kotlin.modules["stdlib"].kotlin.js.internal.CharCompanionObject.MAX_SURROGATE)).contains_htax2k$($receiver); - }, trimMargin_94jgcu$:function($receiver, marginPrefix) { - if (marginPrefix === void 0) { - marginPrefix = "|"; - } - return _.kotlin.text.replaceIndentByMargin_ex0kps$($receiver, "", marginPrefix); - }, replaceIndentByMargin_ex0kps$:function($receiver, newIndent, marginPrefix) { - if (newIndent === void 0) { - newIndent = ""; - } - if (marginPrefix === void 0) { - marginPrefix = "|"; - } - if (!!_.kotlin.text.isBlank_gw00vq$(marginPrefix)) { - var message = "marginPrefix must be non-blank string."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var lines = _.kotlin.text.lines_gw00vq$($receiver); - var resultSizeEstimate = $receiver.length + newIndent.length * lines.size; - var indentAddFunction = _.kotlin.text.getIndentFunction(newIndent); - var lastIndex = _.kotlin.collections.get_lastIndex_a7ptmv$(lines); - var destination = new Kotlin.ArrayList; - var tmp$2; - var index = 0; - tmp$2 = lines.iterator(); - while (tmp$2.hasNext()) { - var item = tmp$2.next(); - var tmp$1; - var index_0 = index++; - var tmp$4, tmp$3; - var tmp$0; - if ((index_0 === 0 || index_0 === lastIndex) && _.kotlin.text.isBlank_gw00vq$(item)) { - tmp$0 = null; - } else { - var replaceIndentByMargin_ex0kps$f_0$result; - var firstNonWhitespaceIndex; - indexOfFirst_gwcya$break: { - var tmp$8, tmp$5, tmp$6, tmp$7; - tmp$8 = _.kotlin.text.get_indices_gw00vq$(item), tmp$5 = tmp$8.first, tmp$6 = tmp$8.last, tmp$7 = tmp$8.step; - for (var index_1 = tmp$5;index_1 <= tmp$6;index_1 += tmp$7) { - if (!_.kotlin.text.isWhitespace_myv2d1$(item.charAt(index_1))) { - firstNonWhitespaceIndex = index_1; - break indexOfFirst_gwcya$break; - } - } - firstNonWhitespaceIndex = -1; - } - if (firstNonWhitespaceIndex === -1) { - replaceIndentByMargin_ex0kps$f_0$result = null; - } else { - if (_.kotlin.text.startsWith_rh6gah$(item, marginPrefix, firstNonWhitespaceIndex)) { - replaceIndentByMargin_ex0kps$f_0$result = item.substring(firstNonWhitespaceIndex + marginPrefix.length); - } else { - replaceIndentByMargin_ex0kps$f_0$result = null; - } - } - tmp$0 = (tmp$3 = (tmp$4 = replaceIndentByMargin_ex0kps$f_0$result) != null ? indentAddFunction(tmp$4) : null) != null ? tmp$3 : item; - } - (tmp$1 = tmp$0) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return _.kotlin.collections.joinTo_euycuk$(destination, new Kotlin.StringBuilder, "\n").toString(); - }, trimIndent_pdl1w0$:function($receiver) { - return _.kotlin.text.replaceIndent_94jgcu$($receiver, ""); - }, replaceIndent_94jgcu$:function($receiver, newIndent) { - var tmp$0; - if (newIndent === void 0) { - newIndent = ""; - } - var lines = _.kotlin.text.lines_gw00vq$($receiver); - var destination = new Kotlin.ArrayList; - var tmp$1; - tmp$1 = lines.iterator(); - while (tmp$1.hasNext()) { - var element = tmp$1.next(); - if (!_.kotlin.text.isBlank_gw00vq$(element)) { - destination.add_za3rmp$(element); - } - } - var destination_0 = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault(destination, 10)); - var tmp$2; - tmp$2 = destination.iterator(); - while (tmp$2.hasNext()) { - var item = tmp$2.next(); - destination_0.add_za3rmp$(_.kotlin.text.indentWidth(item)); - } - var minCommonIndent = (tmp$0 = _.kotlin.collections.min_349qs3$(destination_0)) != null ? tmp$0 : 0; - var resultSizeEstimate = $receiver.length + newIndent.length * lines.size; - var indentAddFunction = _.kotlin.text.getIndentFunction(newIndent); - var lastIndex = _.kotlin.collections.get_lastIndex_a7ptmv$(lines); - var destination_1 = new Kotlin.ArrayList; - var tmp$4; - var index = 0; - tmp$4 = lines.iterator(); - while (tmp$4.hasNext()) { - var item_0 = tmp$4.next(); - var tmp$3; - var index_0 = index++; - var tmp$6, tmp$5; - (tmp$3 = (index_0 === 0 || index_0 === lastIndex) && _.kotlin.text.isBlank_gw00vq$(item_0) ? null : (tmp$5 = (tmp$6 = _.kotlin.text.drop_n7iutu$(item_0, minCommonIndent)) != null ? indentAddFunction(tmp$6) : null) != null ? tmp$5 : item_0) != null ? destination_1.add_za3rmp$(tmp$3) : null; - } - return _.kotlin.collections.joinTo_euycuk$(destination_1, new Kotlin.StringBuilder, "\n").toString(); - }, prependIndent_94jgcu$f:function(closure$indent) { - return function(it) { - if (_.kotlin.text.isBlank_gw00vq$(it)) { - if (it.length < closure$indent.length) { - return closure$indent; - } else { - return it; - } - } else { - return closure$indent + it; - } - }; - }, prependIndent_94jgcu$:function($receiver, indent) { - if (indent === void 0) { - indent = " "; - } - return _.kotlin.sequences.joinToString_mbzd5w$(_.kotlin.sequences.map_mzhnvn$(_.kotlin.text.lineSequence_gw00vq$($receiver), _.kotlin.text.prependIndent_94jgcu$f(indent)), "\n"); - }, indentWidth:function($receiver) { - var indexOfFirst_gwcya$result; - indexOfFirst_gwcya$break: { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index))) { - indexOfFirst_gwcya$result = index; - break indexOfFirst_gwcya$break; - } - } - indexOfFirst_gwcya$result = -1; - } - return indexOfFirst_gwcya$result === -1 ? $receiver.length : indexOfFirst_gwcya$result; - }, getIndentFunction$f:function(line) { - return line; - }, getIndentFunction$f_0:function(closure$indent) { - return function(line) { - return closure$indent + line; - }; - }, getIndentFunction:function(indent) { - if (indent.length === 0) { - return _.kotlin.text.getIndentFunction$f; - } else { - return _.kotlin.text.getIndentFunction$f_0(indent); - } - }, reindent:function($receiver, resultSizeEstimate, indentAddFunction, indentCutFunction) { - var lastIndex = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - var destination = new Kotlin.ArrayList; - var tmp$2; - var index = 0; - tmp$2 = $receiver.iterator(); - while (tmp$2.hasNext()) { - var item = tmp$2.next(); - var tmp$1; - var index_0 = index++; - var tmp$4, tmp$3; - (tmp$1 = (index_0 === 0 || index_0 === lastIndex) && _.kotlin.text.isBlank_gw00vq$(item) ? null : (tmp$3 = (tmp$4 = indentCutFunction(item)) != null ? indentAddFunction(tmp$4) : null) != null ? tmp$3 : item) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return _.kotlin.collections.joinTo_euycuk$(destination, new Kotlin.StringBuilder, "\n").toString(); - }, buildString_bb10bd$:Kotlin.defineInlineFunction("stdlib.kotlin.text.buildString_bb10bd$", function(builderAction) { - var $receiver = new Kotlin.StringBuilder; - builderAction.call($receiver); - return $receiver.toString(); - }), append_rjuq1o$:function($receiver, value) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = value, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - $receiver.append(item); - } - return $receiver; - }, append_7lvk3c$:function($receiver, value) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = value, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - $receiver.append(item); - } - return $receiver; - }, append_j3ibnd$:function($receiver, value) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = value, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - $receiver.append(item); - } - return $receiver; - }, trim_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trim_gwcya$", function($receiver, predicate) { - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = predicate($receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1); - }), trim_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trim_ggikb8$", function($receiver, predicate) { - var tmp$0; - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = predicate($receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1).toString(); - }), trimStart_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimStart_gwcya$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }), trimStart_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimStart_ggikb8$", function($receiver, predicate) { - var tmp$0; - var trimStart_gwcya$result; - trimStart_gwcya$break: { - var tmp$4, tmp$1, tmp$2, tmp$3; - tmp$4 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$4.first, tmp$2 = tmp$4.last, tmp$3 = tmp$4.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!predicate($receiver.charAt(index))) { - trimStart_gwcya$result = $receiver.substring(index, $receiver.length); - break trimStart_gwcya$break; - } - } - trimStart_gwcya$result = ""; - } - return trimStart_gwcya$result.toString(); - }), trimEnd_gwcya$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimEnd_gwcya$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.charAt(index))) { - return $receiver.substring(0, index + 1).toString(); - } - } - return ""; - }), trimEnd_ggikb8$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimEnd_ggikb8$", function($receiver, predicate) { - var tmp$0; - var trimEnd_gwcya$result; - trimEnd_gwcya$break: { - var tmp$1; - tmp$1 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - if (!predicate($receiver.charAt(index))) { - trimEnd_gwcya$result = $receiver.substring(0, index + 1).toString(); - break trimEnd_gwcya$break; - } - } - trimEnd_gwcya$result = ""; - } - return trimEnd_gwcya$result.toString(); - }), trim_g0p4tc$:function($receiver, chars) { - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = _.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1); - }, trim_1hgcu2$:function($receiver, chars) { - var tmp$0; - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = _.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1).toString(); - }, trimStart_g0p4tc$:function($receiver, chars) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }, trimStart_1hgcu2$:function($receiver, chars) { - var tmp$0; - var trimStart_gwcya$result; - trimStart_gwcya$break: { - var tmp$4, tmp$1, tmp$2, tmp$3; - tmp$4 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$4.first, tmp$2 = tmp$4.last, tmp$3 = tmp$4.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - trimStart_gwcya$result = $receiver.substring(index, $receiver.length); - break trimStart_gwcya$break; - } - } - trimStart_gwcya$result = ""; - } - return trimStart_gwcya$result.toString(); - }, trimEnd_g0p4tc$:function($receiver, chars) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - return $receiver.substring(0, index + 1).toString(); - } - } - return ""; - }, trimEnd_1hgcu2$:function($receiver, chars) { - var tmp$0; - var trimEnd_gwcya$result; - trimEnd_gwcya$break: { - var tmp$1; - tmp$1 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - if (!_.kotlin.collections.contains_q79yhh$(chars, $receiver.charAt(index))) { - trimEnd_gwcya$result = $receiver.substring(0, index + 1).toString(); - break trimEnd_gwcya$break; - } - } - trimEnd_gwcya$result = ""; - } - return trimEnd_gwcya$result.toString(); - }, trim_gw00vq$:function($receiver) { - var startIndex = 0; - var endIndex = $receiver.length - 1; - var startFound = false; - while (startIndex <= endIndex) { - var index = !startFound ? startIndex : endIndex; - var match = _.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index)); - if (!startFound) { - if (!match) { - startFound = true; - } else { - startIndex += 1; - } - } else { - if (!match) { - break; - } else { - endIndex -= 1; - } - } - } - return $receiver.substring(startIndex, endIndex + 1); - }, trim_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trim_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.trim_gw00vq$($receiver).toString(); - }), trimStart_gw00vq$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.text.get_indices_gw00vq$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (!_.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index))) { - return $receiver.substring(index, $receiver.length); - } - } - return ""; - }, trimStart_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimStart_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.trimStart_gw00vq$($receiver).toString(); - }), trimEnd_gw00vq$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.ranges.reversed_zf1xzd$(_.kotlin.text.get_indices_gw00vq$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!_.kotlin.text.isWhitespace_myv2d1$($receiver.charAt(index))) { - return $receiver.substring(0, index + 1).toString(); - } - } - return ""; - }, trimEnd_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.trimEnd_pdl1w0$", function($receiver) { - var tmp$0; - return _.kotlin.text.trimEnd_gw00vq$($receiver).toString(); - }), padStart_dz660z$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - if (length < 0) { - throw new Kotlin.IllegalArgumentException("Desired length " + length + " is less than zero."); - } - if (length <= $receiver.length) { - return $receiver.substring(0, $receiver.length); - } - var sb = new Kotlin.StringBuilder; - tmp$0 = length - $receiver.length; - for (var i = 1;i <= tmp$0;i++) { - sb.append(padChar); - } - sb.append($receiver); - return sb; - }, padStart_b68f8p$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - return _.kotlin.text.padStart_dz660z$($receiver, length, padChar).toString(); - }, padEnd_dz660z$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - if (length < 0) { - throw new Kotlin.IllegalArgumentException("Desired length " + length + " is less than zero."); - } - if (length <= $receiver.length) { - return $receiver.substring(0, $receiver.length); - } - var sb = new Kotlin.StringBuilder; - sb.append($receiver); - tmp$0 = length - $receiver.length; - for (var i = 1;i <= tmp$0;i++) { - sb.append(padChar); - } - return sb; - }, padEnd_b68f8p$:function($receiver, length, padChar) { - var tmp$0; - if (padChar === void 0) { - padChar = " "; - } - return _.kotlin.text.padEnd_dz660z$($receiver, length, padChar).toString(); - }, isNullOrEmpty_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNullOrEmpty_gw00vq$", function($receiver) { - return $receiver == null || $receiver.length === 0; - }), isEmpty_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isEmpty_gw00vq$", function($receiver) { - return $receiver.length === 0; - }), isNotEmpty_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNotEmpty_gw00vq$", function($receiver) { - return $receiver.length > 0; - }), isNotBlank_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNotBlank_gw00vq$", function($receiver) { - return!_.kotlin.text.isBlank_gw00vq$($receiver); - }), isNullOrBlank_gw00vq$:Kotlin.defineInlineFunction("stdlib.kotlin.text.isNullOrBlank_gw00vq$", function($receiver) { - return $receiver == null || _.kotlin.text.isBlank_gw00vq$($receiver); - }), iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.CharIterator]; - }, function $fun(this$iterator_0) { - this.this$iterator_0 = this$iterator_0; - $fun.baseInitializer.call(this); - this.index_1xj8pz$ = 0; - }, {nextChar:function() { - return this.this$iterator_0.charAt(this.index_1xj8pz$++); - }, hasNext:function() { - return this.index_1xj8pz$ < this.this$iterator_0.length; - }}, {}), iterator_gw00vq$:function($receiver) { - return new _.kotlin.text.iterator$f($receiver); - }, orEmpty_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.orEmpty_pdl1w0$", function($receiver) { - return $receiver != null ? $receiver : ""; - }), get_indices_gw00vq$:{value:function($receiver) { - return new Kotlin.NumberRange(0, $receiver.length - 1); - }}, get_lastIndex_gw00vq$:{value:function($receiver) { - return $receiver.length - 1; - }}, hasSurrogatePairAt_kljjvw$:function($receiver, index) { - return(new Kotlin.NumberRange(0, $receiver.length - 2)).contains_htax2k$(index) && (_.kotlin.text.isHighSurrogate_myv2d1$($receiver.charAt(index)) && _.kotlin.text.isLowSurrogate_myv2d1$($receiver.charAt(index + 1))); - }, substring_590b93$:function($receiver, range) { - return $receiver.substring(range.start, range.endInclusive + 1); - }, subSequence_2g2kgt$:function($receiver, range) { - return $receiver.substring(range.start, range.endInclusive + 1); - }, subSequence_78fvzw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.subSequence_78fvzw$", function($receiver, start, end) { - return $receiver.substring(start, end); - }), substring_7bp3tu$:Kotlin.defineInlineFunction("stdlib.kotlin.text.substring_7bp3tu$", function($receiver, startIndex, endIndex) { - if (endIndex === void 0) { - endIndex = $receiver.length; - } - return $receiver.substring(startIndex, endIndex).toString(); - }), substring_2g2kgt$:function($receiver, range) { - return $receiver.substring(range.start, range.endInclusive + 1).toString(); - }, substringBefore_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringBefore_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringAfter_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + 1, $receiver.length); - }, substringAfter_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + delimiter.length, $receiver.length); - }, substringBeforeLast_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringBeforeLast_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(0, index); - }, substringAfterLast_7uhrl1$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + 1, $receiver.length); - }, substringAfterLast_ex0kps$:function($receiver, delimiter, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - return index === -1 ? missingDelimiterValue : $receiver.substring(index + delimiter.length, $receiver.length); - }, replaceRange_r7eg9y$:function($receiver, startIndex, endIndex, replacement) { - if (endIndex < startIndex) { - throw new Kotlin.IndexOutOfBoundsException("End index (" + endIndex + ") is less than start index (" + startIndex + ")."); - } - var sb = new Kotlin.StringBuilder; - sb.append($receiver, 0, startIndex); - sb.append(replacement); - sb.append($receiver, endIndex, $receiver.length); - return sb; - }, replaceRange_tb247g$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replaceRange_tb247g$", function($receiver, startIndex, endIndex, replacement) { - var tmp$0; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, startIndex, endIndex, replacement).toString(); - }), replaceRange_jrbvad$:function($receiver, range, replacement) { - return _.kotlin.text.replaceRange_r7eg9y$($receiver, range.start, range.endInclusive + 1, replacement); - }, replaceRange_dvlf5r$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replaceRange_dvlf5r$", function($receiver, range, replacement) { - var tmp$0; - return _.kotlin.text.replaceRange_jrbvad$($receiver, range, replacement).toString(); - }), removeRange_7bp3tu$:function($receiver, startIndex, endIndex) { - if (endIndex < startIndex) { - throw new Kotlin.IndexOutOfBoundsException("End index (" + endIndex + ") is less than start index (" + startIndex + ")."); - } - if (endIndex === startIndex) { - return $receiver.substring(0, $receiver.length); - } - var capacity = $receiver.length - (endIndex - startIndex); - var sb = new Kotlin.StringBuilder; - sb.append($receiver, 0, startIndex); - sb.append($receiver, endIndex, $receiver.length); - return sb; - }, removeRange_78fvzw$:Kotlin.defineInlineFunction("stdlib.kotlin.text.removeRange_78fvzw$", function($receiver, startIndex, endIndex) { - var tmp$0; - return _.kotlin.text.removeRange_7bp3tu$($receiver, startIndex, endIndex).toString(); - }), removeRange_2g2kgt$:function($receiver, range) { - return _.kotlin.text.removeRange_7bp3tu$($receiver, range.start, range.endInclusive + 1); - }, removeRange_590b93$:Kotlin.defineInlineFunction("stdlib.kotlin.text.removeRange_590b93$", function($receiver, range) { - var tmp$0; - return _.kotlin.text.removeRange_2g2kgt$($receiver, range).toString(); - }), removePrefix_4ewbza$:function($receiver, prefix) { - if (_.kotlin.text.startsWith_kzp0od$($receiver, prefix)) { - return $receiver.substring(prefix.length, $receiver.length); - } - return $receiver.substring(0, $receiver.length); - }, removePrefix_a14n4c$:function($receiver, prefix) { - if (_.kotlin.text.startsWith_kzp0od$($receiver, prefix)) { - return $receiver.substring(prefix.length); - } - return $receiver; - }, removeSuffix_4ewbza$:function($receiver, suffix) { - if (_.kotlin.text.endsWith_kzp0od$($receiver, suffix)) { - return $receiver.substring(0, $receiver.length - suffix.length); - } - return $receiver.substring(0, $receiver.length); - }, removeSuffix_a14n4c$:function($receiver, suffix) { - if (_.kotlin.text.endsWith_kzp0od$($receiver, suffix)) { - return $receiver.substring(0, $receiver.length - suffix.length); - } - return $receiver; - }, removeSurrounding_9b5scy$:function($receiver, prefix, suffix) { - if ($receiver.length >= prefix.length + suffix.length && (_.kotlin.text.startsWith_kzp0od$($receiver, prefix) && _.kotlin.text.endsWith_kzp0od$($receiver, suffix))) { - return $receiver.substring(prefix.length, $receiver.length - suffix.length); - } - return $receiver.substring(0, $receiver.length); - }, removeSurrounding_f5o6fo$:function($receiver, prefix, suffix) { - if ($receiver.length >= prefix.length + suffix.length && (_.kotlin.text.startsWith_kzp0od$($receiver, prefix) && _.kotlin.text.endsWith_kzp0od$($receiver, suffix))) { - return $receiver.substring(prefix.length, $receiver.length - suffix.length); - } - return $receiver; - }, removeSurrounding_4ewbza$:function($receiver, delimiter) { - return _.kotlin.text.removeSurrounding_9b5scy$($receiver, delimiter, delimiter); - }, removeSurrounding_a14n4c$:function($receiver, delimiter) { - return _.kotlin.text.removeSurrounding_f5o6fo$($receiver, delimiter, delimiter); - }, replaceBefore_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replaceBefore_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replaceAfter_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + 1, $receiver.length, replacement).toString(); - } - }, replaceAfter_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.indexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + delimiter.length, $receiver.length, replacement).toString(); - } - }, replaceAfterLast_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + delimiter.length, $receiver.length, replacement).toString(); - } - }, replaceAfterLast_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, index + 1, $receiver.length, replacement).toString(); - } - }, replaceBeforeLast_tzm4on$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_ilfvta$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replaceBeforeLast_s3e0ge$:function($receiver, delimiter, replacement, missingDelimiterValue) { - if (missingDelimiterValue === void 0) { - missingDelimiterValue = $receiver; - } - var index = _.kotlin.text.lastIndexOf_30chhv$($receiver, delimiter); - if (index === -1) { - return missingDelimiterValue; - } else { - var tmp$1; - return _.kotlin.text.replaceRange_r7eg9y$($receiver, 0, index, replacement).toString(); - } - }, replace_8h3bgl$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replace_8h3bgl$", function($receiver, regex, replacement) { - return regex.replace_x2uqeu$($receiver, replacement); - }), replace_c95is1$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replace_c95is1$", function($receiver, regex, transform) { - var match = regex.find_905azu$($receiver); - if (match == null) { - return $receiver.toString(); - } - var lastStart = 0; - var length = $receiver.length; - var sb = new Kotlin.StringBuilder; - do { - var foundMatch = match != null ? match : Kotlin.throwNPE(); - sb.append($receiver, lastStart, foundMatch.range.start); - sb.append(transform(foundMatch)); - lastStart = foundMatch.range.endInclusive + 1; - match = foundMatch.next(); - } while (lastStart < length && match != null); - if (lastStart < length) { - sb.append($receiver, lastStart, length); - } - return sb.toString(); - }), replaceFirst_8h3bgl$:Kotlin.defineInlineFunction("stdlib.kotlin.text.replaceFirst_8h3bgl$", function($receiver, regex, replacement) { - return regex.replaceFirst_x2uqeu$($receiver, replacement); - }), matches_pg0hzr$:Kotlin.defineInlineFunction("stdlib.kotlin.text.matches_pg0hzr$", function($receiver, regex) { - return regex.matches_6bul2c$($receiver); - }), regionMatchesImpl:function($receiver, thisOffset, other, otherOffset, length, ignoreCase) { - var tmp$0; - if (otherOffset < 0 || (thisOffset < 0 || (thisOffset > $receiver.length - length || otherOffset > other.length - length))) { - return false; - } - tmp$0 = length - 1; - for (var index = 0;index <= tmp$0;index++) { - if (!_.kotlin.text.equals_bapbyp$($receiver.charAt(thisOffset + index), other.charAt(otherOffset + index), ignoreCase)) { - return false; - } - } - return true; - }, startsWith_cjsvxq$:function($receiver, char, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.length > 0 && _.kotlin.text.equals_bapbyp$($receiver.charAt(0), char, ignoreCase); - }, endsWith_cjsvxq$:function($receiver, char, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return $receiver.length > 0 && _.kotlin.text.equals_bapbyp$($receiver.charAt(_.kotlin.text.get_lastIndex_gw00vq$($receiver)), char, ignoreCase); - }, startsWith_kzp0od$:function($receiver, prefix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase && (typeof $receiver === "string" && typeof prefix === "string")) { - return _.kotlin.text.startsWith_41xvrb$($receiver, prefix); - } else { - return _.kotlin.text.regionMatchesImpl($receiver, 0, prefix, 0, prefix.length, ignoreCase); - } - }, startsWith_q2992l$:function($receiver, prefix, startIndex, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase && (typeof $receiver === "string" && typeof prefix === "string")) { - return _.kotlin.text.startsWith_rh6gah$($receiver, prefix, startIndex); - } else { - return _.kotlin.text.regionMatchesImpl($receiver, startIndex, prefix, 0, prefix.length, ignoreCase); - } - }, endsWith_kzp0od$:function($receiver, suffix, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (!ignoreCase && (typeof $receiver === "string" && typeof suffix === "string")) { - return _.kotlin.text.endsWith_41xvrb$($receiver, suffix); - } else { - return _.kotlin.text.regionMatchesImpl($receiver, $receiver.length - suffix.length, suffix, 0, suffix.length, ignoreCase); - } - }, commonPrefixWith_kzp0od$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - var shortestLength = Math.min($receiver.length, other.length); - var i = 0; - while (i < shortestLength && _.kotlin.text.equals_bapbyp$($receiver.charAt(i), other.charAt(i), ignoreCase)) { - i++; - } - if (_.kotlin.text.hasSurrogatePairAt_kljjvw$($receiver, i - 1) || _.kotlin.text.hasSurrogatePairAt_kljjvw$(other, i - 1)) { - i--; - } - return $receiver.substring(0, i).toString(); - }, commonSuffixWith_kzp0od$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - var thisLength = $receiver.length; - var otherLength = other.length; - var shortestLength = Math.min(thisLength, otherLength); - var i = 0; - while (i < shortestLength && _.kotlin.text.equals_bapbyp$($receiver.charAt(thisLength - i - 1), other.charAt(otherLength - i - 1), ignoreCase)) { - i++; - } - if (_.kotlin.text.hasSurrogatePairAt_kljjvw$($receiver, thisLength - i - 1) || _.kotlin.text.hasSurrogatePairAt_kljjvw$(other, otherLength - i - 1)) { - i--; - } - return $receiver.substring(thisLength - i, thisLength).toString(); - }, findAnyOf:function($receiver, chars, startIndex, ignoreCase, last) { - var index; - var matchingCharIndex; - var tmp$0; - if (!ignoreCase && (chars.length === 1 && typeof $receiver === "string")) { - var char = _.kotlin.collections.single_355nu0$(chars); - index = !last ? $receiver.indexOf(char.toString(), startIndex) : $receiver.lastIndexOf(char.toString(), startIndex); - return index < 0 ? null : _.kotlin.to_l1ob02$(index, char); - } - var indices = !last ? new Kotlin.NumberRange(Math.max(startIndex, 0), _.kotlin.text.get_lastIndex_gw00vq$($receiver)) : _.kotlin.ranges.downTo_rksjo2$(Math.min(startIndex, _.kotlin.text.get_lastIndex_gw00vq$($receiver)), 0); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index_0 = tmp$0.next(); - var charAtIndex = $receiver.charAt(index_0); - indexOfFirst_mf0bwc$break: { - var tmp$5, tmp$2, tmp$3, tmp$4; - tmp$5 = _.kotlin.collections.get_indices_355nu0$(chars), tmp$2 = tmp$5.first, tmp$3 = tmp$5.last, tmp$4 = tmp$5.step; - for (var index_1 = tmp$2;index_1 <= tmp$3;index_1 += tmp$4) { - if (_.kotlin.text.equals_bapbyp$(chars[index_1], charAtIndex, ignoreCase)) { - matchingCharIndex = index_1; - break indexOfFirst_mf0bwc$break; - } - } - matchingCharIndex = -1; - } - if (matchingCharIndex >= 0) { - return _.kotlin.to_l1ob02$(index_0, chars[matchingCharIndex]); - } - } - return null; - }, indexOfAny_cfilrb$:function($receiver, chars, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf($receiver, chars, startIndex, ignoreCase, false)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, lastIndexOfAny_cfilrb$:function($receiver, chars, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf($receiver, chars, startIndex, ignoreCase, true)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, indexOf_1:function($receiver, other, startIndex, endIndex, ignoreCase, last) { - var tmp$0, tmp$1; - if (last === void 0) { - last = false; - } - var indices = !last ? new Kotlin.NumberRange(_.kotlin.ranges.coerceAtLeast_rksjo2$(startIndex, 0), _.kotlin.ranges.coerceAtMost_rksjo2$(endIndex, $receiver.length)) : _.kotlin.ranges.downTo_rksjo2$(_.kotlin.ranges.coerceAtMost_rksjo2$(startIndex, _.kotlin.text.get_lastIndex_gw00vq$($receiver)), _.kotlin.ranges.coerceAtLeast_rksjo2$(endIndex, 0)); - if (typeof $receiver === "string" && typeof other === "string") { - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (_.kotlin.text.regionMatches_qb0ndp$(other, 0, $receiver, index, other.length, ignoreCase)) { - return index; - } - } - } else { - tmp$1 = indices.iterator(); - while (tmp$1.hasNext()) { - var index_0 = tmp$1.next(); - if (_.kotlin.text.regionMatchesImpl(other, 0, $receiver, index_0, other.length, ignoreCase)) { - return index_0; - } - } - } - return-1; - }, findAnyOf_1:function($receiver, strings, startIndex, ignoreCase, last) { - var matchingString; - var matchingString_0; - var tmp$0, tmp$1; - if (!ignoreCase && strings.size === 1) { - var string = _.kotlin.collections.single_q5oq31$(strings); - var index = !last ? _.kotlin.text.indexOf_30chhv$($receiver, string, startIndex) : _.kotlin.text.lastIndexOf_30chhv$($receiver, string, startIndex); - return index < 0 ? null : _.kotlin.to_l1ob02$(index, string); - } - var indices = !last ? new Kotlin.NumberRange(_.kotlin.ranges.coerceAtLeast_rksjo2$(startIndex, 0), $receiver.length) : _.kotlin.ranges.downTo_rksjo2$(_.kotlin.ranges.coerceAtMost_rksjo2$(startIndex, _.kotlin.text.get_lastIndex_gw00vq$($receiver)), 0); - if (typeof $receiver === "string") { - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index_0 = tmp$0.next(); - firstOrNull_udlcbx$break: { - var tmp$2; - tmp$2 = strings.iterator(); - while (tmp$2.hasNext()) { - var element = tmp$2.next(); - if (_.kotlin.text.regionMatches_qb0ndp$(element, 0, $receiver, index_0, element.length, ignoreCase)) { - matchingString = element; - break firstOrNull_udlcbx$break; - } - } - matchingString = null; - } - if (matchingString != null) { - return _.kotlin.to_l1ob02$(index_0, matchingString); - } - } - } else { - tmp$1 = indices.iterator(); - while (tmp$1.hasNext()) { - var index_1 = tmp$1.next(); - firstOrNull_udlcbx$break_0: { - var tmp$3; - tmp$3 = strings.iterator(); - while (tmp$3.hasNext()) { - var element_0 = tmp$3.next(); - if (_.kotlin.text.regionMatchesImpl(element_0, 0, $receiver, index_1, element_0.length, ignoreCase)) { - matchingString_0 = element_0; - break firstOrNull_udlcbx$break_0; - } - } - matchingString_0 = null; - } - if (matchingString_0 != null) { - return _.kotlin.to_l1ob02$(index_1, matchingString_0); - } - } - } - return null; - }, findAnyOf_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, false); - }, findLastAnyOf_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, true); - }, indexOfAny_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, false)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, lastIndexOfAny_o41fp7$:function($receiver, strings, startIndex, ignoreCase) { - var tmp$0, tmp$1; - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return(tmp$1 = (tmp$0 = _.kotlin.text.findAnyOf_1($receiver, strings, startIndex, ignoreCase, true)) != null ? tmp$0.first : null) != null ? tmp$1 : -1; - }, indexOf_ilfvta$:function($receiver, char, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.indexOfAny_cfilrb$($receiver, [char], startIndex, ignoreCase) : $receiver.indexOf(char.toString(), startIndex); - }, indexOf_30chhv$:function($receiver, string, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.indexOf_1($receiver, string, startIndex, $receiver.length, ignoreCase) : $receiver.indexOf(string, startIndex); - }, lastIndexOf_ilfvta$:function($receiver, char, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.lastIndexOfAny_cfilrb$($receiver, [char], startIndex, ignoreCase) : $receiver.lastIndexOf(char.toString(), startIndex); - }, lastIndexOf_30chhv$:function($receiver, string, startIndex, ignoreCase) { - if (startIndex === void 0) { - startIndex = _.kotlin.text.get_lastIndex_gw00vq$($receiver); - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - return ignoreCase || !(typeof $receiver === "string") ? _.kotlin.text.indexOf_1($receiver, string, startIndex, 0, ignoreCase, true) : $receiver.lastIndexOf(string, startIndex); - }, contains_kzp0od$:function($receiver, other, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return typeof other === "string" ? _.kotlin.text.indexOf_30chhv$($receiver, other, void 0, ignoreCase) >= 0 : _.kotlin.text.indexOf_1($receiver, other, 0, $receiver.length, ignoreCase) >= 0; - }, contains_cjsvxq$:function($receiver, char, ignoreCase) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - return _.kotlin.text.indexOf_ilfvta$($receiver, char, void 0, ignoreCase) >= 0; - }, contains_pg0hzr$:Kotlin.defineInlineFunction("stdlib.kotlin.text.contains_pg0hzr$", function($receiver, regex) { - return regex.containsMatchIn_6bul2c$($receiver); - }), DelimitedRangesSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(input, startIndex, limit, getNextMatch) { - this.input_furd7s$ = input; - this.startIndex_82cxqa$ = startIndex; - this.limit_ft78vr$ = limit; - this.getNextMatch_1m429e$ = getNextMatch; - }, {iterator:function() { - return new _.kotlin.text.DelimitedRangesSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$DelimitedRangesSequence) { - this.this$DelimitedRangesSequence_0 = this$DelimitedRangesSequence; - this.nextState = -1; - this.currentStartIndex = Math.min(Math.max(this$DelimitedRangesSequence.startIndex_82cxqa$, 0), this$DelimitedRangesSequence.input_furd7s$.length); - this.nextSearchIndex = this.currentStartIndex; - this.nextItem = null; - this.counter = 0; - }, {calcNext:function() { - if (this.nextSearchIndex < 0) { - this.nextState = 0; - this.nextItem = null; - } else { - if (this.this$DelimitedRangesSequence_0.limit_ft78vr$ > 0 && ++this.counter >= this.this$DelimitedRangesSequence_0.limit_ft78vr$ || this.nextSearchIndex > this.this$DelimitedRangesSequence_0.input_furd7s$.length) { - this.nextItem = new Kotlin.NumberRange(this.currentStartIndex, _.kotlin.text.get_lastIndex_gw00vq$(this.this$DelimitedRangesSequence_0.input_furd7s$)); - this.nextSearchIndex = -1; - } else { - var match = this.this$DelimitedRangesSequence_0.getNextMatch_1m429e$.call(this.this$DelimitedRangesSequence_0.input_furd7s$, this.nextSearchIndex); - if (match == null) { - this.nextItem = new Kotlin.NumberRange(this.currentStartIndex, _.kotlin.text.get_lastIndex_gw00vq$(this.this$DelimitedRangesSequence_0.input_furd7s$)); - this.nextSearchIndex = -1; - } else { - var tmp$0 = match, index = tmp$0.component1(), length = tmp$0.component2(); - this.nextItem = new Kotlin.NumberRange(this.currentStartIndex, index - 1); - this.currentStartIndex = index + length; - this.nextSearchIndex = this.currentStartIndex + (length === 0 ? 1 : 0); - } - } - this.nextState = 1; - } - }, next:function() { - var tmp$0; - if (this.nextState === -1) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = Kotlin.isType(tmp$0 = this.nextItem, Kotlin.NumberRange) ? tmp$0 : Kotlin.throwCCE(); - this.nextItem = null; - this.nextState = -1; - return result; - }, hasNext:function() { - if (this.nextState === -1) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), rangesDelimitedBy_1$f_0:function(closure$delimiters, closure$ignoreCase) { - return function(startIndex) { - var tmp$0; - return(tmp$0 = _.kotlin.text.findAnyOf(this, closure$delimiters, startIndex, closure$ignoreCase, false)) != null ? _.kotlin.to_l1ob02$(tmp$0.first, 1) : null; - }; - }, rangesDelimitedBy_1:function($receiver, delimiters, startIndex, ignoreCase, limit) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - if (!(limit >= 0)) { - var message = "Limit must be non-negative, but was " + limit + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return new _.kotlin.text.DelimitedRangesSequence($receiver, startIndex, limit, _.kotlin.text.rangesDelimitedBy_1$f_0(delimiters, ignoreCase)); - }, rangesDelimitedBy$f_0:function(closure$delimitersList, closure$ignoreCase) { - return function(startIndex) { - var tmp$0; - return(tmp$0 = _.kotlin.text.findAnyOf_1(this, closure$delimitersList, startIndex, closure$ignoreCase, false)) != null ? _.kotlin.to_l1ob02$(tmp$0.first, tmp$0.second.length) : null; - }; - }, rangesDelimitedBy:function($receiver, delimiters, startIndex, ignoreCase, limit) { - if (startIndex === void 0) { - startIndex = 0; - } - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - if (!(limit >= 0)) { - var message = "Limit must be non-negative, but was " + limit + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - var delimitersList = _.kotlin.collections.asList_eg9ybj$(delimiters); - return new _.kotlin.text.DelimitedRangesSequence($receiver, startIndex, limit, _.kotlin.text.rangesDelimitedBy$f_0(delimitersList, ignoreCase)); - }, splitToSequence_l2gz7$f:function(this$splitToSequence) { - return function(it) { - return _.kotlin.text.substring_2g2kgt$(this$splitToSequence, it); - }; - }, splitToSequence_l2gz7$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - return _.kotlin.sequences.map_mzhnvn$(_.kotlin.text.rangesDelimitedBy($receiver, delimiters, void 0, ignoreCase, limit), _.kotlin.text.splitToSequence_l2gz7$f($receiver)); - }, split_l2gz7$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - var $receiver_0 = _.kotlin.sequences.asIterable_uya9q7$(_.kotlin.text.rangesDelimitedBy($receiver, delimiters, void 0, ignoreCase, limit)); - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver_0, 10)); - var tmp$0; - tmp$0 = $receiver_0.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(_.kotlin.text.substring_2g2kgt$($receiver, item)); - } - return destination; - }, splitToSequence_rhc0qh$f:function(this$splitToSequence) { - return function(it) { - return _.kotlin.text.substring_2g2kgt$(this$splitToSequence, it); - }; - }, splitToSequence_rhc0qh$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - return _.kotlin.sequences.map_mzhnvn$(_.kotlin.text.rangesDelimitedBy_1($receiver, delimiters, void 0, ignoreCase, limit), _.kotlin.text.splitToSequence_rhc0qh$f($receiver)); - }, split_rhc0qh$:function($receiver, delimiters, ignoreCase, limit) { - if (ignoreCase === void 0) { - ignoreCase = false; - } - if (limit === void 0) { - limit = 0; - } - var $receiver_0 = _.kotlin.sequences.asIterable_uya9q7$(_.kotlin.text.rangesDelimitedBy_1($receiver, delimiters, void 0, ignoreCase, limit)); - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver_0, 10)); - var tmp$0; - tmp$0 = $receiver_0.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(_.kotlin.text.substring_2g2kgt$($receiver, item)); - } - return destination; - }, split_nhz2th$:Kotlin.defineInlineFunction("stdlib.kotlin.text.split_nhz2th$", function($receiver, regex, limit) { - if (limit === void 0) { - limit = 0; - } - return regex.split_905azu$($receiver, limit); - }), lineSequence_gw00vq$:function($receiver) { - return _.kotlin.text.splitToSequence_l2gz7$($receiver, ["\r\n", "\n", "\r"]); - }, lines_gw00vq$:function($receiver) { - return _.kotlin.sequences.toList_uya9q7$(_.kotlin.text.lineSequence_gw00vq$($receiver)); - }, Typography:Kotlin.createObject(null, function() { - this.quote = '"'; - this.dollar = "$"; - this.amp = "\x26"; - this.less = "\x3c"; - this.greater = "\x3e"; - this.nbsp = "\u00a0"; - this.times = "\u00d7"; - this.cent = "\u00a2"; - this.pound = "\u00a3"; - this.section = "\u00a7"; - this.copyright = "\u00a9"; - this.leftGuillemete = "\u00ab"; - this.rightGuillemete = "\u00bb"; - this.registered = "\u00ae"; - this.degree = "\u00b0"; - this.plusMinus = "\u00b1"; - this.paragraph = "\u00b6"; - this.middleDot = "\u00b7"; - this.half = "\u00bd"; - this.ndash = "\u2013"; - this.mdash = "\u2014"; - this.leftSingleQuote = "\u2018"; - this.rightSingleQuote = "\u2019"; - this.lowSingleQuote = "\u201a"; - this.leftDoubleQuote = "\u201c"; - this.rightDoubleQuote = "\u201d"; - this.lowDoubleQuote = "\u201e"; - this.dagger = "\u2020"; - this.doubleDagger = "\u2021"; - this.bullet = "\u2022"; - this.ellipsis = "\u2026"; - this.prime = "\u2032"; - this.doublePrime = "\u2033"; - this.euro = "\u20ac"; - this.tm = "\u2122"; - this.almostEqual = "\u2248"; - this.notEqual = "\u2260"; - this.lessOrEqual = "\u2264"; - this.greaterOrEqual = "\u2265"; - }), MatchGroupCollection:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Collection]; - }), MatchResult:Kotlin.createTrait(null, {destructured:{get:function() { - return new _.kotlin.text.MatchResult.Destructured(this); - }}}, {Destructured:Kotlin.createClass(null, function(match) { - this.match = match; - }, {component1:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component1", function() { - return this.match.groupValues.get_za3lpa$(1); - }), component2:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component2", function() { - return this.match.groupValues.get_za3lpa$(2); - }), component3:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component3", function() { - return this.match.groupValues.get_za3lpa$(3); - }), component4:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component4", function() { - return this.match.groupValues.get_za3lpa$(4); - }), component5:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component5", function() { - return this.match.groupValues.get_za3lpa$(5); - }), component6:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component6", function() { - return this.match.groupValues.get_za3lpa$(6); - }), component7:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component7", function() { - return this.match.groupValues.get_za3lpa$(7); - }), component8:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component8", function() { - return this.match.groupValues.get_za3lpa$(8); - }), component9:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component9", function() { - return this.match.groupValues.get_za3lpa$(9); - }), component10:Kotlin.defineInlineFunction("stdlib.kotlin.text.MatchResult.Destructured.component10", function() { - return this.match.groupValues.get_za3lpa$(10); - }), toList:function() { - return this.match.groupValues.subList_vux9f0$(1, this.match.groupValues.size); - }})}), toRegex_pdl1w0$:Kotlin.defineInlineFunction("stdlib.kotlin.text.toRegex_pdl1w0$", function($receiver) { - return _.kotlin.text.Regex_61zpoe$($receiver); - }), toRegex_1fh9rc$:Kotlin.defineInlineFunction("stdlib.kotlin.text.toRegex_1fh9rc$", function($receiver, option) { - return _.kotlin.text.Regex_sb3q2$($receiver, option); - }), toRegex_qbq406$:Kotlin.defineInlineFunction("stdlib.kotlin.text.toRegex_qbq406$", function($receiver, options) { - return new _.kotlin.text.Regex($receiver, options); - }), js:Kotlin.definePackage(null, {reset_bckwes$:function($receiver) { - $receiver.lastIndex = 0; - }})}), collections:Kotlin.definePackage(function() { - this.INT_MAX_POWER_OF_TWO_y8578v$ = (Kotlin.modules["stdlib"].kotlin.js.internal.IntCompanionObject.MAX_VALUE / 2 | 0) + 1; - }, {listOf_za3rmp$:function(element) { - return _.kotlin.collections.arrayListOf_9mqe4v$([element]); - }, setOf_za3rmp$:function(element) { - return _.kotlin.collections.hashSetOf_9mqe4v$([element]); - }, mapOf_dvvt93$:function(pair) { - return _.kotlin.collections.hashMapOf_eoa9s7$([pair]); - }, asList_eg9ybj$:function($receiver) { - var al = new Kotlin.ArrayList; - al.array = $receiver; - return al; - }, asList_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_l1lu5s$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_964n92$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_355nu0$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_bvy38t$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_rjqrz0$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_tmsbgp$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_se6h4y$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), asList_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asList_i2lc78$", function($receiver) { - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = $receiver) ? tmp$0 : Kotlin.throwCCE()); - }), copyOf_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_eg9ybj$", function($receiver) { - return $receiver.slice(); - }), copyOf_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_l1lu5s$", function($receiver) { - return $receiver.slice(); - }), copyOf_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_964n92$", function($receiver) { - return $receiver.slice(); - }), copyOf_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_355nu0$", function($receiver) { - return $receiver.slice(); - }), copyOf_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_bvy38t$", function($receiver) { - return $receiver.slice(); - }), copyOf_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_rjqrz0$", function($receiver) { - return $receiver.slice(); - }), copyOf_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_tmsbgp$", function($receiver) { - return $receiver.slice(); - }), copyOf_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_se6h4y$", function($receiver) { - return $receiver.slice(); - }), copyOf_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOf_i2lc78$", function($receiver) { - return $receiver.slice(); - }), copyOf_ucmip8$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_7naycm$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_tb5gmf$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_x09c4g$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, Kotlin.Long.ZERO); - }, copyOf_2e964m$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_3qx2rv$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, 0); - }, copyOf_rz0vgy$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, false); - }, copyOf_cwi0e2$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, "\x00"); - }, copyOf_ke1fvl$:function($receiver, newSize) { - return _.kotlin.arrayCopyResize($receiver, newSize, null); - }, copyOfRange_51gnn7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_51gnn7$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_dbbxfg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_dbbxfg$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_iwvzfi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_iwvzfi$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_4q6m98$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_4q6m98$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_2w253b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_2w253b$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_guntdk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_guntdk$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_qzgok5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_qzgok5$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_v260a6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_v260a6$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), copyOfRange_6rk7s8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.copyOfRange_6rk7s8$", function($receiver, fromIndex, toIndex) { - return $receiver.slice(fromIndex, toIndex); - }), plus_ke19y6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_ke19y6$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_bsmqrv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_bsmqrv$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_hgt5d7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_hgt5d7$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_q79yhh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_q79yhh$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_96a6a3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_96a6a3$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_thi4tv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_thi4tv$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_tb5gmf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_tb5gmf$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_ssilt7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_ssilt7$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_x27eb7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_x27eb7$", function($receiver, element) { - return $receiver.concat([element]); - }), plus_b1982w$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_pxf0th$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_426zor$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_esr9qt$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_3mnc6t$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_202n65$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_5oi5bn$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_wdqs0l$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_o0d0y5$:function($receiver, elements) { - return _.kotlin.arrayPlusCollection($receiver, elements); - }, plus_741p1q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_741p1q$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_xju7f2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_xju7f2$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_1033ji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_1033ji$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_ak8uzy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_ak8uzy$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_bo3qya$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_bo3qya$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_p55a6y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_p55a6y$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_e0lu4g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_e0lu4g$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_7caxwu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_7caxwu$", function($receiver, elements) { - return $receiver.concat(elements); - }), plus_phu9d2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plus_phu9d2$", function($receiver, elements) { - return $receiver.concat(elements); - }), plusElement_ke19y6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_ke19y6$", function($receiver, element) { - return $receiver.concat([element]); - }), sort_ehvuiv$f:function(a, b) { - return Kotlin.compareTo(a, b); - }, sort_ehvuiv$:function($receiver) { - if ($receiver.length > 1) { - $receiver.sort(_.kotlin.collections.sort_ehvuiv$f); - } - }, sort_se6h4y$f:function(a, b) { - return a.compareTo_za3rmp$(b); - }, sort_se6h4y$:function($receiver) { - if ($receiver.length > 1) { - $receiver.sort(_.kotlin.collections.sort_se6h4y$f); - } - }, sortWith_pf0rc$f:function(closure$comparator) { - return function(a, b) { - return closure$comparator.compare(a, b); - }; - }, sortWith_pf0rc$:function($receiver, comparator) { - if ($receiver.length > 1) { - $receiver.sort(_.kotlin.collections.sortWith_pf0rc$f(comparator)); - } - }, toTypedArray_l1lu5s$:function($receiver) { - var tmp$0; - var copyOf_l1lu5s$result; - copyOf_l1lu5s$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_l1lu5s$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_964n92$:function($receiver) { - var tmp$0; - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_964n92$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_355nu0$:function($receiver) { - var tmp$0; - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_355nu0$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_bvy38t$:function($receiver) { - var tmp$0; - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_bvy38t$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_rjqrz0$:function($receiver) { - var tmp$0; - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_rjqrz0$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_tmsbgp$:function($receiver) { - var tmp$0; - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_tmsbgp$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_se6h4y$:function($receiver) { - var tmp$0; - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_se6h4y$result) ? tmp$0 : Kotlin.throwCCE(); - }, toTypedArray_i2lc78$:function($receiver) { - var tmp$0; - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - return Array.isArray(tmp$0 = copyOf_i2lc78$result) ? tmp$0 : Kotlin.throwCCE(); - }, component1_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_eg9ybj$", function($receiver) { - return $receiver[0]; - }), component1_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_964n92$", function($receiver) { - return $receiver[0]; - }), component1_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_i2lc78$", function($receiver) { - return $receiver[0]; - }), component1_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_tmsbgp$", function($receiver) { - return $receiver[0]; - }), component1_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_se6h4y$", function($receiver) { - return $receiver[0]; - }), component1_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_rjqrz0$", function($receiver) { - return $receiver[0]; - }), component1_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_bvy38t$", function($receiver) { - return $receiver[0]; - }), component1_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_l1lu5s$", function($receiver) { - return $receiver[0]; - }), component1_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_355nu0$", function($receiver) { - return $receiver[0]; - }), component2_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_eg9ybj$", function($receiver) { - return $receiver[1]; - }), component2_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_964n92$", function($receiver) { - return $receiver[1]; - }), component2_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_i2lc78$", function($receiver) { - return $receiver[1]; - }), component2_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_tmsbgp$", function($receiver) { - return $receiver[1]; - }), component2_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_se6h4y$", function($receiver) { - return $receiver[1]; - }), component2_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_rjqrz0$", function($receiver) { - return $receiver[1]; - }), component2_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_bvy38t$", function($receiver) { - return $receiver[1]; - }), component2_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_l1lu5s$", function($receiver) { - return $receiver[1]; - }), component2_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_355nu0$", function($receiver) { - return $receiver[1]; - }), component3_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_eg9ybj$", function($receiver) { - return $receiver[2]; - }), component3_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_964n92$", function($receiver) { - return $receiver[2]; - }), component3_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_i2lc78$", function($receiver) { - return $receiver[2]; - }), component3_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_tmsbgp$", function($receiver) { - return $receiver[2]; - }), component3_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_se6h4y$", function($receiver) { - return $receiver[2]; - }), component3_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_rjqrz0$", function($receiver) { - return $receiver[2]; - }), component3_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_bvy38t$", function($receiver) { - return $receiver[2]; - }), component3_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_l1lu5s$", function($receiver) { - return $receiver[2]; - }), component3_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_355nu0$", function($receiver) { - return $receiver[2]; - }), component4_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_eg9ybj$", function($receiver) { - return $receiver[3]; - }), component4_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_964n92$", function($receiver) { - return $receiver[3]; - }), component4_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_i2lc78$", function($receiver) { - return $receiver[3]; - }), component4_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_tmsbgp$", function($receiver) { - return $receiver[3]; - }), component4_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_se6h4y$", function($receiver) { - return $receiver[3]; - }), component4_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_rjqrz0$", function($receiver) { - return $receiver[3]; - }), component4_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_bvy38t$", function($receiver) { - return $receiver[3]; - }), component4_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_l1lu5s$", function($receiver) { - return $receiver[3]; - }), component4_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_355nu0$", function($receiver) { - return $receiver[3]; - }), component5_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_eg9ybj$", function($receiver) { - return $receiver[4]; - }), component5_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_964n92$", function($receiver) { - return $receiver[4]; - }), component5_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_i2lc78$", function($receiver) { - return $receiver[4]; - }), component5_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_tmsbgp$", function($receiver) { - return $receiver[4]; - }), component5_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_se6h4y$", function($receiver) { - return $receiver[4]; - }), component5_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_rjqrz0$", function($receiver) { - return $receiver[4]; - }), component5_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_bvy38t$", function($receiver) { - return $receiver[4]; - }), component5_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_l1lu5s$", function($receiver) { - return $receiver[4]; - }), component5_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_355nu0$", function($receiver) { - return $receiver[4]; - }), contains_ke19y6$:function($receiver, element) { - return _.kotlin.collections.indexOf_ke19y6$($receiver, element) >= 0; - }, contains_hgt5d7$:function($receiver, element) { - return _.kotlin.collections.indexOf_hgt5d7$($receiver, element) >= 0; - }, contains_x27eb7$:function($receiver, element) { - return _.kotlin.collections.indexOf_x27eb7$($receiver, element) >= 0; - }, contains_tb5gmf$:function($receiver, element) { - return _.kotlin.collections.indexOf_tb5gmf$($receiver, element) >= 0; - }, contains_ssilt7$:function($receiver, element) { - return _.kotlin.collections.indexOf_ssilt7$($receiver, element) >= 0; - }, contains_thi4tv$:function($receiver, element) { - return _.kotlin.collections.indexOf_thi4tv$($receiver, element) >= 0; - }, contains_96a6a3$:function($receiver, element) { - return _.kotlin.collections.indexOf_96a6a3$($receiver, element) >= 0; - }, contains_bsmqrv$:function($receiver, element) { - return _.kotlin.collections.indexOf_bsmqrv$($receiver, element) >= 0; - }, contains_q79yhh$:function($receiver, element) { - return _.kotlin.collections.indexOf_q79yhh$($receiver, element) >= 0; - }, elementAt_ke1fvl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_ke1fvl$", function($receiver, index) { - return $receiver[index]; - }), elementAt_ucmip8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_ucmip8$", function($receiver, index) { - return $receiver[index]; - }), elementAt_7naycm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_7naycm$", function($receiver, index) { - return $receiver[index]; - }), elementAt_tb5gmf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_tb5gmf$", function($receiver, index) { - return $receiver[index]; - }), elementAt_x09c4g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_x09c4g$", function($receiver, index) { - return $receiver[index]; - }), elementAt_2e964m$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_2e964m$", function($receiver, index) { - return $receiver[index]; - }), elementAt_3qx2rv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_3qx2rv$", function($receiver, index) { - return $receiver[index]; - }), elementAt_rz0vgy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_rz0vgy$", function($receiver, index) { - return $receiver[index]; - }), elementAt_cwi0e2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_cwi0e2$", function($receiver, index) { - return $receiver[index]; - }), elementAtOrElse_pgyyp0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_pgyyp0$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_eg9ybj$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_wdmei7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_wdmei7$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_964n92$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_ytfokv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_ytfokv$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_i2lc78$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_hvqa2x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_hvqa2x$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_tmsbgp$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_37uoi9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_37uoi9$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_se6h4y$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_t52ijz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_t52ijz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_rjqrz0$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_sbr6cx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_sbr6cx$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_bvy38t$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_puwlef$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_puwlef$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_l1lu5s$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrElse_3wujvz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_3wujvz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_355nu0$($receiver) ? $receiver[index] : defaultValue(index); - }), elementAtOrNull_ke1fvl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_ke1fvl$", function($receiver, index) { - return _.kotlin.collections.getOrNull_ke1fvl$($receiver, index); - }), elementAtOrNull_ucmip8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_ucmip8$", function($receiver, index) { - return _.kotlin.collections.getOrNull_ucmip8$($receiver, index); - }), elementAtOrNull_7naycm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_7naycm$", function($receiver, index) { - return _.kotlin.collections.getOrNull_7naycm$($receiver, index); - }), elementAtOrNull_tb5gmf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_tb5gmf$", function($receiver, index) { - return _.kotlin.collections.getOrNull_tb5gmf$($receiver, index); - }), elementAtOrNull_x09c4g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_x09c4g$", function($receiver, index) { - return _.kotlin.collections.getOrNull_x09c4g$($receiver, index); - }), elementAtOrNull_2e964m$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_2e964m$", function($receiver, index) { - return _.kotlin.collections.getOrNull_2e964m$($receiver, index); - }), elementAtOrNull_3qx2rv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_3qx2rv$", function($receiver, index) { - return _.kotlin.collections.getOrNull_3qx2rv$($receiver, index); - }), elementAtOrNull_rz0vgy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_rz0vgy$", function($receiver, index) { - return _.kotlin.collections.getOrNull_rz0vgy$($receiver, index); - }), elementAtOrNull_cwi0e2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_cwi0e2$", function($receiver, index) { - return _.kotlin.collections.getOrNull_cwi0e2$($receiver, index); - }), find_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), find_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), find_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), find_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), first_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_964n92$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_355nu0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[0]; - }, first_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), first_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), firstOrNull_eg9ybj$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_964n92$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_i2lc78$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_tmsbgp$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_se6h4y$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_rjqrz0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_bvy38t$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_l1lu5s$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_355nu0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[0]; - }, firstOrNull_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), firstOrNull_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), getOrElse_pgyyp0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_pgyyp0$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_eg9ybj$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_wdmei7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_wdmei7$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_964n92$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_ytfokv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_ytfokv$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_i2lc78$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_hvqa2x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_hvqa2x$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_tmsbgp$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_37uoi9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_37uoi9$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_se6h4y$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_t52ijz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_t52ijz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_rjqrz0$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_sbr6cx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_sbr6cx$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_bvy38t$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_puwlef$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_puwlef$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_l1lu5s$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrElse_3wujvz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_3wujvz$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_355nu0$($receiver) ? $receiver[index] : defaultValue(index); - }), getOrNull_ke1fvl$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_eg9ybj$($receiver) ? $receiver[index] : null; - }, getOrNull_ucmip8$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_964n92$($receiver) ? $receiver[index] : null; - }, getOrNull_7naycm$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_i2lc78$($receiver) ? $receiver[index] : null; - }, getOrNull_tb5gmf$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_tmsbgp$($receiver) ? $receiver[index] : null; - }, getOrNull_x09c4g$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_se6h4y$($receiver) ? $receiver[index] : null; - }, getOrNull_2e964m$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_rjqrz0$($receiver) ? $receiver[index] : null; - }, getOrNull_3qx2rv$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_bvy38t$($receiver) ? $receiver[index] : null; - }, getOrNull_rz0vgy$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_l1lu5s$($receiver) ? $receiver[index] : null; - }, getOrNull_cwi0e2$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_355nu0$($receiver) ? $receiver[index] : null; - }, indexOf_ke19y6$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3, tmp$4, tmp$5, tmp$6, tmp$7; - if (element == null) { - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if ($receiver[index] == null) { - return index; - } - } - } else { - tmp$4 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$5 = tmp$4.first, tmp$6 = tmp$4.last, tmp$7 = tmp$4.step; - for (var index_0 = tmp$5;index_0 <= tmp$6;index_0 += tmp$7) { - if (Kotlin.equals(element, $receiver[index_0])) { - return index_0; - } - } - } - return-1; - }, indexOf_hgt5d7$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_964n92$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_x27eb7$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_i2lc78$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_tb5gmf$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_tmsbgp$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_ssilt7$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_se6h4y$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element.equals_za3rmp$($receiver[index])) { - return index; - } - } - return-1; - }, indexOf_thi4tv$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_rjqrz0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_96a6a3$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_bvy38t$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOf_bsmqrv$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_l1lu5s$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (Kotlin.equals(element, $receiver[index])) { - return index; - } - } - return-1; - }, indexOf_q79yhh$:function($receiver, element) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_355nu0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, indexOfFirst_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_1seo9s$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_964n92$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_pqtrl8$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_i2lc78$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_tmsbgp$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_c9nn9k$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_se6h4y$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_jp64to$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_rjqrz0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_56tpji$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_bvy38t$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_n9o8rw$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_l1lu5s$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfFirst_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_mf0bwc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_355nu0$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), indexOfLast_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver[index])) { - return index; - } - } - return-1; - }), last_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_eg9ybj$($receiver)]; - }, last_964n92$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_964n92$($receiver)]; - }, last_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_i2lc78$($receiver)]; - }, last_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_tmsbgp$($receiver)]; - }, last_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_se6h4y$($receiver)]; - }, last_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_rjqrz0$($receiver)]; - }, last_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_bvy38t$($receiver)]; - }, last_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_l1lu5s$($receiver)]; - }, last_355nu0$:function($receiver) { - if ($receiver.length === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } - return $receiver[_.kotlin.collections.get_lastIndex_355nu0$($receiver)]; - }, last_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), last_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - }), lastIndexOf_ke19y6$:function($receiver, element) { - var tmp$0, tmp$1; - if (element == null) { - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if ($receiver[index] == null) { - return index; - } - } - } else { - tmp$1 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index_0 = tmp$1.next(); - if (Kotlin.equals(element, $receiver[index_0])) { - return index_0; - } - } - } - return-1; - }, lastIndexOf_hgt5d7$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_x27eb7$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_tb5gmf$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_ssilt7$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element.equals_za3rmp$($receiver[index])) { - return index; - } - } - return-1; - }, lastIndexOf_thi4tv$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_96a6a3$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastIndexOf_bsmqrv$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (Kotlin.equals(element, $receiver[index])) { - return index; - } - } - return-1; - }, lastIndexOf_q79yhh$:function($receiver, element) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (element === $receiver[index]) { - return index; - } - } - return-1; - }, lastOrNull_eg9ybj$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_964n92$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_i2lc78$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_tmsbgp$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_se6h4y$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_rjqrz0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_bvy38t$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_l1lu5s$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_355nu0$:function($receiver) { - return $receiver.length === 0 ? null : $receiver[$receiver.length - 1]; - }, lastOrNull_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_eg9ybj$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_964n92$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_i2lc78$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_tmsbgp$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_se6h4y$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_rjqrz0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_bvy38t$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_l1lu5s$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), lastOrNull_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_355nu0$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver[index]; - if (predicate(element)) { - return element; - } - } - return null; - }), single_eg9ybj$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_964n92$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_i2lc78$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_tmsbgp$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_se6h4y$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_rjqrz0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_bvy38t$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_l1lu5s$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_355nu0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("Array is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver[0]; - } else { - throw new Kotlin.IllegalArgumentException("Array has more than one element."); - } - } - return tmp$1; - }, single_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return(tmp$3 = single) == null || tmp$3 != null ? tmp$3 : Kotlin.throwCCE(); - }), single_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_1seo9s$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_pqtrl8$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$3 = single) === "number" ? tmp$3 : Kotlin.throwCCE(); - }), single_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_c9nn9k$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return Kotlin.isType(tmp$1 = single, Kotlin.Long) ? tmp$1 : Kotlin.throwCCE(); - }), single_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_jp64to$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_56tpji$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "number" ? tmp$1 : Kotlin.throwCCE(); - }), single_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_n9o8rw$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return typeof(tmp$1 = single) === "boolean" ? tmp$1 : Kotlin.throwCCE(); - }), single_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_mf0bwc$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Array contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Array contains no element matching the predicate."); - } - return Kotlin.isChar(tmp$1 = single) ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_eg9ybj$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_964n92$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_i2lc78$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_tmsbgp$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_se6h4y$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_rjqrz0$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_bvy38t$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_l1lu5s$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_355nu0$:function($receiver) { - return $receiver.length === 1 ? $receiver[0] : null; - }, singleOrNull_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_1seo9s$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var single = null; - var found = false; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_jp64to$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_56tpji$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), singleOrNull_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_ke1fvl$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_eg9ybj$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_ucmip8$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_964n92$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_7naycm$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_i2lc78$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_tb5gmf$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_tmsbgp$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_x09c4g$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_se6h4y$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_2e964m$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_rjqrz0$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_3qx2rv$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_bvy38t$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_rz0vgy$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_l1lu5s$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, drop_cwi0e2$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_355nu0$($receiver); - } - if (n >= $receiver.length) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList($receiver.length - n); - tmp$0 = $receiver.length - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, dropLast_ke1fvl$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_ke1fvl$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_ucmip8$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_ucmip8$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_7naycm$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_7naycm$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_tb5gmf$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_tb5gmf$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_x09c4g$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_x09c4g$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_2e964m$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_2e964m$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_3qx2rv$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_3qx2rv$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_rz0vgy$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_rz0vgy$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLast_cwi0e2$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_cwi0e2$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.length - n, 0)); - }, dropLastWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_eg9ybj$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_ke1fvl$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_964n92$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_ucmip8$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_i2lc78$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_7naycm$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_tmsbgp$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_tb5gmf$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_se6h4y$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_x09c4g$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_rjqrz0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_2e964m$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_bvy38t$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_3qx2rv$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_l1lu5s$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_rz0vgy$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropLastWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_355nu0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.take_cwi0e2$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), dropWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), filter_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_dgtl0h$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_1seo9s$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_pqtrl8$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_74vioc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_c9nn9k$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_jp64to$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_56tpji$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_n9o8rw$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filter_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_mf0bwc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterIndexed_qy3he2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_qy3he2$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_vs9yol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_vs9yol$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_sj8ypt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_sj8ypt$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_mb5uch$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_mb5uch$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_esogdp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_esogdp$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_vlcunz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_vlcunz$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_qd2zlp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_qd2zlp$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_5j3lt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_5j3lt$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexed_ke0vuh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_ke0vuh$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_xjbu2f$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_xjbu2f$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_4r47cg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_4r47cg$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_lttaj6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_lttaj6$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_muamox$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_muamox$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_fhrm4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_fhrm4$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_nzxn4e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_nzxn4e$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_1tmjh1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_1tmjh1$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_t5hn6u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_t5hn6u$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_80tdpi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_80tdpi$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterNot_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_dgtl0h$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_1seo9s$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_pqtrl8$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_74vioc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_c9nn9k$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_jp64to$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_56tpji$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_n9o8rw$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNot_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_mf0bwc$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotNull_eg9ybj$:function($receiver) { - return _.kotlin.collections.filterNotNullTo_ajv5ds$($receiver, new Kotlin.ArrayList); - }, filterNotNullTo_ajv5ds$:function($receiver, destination) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (element != null) { - destination.add_za3rmp$(element); - } - } - return destination; - }, filterNotTo_hjvcb0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_hjvcb0$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_xaona3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_xaona3$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_czbilj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_czbilj$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_hufq5w$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_hufq5w$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_ejt5vl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_ejt5vl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_a2xp8n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_a2xp8n$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_py67j4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_py67j4$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_wtv3qz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_wtv3qz$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotTo_xspnld$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_xspnld$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_hjvcb0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_hjvcb0$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_xaona3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_xaona3$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_czbilj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_czbilj$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_hufq5w$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_hufq5w$", function($receiver, destination, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_ejt5vl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_ejt5vl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_a2xp8n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_a2xp8n$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_py67j4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_py67j4$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_wtv3qz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_wtv3qz$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_xspnld$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_xspnld$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), slice_umgy94$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - return _.kotlin.collections.asList_eg9ybj$($receiver.slice(indices.start, toIndex)); - }, slice_yhzrrx$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_iwvzfi$result; - copyOfRange_iwvzfi$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_iwvzfi$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_jsa5ur$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_6rk7s8$result; - copyOfRange_6rk7s8$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_6rk7s8$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_w9c7lc$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_qzgok5$result; - copyOfRange_qzgok5$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_qzgok5$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_n1ctuf$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_v260a6$result; - copyOfRange_v260a6$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_v260a6$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_tf1fwd$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_guntdk$result; - copyOfRange_guntdk$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_guntdk$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_z0313o$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_2w253b$result; - copyOfRange_2w253b$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_2w253b$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_tur8s7$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_dbbxfg$result; - copyOfRange_dbbxfg$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_dbbxfg$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_kwtr7z$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var toIndex = indices.endInclusive + 1; - var copyOfRange_4q6m98$result; - copyOfRange_4q6m98$result = $receiver.slice(indices.start, toIndex); - var tmp$0; - return _.kotlin.collections.asList_eg9ybj$(Array.isArray(tmp$0 = copyOfRange_4q6m98$result) ? tmp$0 : Kotlin.throwCCE()); - }, slice_k1z9y1$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_8bcmtu$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_z4poy4$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_tpf8wv$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_liqtfe$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_u6v72s$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_qp9dhh$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_4xk008$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, slice_ia2tr4$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver[index]); - } - return list; - }, sliceArray_b1ebut$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.nullArray($receiver, indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_n1pimy$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_xl46hs$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_5oi5bn$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_11np7e$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.longArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_k9291c$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_5ptw4x$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.numberArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_vreslo$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.booleanArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_yudz04$:function($receiver, indices) { - var tmp$0; - var result = Kotlin.charArrayOfSize(indices.size); - var targetIndex = 0; - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var sourceIndex = tmp$0.next(); - result[targetIndex++] = $receiver[sourceIndex]; - } - return result; - }, sliceArray_umgy94$:function($receiver, indices) { - if (indices.isEmpty()) { - return $receiver.slice(0, 0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_yhzrrx$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_jsa5ur$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_w9c7lc$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_n1ctuf$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.longArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_tf1fwd$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_z0313o$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.numberArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_tur8s7$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.booleanArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, sliceArray_kwtr7z$:function($receiver, indices) { - if (indices.isEmpty()) { - return Kotlin.charArrayOfSize(0); - } - var toIndex = indices.endInclusive + 1; - return $receiver.slice(indices.start, toIndex); - }, take_ke1fvl$:function($receiver, n) { - var tmp$0, tmp$1, tmp$2; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_eg9ybj$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_ucmip8$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_964n92$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_7naycm$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_i2lc78$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_tb5gmf$:function($receiver, n) { - var tmp$0, tmp$1, tmp$2; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_tmsbgp$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_x09c4g$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_se6h4y$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_2e964m$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_rjqrz0$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_3qx2rv$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_bvy38t$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_rz0vgy$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_l1lu5s$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, take_cwi0e2$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (n >= $receiver.length) { - return _.kotlin.collections.toList_355nu0$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, takeLast_ke1fvl$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_eg9ybj$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_ucmip8$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_964n92$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_7naycm$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_i2lc78$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_tb5gmf$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_tmsbgp$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_x09c4g$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_se6h4y$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_2e964m$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_rjqrz0$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_3qx2rv$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_bvy38t$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_rz0vgy$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_l1lu5s$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLast_cwi0e2$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.length; - if (n >= size) { - return _.kotlin.collections.toList_355nu0$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver[index]); - } - return list; - }, takeLastWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_eg9ybj$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_ke1fvl$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_eg9ybj$($receiver); - }), takeLastWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_964n92$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_ucmip8$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_964n92$($receiver); - }), takeLastWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_i2lc78$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_7naycm$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_i2lc78$($receiver); - }), takeLastWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_74vioc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_tmsbgp$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_tb5gmf$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_tmsbgp$($receiver); - }), takeLastWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_se6h4y$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_x09c4g$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_se6h4y$($receiver); - }), takeLastWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_rjqrz0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_2e964m$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_rjqrz0$($receiver); - }), takeLastWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_bvy38t$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_3qx2rv$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_bvy38t$($receiver); - }), takeLastWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_l1lu5s$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_rz0vgy$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_l1lu5s$($receiver); - }), takeLastWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_355nu0$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver[index])) { - return _.kotlin.collections.drop_cwi0e2$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_355nu0$($receiver); - }), takeWhile_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_1seo9s$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_jp64to$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_56tpji$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), takeWhile_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), reverse_eg9ybj$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_964n92$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_964n92$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_i2lc78$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_tmsbgp$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_se6h4y$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_rjqrz0$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_bvy38t$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_l1lu5s$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reverse_355nu0$:function($receiver) { - var tmp$0; - var midPoint = ($receiver.length / 2 | 0) - 1; - if (midPoint < 0) { - return; - } - var reverseIndex = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - tmp$0 = midPoint; - for (var index = 0;index <= tmp$0;index++) { - var tmp = $receiver[index]; - $receiver[index] = $receiver[reverseIndex]; - $receiver[reverseIndex] = tmp; - reverseIndex--; - } - }, reversed_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_eg9ybj$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_964n92$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_964n92$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_i2lc78$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_tmsbgp$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_se6h4y$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_rjqrz0$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_bvy38t$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_l1lu5s$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversed_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_355nu0$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, reversedArray_eg9ybj$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.nullArray($receiver, $receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_964n92$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_964n92$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_i2lc78$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_tmsbgp$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_se6h4y$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.longArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_rjqrz0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_bvy38t$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.numberArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_l1lu5s$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.booleanArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, reversedArray_355nu0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return $receiver; - } - var result = Kotlin.charArrayOfSize($receiver.length); - var lastIndex = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - tmp$0 = lastIndex; - for (var i = 0;i <= tmp$0;i++) { - result[lastIndex - i] = $receiver[i]; - } - return result; - }, sortBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortBy_2kbc8r$", function($receiver, selector) { - if ($receiver.length > 1) { - _.kotlin.collections.sortWith_pf0rc$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - } - }), sortByDescending_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortByDescending_2kbc8r$", function($receiver, selector) { - if ($receiver.length > 1) { - _.kotlin.collections.sortWith_pf0rc$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - } - }), sortDescending_ehvuiv$:function($receiver) { - _.kotlin.collections.sortWith_pf0rc$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortDescending_964n92$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_964n92$($receiver); - } - }, sortDescending_i2lc78$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_i2lc78$($receiver); - } - }, sortDescending_tmsbgp$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_tmsbgp$($receiver); - } - }, sortDescending_se6h4y$:function($receiver) { - if ($receiver.length > 1) { - _.kotlin.collections.sort_se6h4y$($receiver); - _.kotlin.collections.reverse_se6h4y$($receiver); - } - }, sortDescending_rjqrz0$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_rjqrz0$($receiver); - } - }, sortDescending_bvy38t$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_bvy38t$($receiver); - } - }, sortDescending_355nu0$:function($receiver) { - if ($receiver.length > 1) { - Kotlin.primitiveArraySort($receiver); - _.kotlin.collections.reverse_355nu0$($receiver); - } - }, sorted_ehvuiv$:function($receiver) { - return _.kotlin.collections.asList_eg9ybj$(_.kotlin.collections.sortedArray_ehvuiv$($receiver)); - }, sorted_964n92$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_964n92$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_i2lc78$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_i2lc78$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_tmsbgp$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_tmsbgp$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_se6h4y$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_se6h4y$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_rjqrz0$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_rjqrz0$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_bvy38t$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_bvy38t$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sorted_355nu0$:function($receiver) { - var $receiver_0 = _.kotlin.collections.toTypedArray_355nu0$($receiver); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedArray_ehvuiv$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_eg9ybj$result; - copyOf_eg9ybj$result = $receiver.slice(); - _.kotlin.collections.sort_ehvuiv$(copyOf_eg9ybj$result); - return copyOf_eg9ybj$result; - }, sortedArray_964n92$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_964n92$result); - return copyOf_964n92$result; - }, sortedArray_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_i2lc78$result); - return copyOf_i2lc78$result; - }, sortedArray_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_tmsbgp$result); - return copyOf_tmsbgp$result; - }, sortedArray_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - _.kotlin.collections.sort_se6h4y$(copyOf_se6h4y$result); - return copyOf_se6h4y$result; - }, sortedArray_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_rjqrz0$result); - return copyOf_rjqrz0$result; - }, sortedArray_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_bvy38t$result); - return copyOf_bvy38t$result; - }, sortedArray_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_355nu0$result); - return copyOf_355nu0$result; - }, sortedArrayDescending_ehvuiv$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_eg9ybj$result; - copyOf_eg9ybj$result = $receiver.slice(); - _.kotlin.collections.sortWith_pf0rc$(copyOf_eg9ybj$result, _.kotlin.comparisons.reverseOrder()); - return copyOf_eg9ybj$result; - }, sortedArrayDescending_964n92$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - _.kotlin.collections.sortDescending_964n92$(copyOf_964n92$result); - return copyOf_964n92$result; - }, sortedArrayDescending_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - _.kotlin.collections.sortDescending_i2lc78$(copyOf_i2lc78$result); - return copyOf_i2lc78$result; - }, sortedArrayDescending_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - _.kotlin.collections.sortDescending_tmsbgp$(copyOf_tmsbgp$result); - return copyOf_tmsbgp$result; - }, sortedArrayDescending_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - _.kotlin.collections.sortDescending_se6h4y$(copyOf_se6h4y$result); - return copyOf_se6h4y$result; - }, sortedArrayDescending_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - _.kotlin.collections.sortDescending_rjqrz0$(copyOf_rjqrz0$result); - return copyOf_rjqrz0$result; - }, sortedArrayDescending_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - _.kotlin.collections.sortDescending_bvy38t$(copyOf_bvy38t$result); - return copyOf_bvy38t$result; - }, sortedArrayDescending_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - _.kotlin.collections.sortDescending_355nu0$(copyOf_355nu0$result); - return copyOf_355nu0$result; - }, sortedArrayWith_pf0rc$:function($receiver, comparator) { - if ($receiver.length === 0) { - return $receiver; - } - var copyOf_eg9ybj$result; - copyOf_eg9ybj$result = $receiver.slice(); - _.kotlin.collections.sortWith_pf0rc$(copyOf_eg9ybj$result, comparator); - return copyOf_eg9ybj$result; - }, sortedBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_2kbc8r$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_pf0rc$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_lmseli$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_g2jn7p$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_urwa3e$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_bpm5rn$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_no6awq$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_naiwod$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_5sy41q$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_jujh3x$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_mn0nhi$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_w3205p$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_7pamz8$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_1f7czx$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_g2bjom$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_es41ir$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedBy_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_xjz7li$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_r5s4t3$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedByDescending_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_2kbc8r$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_pf0rc$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_lmseli$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_g2jn7p$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_urwa3e$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_bpm5rn$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_no6awq$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_naiwod$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_5sy41q$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_jujh3x$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_mn0nhi$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_w3205p$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_7pamz8$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_1f7czx$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_g2bjom$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_es41ir$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedByDescending_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_xjz7li$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_r5s4t3$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedDescending_ehvuiv$:function($receiver) { - return _.kotlin.collections.sortedWith_pf0rc$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortedDescending_964n92$:function($receiver) { - var copyOf_964n92$result; - copyOf_964n92$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_964n92$result); - return _.kotlin.collections.reversed_964n92$(copyOf_964n92$result); - }, sortedDescending_i2lc78$:function($receiver) { - var copyOf_i2lc78$result; - copyOf_i2lc78$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_i2lc78$result); - return _.kotlin.collections.reversed_i2lc78$(copyOf_i2lc78$result); - }, sortedDescending_tmsbgp$:function($receiver) { - var copyOf_tmsbgp$result; - copyOf_tmsbgp$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_tmsbgp$result); - return _.kotlin.collections.reversed_tmsbgp$(copyOf_tmsbgp$result); - }, sortedDescending_se6h4y$:function($receiver) { - var copyOf_se6h4y$result; - copyOf_se6h4y$result = $receiver.slice(); - _.kotlin.collections.sort_se6h4y$(copyOf_se6h4y$result); - return _.kotlin.collections.reversed_se6h4y$(copyOf_se6h4y$result); - }, sortedDescending_rjqrz0$:function($receiver) { - var copyOf_rjqrz0$result; - copyOf_rjqrz0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_rjqrz0$result); - return _.kotlin.collections.reversed_rjqrz0$(copyOf_rjqrz0$result); - }, sortedDescending_bvy38t$:function($receiver) { - var copyOf_bvy38t$result; - copyOf_bvy38t$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_bvy38t$result); - return _.kotlin.collections.reversed_bvy38t$(copyOf_bvy38t$result); - }, sortedDescending_355nu0$:function($receiver) { - var copyOf_355nu0$result; - copyOf_355nu0$result = $receiver.slice(); - Kotlin.primitiveArraySort(copyOf_355nu0$result); - return _.kotlin.collections.reversed_355nu0$(copyOf_355nu0$result); - }, sortedWith_pf0rc$:function($receiver, comparator) { - return _.kotlin.collections.asList_eg9ybj$(_.kotlin.collections.sortedArrayWith_pf0rc$($receiver, comparator)); - }, sortedWith_g2jn7p$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_964n92$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_bpm5rn$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_i2lc78$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_naiwod$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_tmsbgp$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_jujh3x$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_se6h4y$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_w3205p$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_rjqrz0$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_1f7czx$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_bvy38t$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_es41ir$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_l1lu5s$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, sortedWith_r5s4t3$:function($receiver, comparator) { - var $receiver_0 = _.kotlin.collections.toTypedArray_355nu0$($receiver); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - }, get_indices_eg9ybj$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_eg9ybj$($receiver)); - }}, get_indices_964n92$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_964n92$($receiver)); - }}, get_indices_i2lc78$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_i2lc78$($receiver)); - }}, get_indices_tmsbgp$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_tmsbgp$($receiver)); - }}, get_indices_se6h4y$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_se6h4y$($receiver)); - }}, get_indices_rjqrz0$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_rjqrz0$($receiver)); - }}, get_indices_bvy38t$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_bvy38t$($receiver)); - }}, get_indices_l1lu5s$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_l1lu5s$($receiver)); - }}, get_indices_355nu0$:{value:function($receiver) { - return new Kotlin.NumberRange(0, _.kotlin.collections.get_lastIndex_355nu0$($receiver)); - }}, isEmpty_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_eg9ybj$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_964n92$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_i2lc78$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_tmsbgp$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_se6h4y$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_rjqrz0$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_bvy38t$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_l1lu5s$", function($receiver) { - return $receiver.length === 0; - }), isEmpty_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isEmpty_355nu0$", function($receiver) { - return $receiver.length === 0; - }), isNotEmpty_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_eg9ybj$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_964n92$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_i2lc78$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_tmsbgp$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_se6h4y$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_rjqrz0$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_bvy38t$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_l1lu5s$", function($receiver) { - return!($receiver.length === 0); - }), isNotEmpty_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_355nu0$", function($receiver) { - return!($receiver.length === 0); - }), get_lastIndex_eg9ybj$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_964n92$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_i2lc78$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_tmsbgp$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_se6h4y$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_rjqrz0$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_bvy38t$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_l1lu5s$:{value:function($receiver) { - return $receiver.length - 1; - }}, get_lastIndex_355nu0$:{value:function($receiver) { - return $receiver.length - 1; - }}, toBooleanArray_7y31dn$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.booleanArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toByteArray_mgx7ed$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toCharArray_moaglf$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.charArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toDoubleArray_hb77ya$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toFloatArray_wafl1t$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toIntArray_eko7cy$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toLongArray_r1royx$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.longArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, toShortArray_ekmd3j$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - var result = Kotlin.numberArrayOfSize($receiver.length); - tmp$0 = _.kotlin.collections.get_indices_eg9ybj$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - result[index] = $receiver[index]; - } - return result; - }, associate_8vmyt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_8vmyt$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_tgl7q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_tgl7q$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_e2sx9i$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_e2sx9i$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_xlvinu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_xlvinu$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_tk5abm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_tk5abm$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_h6wt46$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_h6wt46$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_fifeb0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_fifeb0$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_3tjkyu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_3tjkyu$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associate_359jka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_359jka$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_rie7ol$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_g2md44$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_k6apf4$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_x640pc$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_uqemus$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_xtltf4$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_r03ely$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_msp2nk$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_6rjtds$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_w3c4fn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_w3c4fn$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_px3eju$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_px3eju$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_1kbpp4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_1kbpp4$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_roawnf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_roawnf$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_ktcn5y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_ktcn5y$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_x5l9ko$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_x5l9ko$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_5h63vp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_5h63vp$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_3yyqis$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_3yyqis$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateBy_bixbbo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_bixbbo$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity($receiver.length), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_xn9vqz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_xn9vqz$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_l102rk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_l102rk$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_75gvpc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_75gvpc$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_en2rcd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_en2rcd$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_gbiqoc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_gbiqoc$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_t143fk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_t143fk$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_fbozex$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_fbozex$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_83ixn8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_83ixn8$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_wnqwum$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_wnqwum$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_6dagur$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_6dagur$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_3dm5x2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_3dm5x2$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_7cumig$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_7cumig$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_f2qsrv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_f2qsrv$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_9mh1ly$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_9mh1ly$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_j7feqg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_j7feqg$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_uv5qij$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_uv5qij$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_fdk0po$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_fdk0po$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_my3tn0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_my3tn0$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_m765wl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_m765wl$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_aa8jay$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_aa8jay$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_ympge2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_ympge2$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_qnwrru$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_qnwrru$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_flvp0e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_flvp0e$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_616w56$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_616w56$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_jxocj8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_jxocj8$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_wfiona$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_wfiona$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateTo_5nnqga$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_5nnqga$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_ajv5ds$:function($receiver, destination) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_ay7s2l$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_abmk3v$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_aws6s5$:function($receiver, destination) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_uqoool$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_2jmgtx$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_yloohh$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_a59y9h$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toCollection_9hvz9d$:function($receiver, destination) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_eg9ybj$:function($receiver) { - return _.kotlin.collections.toCollection_ajv5ds$($receiver, new Kotlin.ComplexHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_964n92$:function($receiver) { - return _.kotlin.collections.toCollection_ay7s2l$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_i2lc78$:function($receiver) { - return _.kotlin.collections.toCollection_abmk3v$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_tmsbgp$:function($receiver) { - return _.kotlin.collections.toCollection_aws6s5$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_se6h4y$:function($receiver) { - return _.kotlin.collections.toCollection_uqoool$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_rjqrz0$:function($receiver) { - return _.kotlin.collections.toCollection_2jmgtx$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_bvy38t$:function($receiver) { - return _.kotlin.collections.toCollection_yloohh$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_l1lu5s$:function($receiver) { - return _.kotlin.collections.toCollection_a59y9h$($receiver, new Kotlin.PrimitiveBooleanHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toHashSet_355nu0$:function($receiver) { - return _.kotlin.collections.toCollection_9hvz9d$($receiver, new Kotlin.PrimitiveNumberHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - }, toList_eg9ybj$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_eg9ybj$($receiver); - } - } - return tmp$1; - }, toList_964n92$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_964n92$($receiver); - } - } - return tmp$1; - }, toList_i2lc78$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_i2lc78$($receiver); - } - } - return tmp$1; - }, toList_tmsbgp$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_tmsbgp$($receiver); - } - } - return tmp$1; - }, toList_se6h4y$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_se6h4y$($receiver); - } - } - return tmp$1; - }, toList_rjqrz0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_rjqrz0$($receiver); - } - } - return tmp$1; - }, toList_bvy38t$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_bvy38t$($receiver); - } - } - return tmp$1; - }, toList_l1lu5s$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_l1lu5s$($receiver); - } - } - return tmp$1; - }, toList_355nu0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toMutableList_355nu0$($receiver); - } - } - return tmp$1; - }, toMutableList_eg9ybj$:function($receiver) { - return _.java.util.ArrayList_wtfk93$(_.kotlin.collections.asCollection($receiver)); - }, toMutableList_964n92$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_i2lc78$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - list.add_za3rmp$(item); - } - return list; - }, toMutableList_se6h4y$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_rjqrz0$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_bvy38t$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_l1lu5s$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toMutableList_355nu0$:function($receiver) { - var tmp$0; - var list = new Kotlin.ArrayList($receiver.length); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - list.add_za3rmp$(item); - } - return list; - }, toSet_eg9ybj$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_ajv5ds$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_964n92$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_ay7s2l$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_i2lc78$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_abmk3v$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_tmsbgp$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_aws6s5$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_se6h4y$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_uqoool$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_rjqrz0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_2jmgtx$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_bvy38t$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_yloohh$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_l1lu5s$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_a59y9h$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, toSet_355nu0$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$($receiver[0]); - } else { - tmp$1 = _.kotlin.collections.toCollection_9hvz9d$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - return tmp$1; - }, flatMap_9lt8ay$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_9lt8ay$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_3mjriv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_3mjriv$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_bh8vgr$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_bh8vgr$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_f8uktn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_f8uktn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_2nev2p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_2nev2p$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_d20dhn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_d20dhn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_y2hta3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_y2hta3$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_ikx8ln$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_ikx8ln$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMap_986epn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_986epn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_snzct$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_snzct$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_8oemzk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_8oemzk$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_kihasu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_kihasu$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_2puvzs$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_2puvzs$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_clttnk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_clttnk$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_pj001a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_pj001a$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_rtxif4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_rtxif4$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_812y0a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_812y0a$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_4mn2jk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_4mn2jk$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), groupBy_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_rie7ol$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_g2md44$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_k6apf4$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_x640pc$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_uqemus$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_xtltf4$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_r03ely$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_msp2nk$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_6rjtds$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_w3c4fn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_w3c4fn$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_px3eju$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_px3eju$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_1kbpp4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_1kbpp4$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_roawnf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_roawnf$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_ktcn5y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_ktcn5y$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_x5l9ko$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_x5l9ko$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_5h63vp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_5h63vp$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_3yyqis$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_3yyqis$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupBy_bixbbo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_bixbbo$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_uwewbq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_uwewbq$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_i9dcot$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_i9dcot$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_y8hm29$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_y8hm29$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_3veyxd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_3veyxd$", function($receiver, destination, keySelector) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_ht8exh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_ht8exh$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_67q775$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_67q775$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_agwn6d$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_agwn6d$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_iwlqrz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_iwlqrz$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_udsjtt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_udsjtt$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_h5lvbm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_h5lvbm$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_col8dz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_col8dz$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_152lxl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_152lxl$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_2mlql2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_2mlql2$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var key = keySelector(element); - var tmp$3; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$3 = answer; - } else { - tmp$3 = value; - } - var list = tmp$3; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_bnbmqj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_bnbmqj$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_lix5qv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_lix5qv$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_6o498c$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_6o498c$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_p4mhb1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_p4mhb1$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_ghv9wz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_ghv9wz$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_rie7ol$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_g2md44$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_k6apf4$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_x640pc$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_uqemus$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_xtltf4$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_r03ely$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_msp2nk$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), map_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_6rjtds$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapIndexed_d6xsp2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_d6xsp2$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_8jepyn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_8jepyn$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_wnrzaz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_wnrzaz$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_yva9b9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_yva9b9$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_jr48ix$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_jr48ix$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_3bjddx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_3bjddx$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_7c4mm7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_7c4mm7$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_y1gkw5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_y1gkw5$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexed_t492ff$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_t492ff$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.length); - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedNotNull_d6xsp2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNull_d6xsp2$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapIndexedNotNullTo_dlwz7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNullTo_dlwz7$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapIndexedTo_dlwz7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_dlwz7$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_nikm7u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_nikm7u$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_bkzh1a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_bkzh1a$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_c7wlwo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_c7wlwo$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_312cqi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_312cqi$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_ndq9q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_ndq9q$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_t1nf4q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_t1nf4q$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_yhbe06$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_yhbe06$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedTo_u7did6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_u7did6$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNull_rie7ol$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(element)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapNotNullTo_b5g94o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNullTo_b5g94o$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - var tmp$3; - (tmp$3 = transform(element)) != null ? destination.add_za3rmp$(tmp$3) : null; - } - return destination; - }), mapTo_b5g94o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_b5g94o$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_y9zzej$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_y9zzej$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_finokt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_finokt$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_qgiq1f$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_qgiq1f$", function($receiver, destination, transform) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_g8ovid$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_g8ovid$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_j2zksz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_j2zksz$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_u6234r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_u6234r$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_yuho05$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_yuho05$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapTo_1u018b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_1u018b$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_eg9ybj$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_eg9ybj$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_eg9ybj$f($receiver)); - }, withIndex_964n92$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_964n92$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_964n92$f($receiver)); - }, withIndex_i2lc78$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_i2lc78$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_i2lc78$f($receiver)); - }, withIndex_tmsbgp$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_tmsbgp$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_tmsbgp$f($receiver)); - }, withIndex_se6h4y$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_se6h4y$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_se6h4y$f($receiver)); - }, withIndex_rjqrz0$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_rjqrz0$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_rjqrz0$f($receiver)); - }, withIndex_bvy38t$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_bvy38t$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_bvy38t$f($receiver)); - }, withIndex_l1lu5s$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_l1lu5s$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_l1lu5s$f($receiver)); - }, withIndex_355nu0$f:function(this$withIndex) { - return function() { - return Kotlin.arrayIterator(this$withIndex); - }; - }, withIndex_355nu0$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_355nu0$f($receiver)); - }, distinct_eg9ybj$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_eg9ybj$($receiver)); - }, distinct_964n92$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_964n92$($receiver)); - }, distinct_i2lc78$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_i2lc78$($receiver)); - }, distinct_tmsbgp$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_tmsbgp$($receiver)); - }, distinct_se6h4y$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_se6h4y$($receiver)); - }, distinct_rjqrz0$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_rjqrz0$($receiver)); - }, distinct_bvy38t$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_bvy38t$($receiver)); - }, distinct_l1lu5s$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_l1lu5s$($receiver)); - }, distinct_355nu0$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_355nu0$($receiver)); - }, distinctBy_rie7ol$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_rie7ol$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var e = tmp$0[tmp$2]; - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_g2md44$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_g2md44$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_k6apf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_k6apf4$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_x640pc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_x640pc$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var e = tmp$0[tmp$2]; - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_uqemus$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_uqemus$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_xtltf4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_xtltf4$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_r03ely$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_r03ely$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_msp2nk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_msp2nk$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), distinctBy_6rjtds$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_6rjtds$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), intersect_k1u664$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_eg9ybj$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_q8x1w7$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_964n92$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_gi9hh5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_i2lc78$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_tpf8wv$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_tmsbgp$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_rwqrtj$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_se6h4y$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_v8iop3$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_rjqrz0$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_7a8nt5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_bvy38t$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_6ly3kh$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_l1lu5s$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, intersect_1h1v6f$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_355nu0$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, subtract_k1u664$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_eg9ybj$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_q8x1w7$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_964n92$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_gi9hh5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_i2lc78$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_tpf8wv$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_tmsbgp$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_rwqrtj$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_se6h4y$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_v8iop3$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_rjqrz0$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_7a8nt5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_bvy38t$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_6ly3kh$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_l1lu5s$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, subtract_1h1v6f$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_355nu0$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, toMutableSet_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_964n92$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_i2lc78$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_se6h4y$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_rjqrz0$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_bvy38t$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_l1lu5s$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, toMutableSet_355nu0$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.length)); - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, union_k1u664$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_eg9ybj$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_q8x1w7$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_964n92$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_gi9hh5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_i2lc78$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_tpf8wv$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_tmsbgp$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_rwqrtj$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_se6h4y$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_v8iop3$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_rjqrz0$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_7a8nt5$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_bvy38t$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_6ly3kh$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_l1lu5s$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, union_1h1v6f$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_355nu0$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, all_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - return false; - } - } - return true; - }), all_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!predicate(element)) { - return false; - } - } - return true; - }), all_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), all_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return true; - } - return false; - }, any_964n92$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_i2lc78$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return true; - } - return false; - }, any_se6h4y$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_rjqrz0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_bvy38t$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_l1lu5s$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_355nu0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return true; - } - } - return false; - }), any_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return true; - } - } - return false; - }), any_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), any_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_eg9ybj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_eg9ybj$", function($receiver) { - return $receiver.length; - }), count_964n92$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_964n92$", function($receiver) { - return $receiver.length; - }), count_i2lc78$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_i2lc78$", function($receiver) { - return $receiver.length; - }), count_tmsbgp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_tmsbgp$", function($receiver) { - return $receiver.length; - }), count_se6h4y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_se6h4y$", function($receiver) { - return $receiver.length; - }), count_rjqrz0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_rjqrz0$", function($receiver) { - return $receiver.length; - }), count_bvy38t$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_bvy38t$", function($receiver) { - return $receiver.length; - }), count_l1lu5s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_l1lu5s$", function($receiver) { - return $receiver.length; - }), count_355nu0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_355nu0$", function($receiver) { - return $receiver.length; - }), count_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - count++; - } - } - return count; - }), count_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_1seo9s$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - count++; - } - } - return count; - }), count_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_jp64to$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_56tpji$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), count_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_pshek8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_pshek8$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_pqv817$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_pqv817$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_9mm9fh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_9mm9fh$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_5dqkgz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_5dqkgz$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_re4yqz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_re4yqz$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_t23qwz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_t23qwz$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_8pmi6j$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_8pmi6j$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_86qr6z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_86qr6z$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), fold_xpqlgr$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_xpqlgr$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_gmwb6l$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_gmwb6l$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_jy2lti$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_jy2lti$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_xco1ea$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_xco1ea$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_qjubp4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_qjubp4$", function($receiver, initial, operation) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_8ys392$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_8ys392$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_pljay6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_pljay6$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_8s951y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_8s951y$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_w9wt4a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_w9wt4a$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldIndexed_5d3uiy$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_5d3uiy$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldRight_pshek8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_pshek8$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_af40en$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_af40en$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_w1nri5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_w1nri5$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_fwp7kz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_fwp7kz$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_8g1vz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_8g1vz$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_tb9j25$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_tb9j25$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_5fhoof$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_5fhoof$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_n2j045$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_n2j045$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRight_6kfpv5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_6kfpv5$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), foldRightIndexed_gmwb6l$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_gmwb6l$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_g7wmmc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_g7wmmc$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_f9eii6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_f9eii6$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_xyb360$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_xyb360$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_insxdw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_insxdw$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_wrtz0y$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_wrtz0y$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_5cv1t0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_5cv1t0$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_7hxhjq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_7hxhjq$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), foldRightIndexed_wieq4k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_wieq4k$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), forEach_5wd4f$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_5wd4f$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - action(element); - } - }), forEach_qhbdc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_qhbdc$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_e5s73w$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_e5s73w$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_xiw8tg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_xiw8tg$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - action(element); - } - }), forEach_tn4k60$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_tn4k60$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_h9w2yk$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_h9w2yk$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_fleo5e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_fleo5e$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_3wiut8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_3wiut8$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEach_32a9pw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_32a9pw$", function($receiver, action) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_gwl0xm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_gwl0xm$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - action(index++, item); - } - }), forEachIndexed_jprgez$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_jprgez$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_ici84x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_ici84x$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_f65lpr$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_f65lpr$", function($receiver, action) { - var tmp$0, tmp$1, tmp$2; - var index = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var item = tmp$0[tmp$2]; - action(index++, item); - } - }), forEachIndexed_qmdk59$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_qmdk59$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_vlkvnz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_vlkvnz$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_enmwj1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_enmwj1$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_aiefap$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_aiefap$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), forEachIndexed_l1n7qv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_l1n7qv$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_ehvuiv$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (Kotlin.compareTo(max, e) < 0) { - max = e; - } - } - return max; - }, max_964n92$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_i2lc78$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_tmsbgp$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_se6h4y$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max.compareTo_za3rmp$(e) < 0) { - max = e; - } - } - return max; - }, max_rjqrz0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_bvy38t$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, max_355nu0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (max < e) { - max = e; - } - } - return max; - }, maxBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_2kbc8r$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_lmseli$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_urwa3e$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_no6awq$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_5sy41q$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_mn0nhi$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_7pamz8$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_g2bjom$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxBy_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_xjz7li$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var maxElem = $receiver[0]; - var maxValue = selector(maxElem); - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_pf0rc$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_g2jn7p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_bpm5rn$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_naiwod$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_jujh3x$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_w3205p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_1f7czx$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_es41ir$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, maxWith_r5s4t3$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var max = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_ehvuiv$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (Kotlin.compareTo(min, e) > 0) { - min = e; - } - } - return min; - }, min_964n92$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_i2lc78$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_tmsbgp$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_se6h4y$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min.compareTo_za3rmp$(e) > 0) { - min = e; - } - } - return min; - }, min_rjqrz0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_bvy38t$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, min_355nu0$:function($receiver) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (min > e) { - min = e; - } - } - return min; - }, minBy_2kbc8r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_2kbc8r$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_lmseli$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_lmseli$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_urwa3e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_urwa3e$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_no6awq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_no6awq$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_5sy41q$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_5sy41q$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_mn0nhi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_mn0nhi$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_7pamz8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_7pamz8$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_g2bjom$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_g2bjom$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minBy_xjz7li$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_xjz7li$", function($receiver, selector) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var minElem = $receiver[0]; - var minValue = selector(minElem); - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_pf0rc$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_g2jn7p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_bpm5rn$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_naiwod$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_jujh3x$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_w3205p$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_1f7czx$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_es41ir$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, minWith_r5s4t3$:function($receiver, comparator) { - var tmp$0; - if ($receiver.length === 0) { - return null; - } - var min = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var i = 1;i <= tmp$0;i++) { - var e = $receiver[i]; - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return false; - } - return true; - }, none_964n92$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_i2lc78$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - return false; - } - return true; - }, none_se6h4y$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_rjqrz0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_bvy38t$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_l1lu5s$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_355nu0$:function($receiver) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return false; - } - } - return true; - }), none_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_1seo9s$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_pqtrl8$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - return false; - } - } - return true; - }), none_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_c9nn9k$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_jp64to$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_56tpji$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_n9o8rw$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), none_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_mf0bwc$", function($receiver, predicate) { - var tmp$0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_lkiuaf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_lkiuaf$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_8rebxu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_8rebxu$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_pwt076$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_pwt076$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_yv55jc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_yv55jc$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_5c5tpi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_5c5tpi$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_i6ldku$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_i6ldku$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_cutd5o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_cutd5o$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_w96cka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_w96cka$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduce_nazham$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_nazham$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_9qa3fw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_9qa3fw$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_xe3tfn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_xe3tfn$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_964n92$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_vhxmnd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_vhxmnd$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_r0o6e5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_r0o6e5$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_uzo0it$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_uzo0it$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_nqrynd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_nqrynd$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_gqpg33$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_gqpg33$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_v2dtf3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_v2dtf3$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceIndexed_1pqzxj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_1pqzxj$", function($receiver, operation) { - var tmp$0; - if ($receiver.length === 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[0]; - tmp$0 = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - for (var index = 1;index <= tmp$0;index++) { - accumulator = operation(index, accumulator, $receiver[index]); - } - return accumulator; - }), reduceRight_lkiuaf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_lkiuaf$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_8rebxu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_8rebxu$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_pwt076$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_pwt076$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_yv55jc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_yv55jc$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_5c5tpi$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_5c5tpi$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_i6ldku$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_i6ldku$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_cutd5o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_cutd5o$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_w96cka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_w96cka$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRight_nazham$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_nazham$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation($receiver[index--], accumulator); - } - return accumulator; - }), reduceRightIndexed_9qa3fw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_9qa3fw$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_eg9ybj$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_xe3tfn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_xe3tfn$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_964n92$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_vhxmnd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_vhxmnd$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_i2lc78$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_r0o6e5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_r0o6e5$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_tmsbgp$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_uzo0it$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_uzo0it$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_se6h4y$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_nqrynd$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_nqrynd$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_rjqrz0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_gqpg33$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_gqpg33$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_bvy38t$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_v2dtf3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_v2dtf3$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_l1lu5s$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), reduceRightIndexed_1pqzxj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_1pqzxj$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_355nu0$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty array can't be reduced."); - } - var accumulator = $receiver[index--]; - while (index >= 0) { - accumulator = operation(index, $receiver[index], accumulator); - --index; - } - return accumulator; - }), sumBy_ri93wo$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_ri93wo$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumBy_g2h9c7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_g2h9c7$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_k65ln7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_k65ln7$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_x5ywxf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_x5ywxf$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumBy_uqjqmp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_uqjqmp$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_xtgpn7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_xtgpn7$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_qzyau1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_qzyau1$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_msjyvn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_msjyvn$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumBy_6rox5p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_6rox5p$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_jubvhg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_jubvhg$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumByDouble_wd5ypp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_wd5ypp$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_5p59zj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_5p59zj$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_55ogr5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_55ogr5$", function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += selector(element); - } - return sum; - }), sumByDouble_wthnh1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_wthnh1$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_f248nj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_f248nj$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_y6x5hx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_y6x5hx$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_ltfntb$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_ltfntb$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_3iivbz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_3iivbz$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), requireNoNulls_eg9ybj$:function($receiver) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (element == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + $receiver + "."); - } - } - return Array.isArray(tmp$3 = $receiver) ? tmp$3 : Kotlin.throwCCE(); - }, partition_dgtl0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_dgtl0h$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_1seo9s$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_1seo9s$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_pqtrl8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_pqtrl8$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_74vioc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_74vioc$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_c9nn9k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_c9nn9k$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_jp64to$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_jp64to$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_56tpji$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_56tpji$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_n9o8rw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_n9o8rw$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), partition_mf0bwc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_mf0bwc$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), zip_741p1q$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_nrhj8n$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_ika9yl$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_1nxere$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_7q8x59$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_uckx6b$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_9gp42m$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_yey03l$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_zemuah$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_2rmu0o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_2rmu0o$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_4t7xkx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_4t7xkx$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_em1vhp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_em1vhp$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_uo1iqb$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_uo1iqb$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_9x7n3z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_9x7n3z$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_49cwib$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_49cwib$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_9xp40v$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_9xp40v$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_pnti4b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_pnti4b$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_b8vhfj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_b8vhfj$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_k1u664$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_8bhqlr$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_z4usq1$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_tpkcos$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_lilpnh$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_u6q3av$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_qp49pk$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_4xew8b$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_ia7xj1$:function($receiver, other) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i++], element)); - } - return list; - }, zip_wdyzkq$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_wdyzkq$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_1w04c7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_1w04c7$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_gpk9wx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_gpk9wx$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_i6q5r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_i6q5r$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_4n0ikv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_4n0ikv$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_j1q8tt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_j1q8tt$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_wmo9n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_wmo9n$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_rz83z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_rz83z$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_ha4syt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_ha4syt$", function($receiver, other, transform) { - var tmp$0; - var arraySize = $receiver.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault(other, 10), arraySize)); - var i = 0; - tmp$0 = other.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform($receiver[i++], element)); - } - return list; - }), zip_1033ji$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_phu9d2$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_e0lu4g$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_7caxwu$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_p55a6y$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_bo3qya$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_xju7f2$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_ak8uzy$:function($receiver, other) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(_.kotlin.to_l1ob02$($receiver[i], other[i])); - } - return list; - }, zip_9zfo4u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_9zfo4u$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_xs8ib4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_xs8ib4$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_mp4cls$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_mp4cls$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_83qj9u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_83qj9u$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_kxvwwg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_kxvwwg$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_g1c01a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_g1c01a$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_ujqlps$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_ujqlps$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), zip_grqpda$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_grqpda$", function($receiver, other, transform) { - var tmp$0; - var size = Math.min($receiver.length, other.length); - var list = new Kotlin.ArrayList(size); - tmp$0 = size - 1; - for (var i = 0;i <= tmp$0;i++) { - list.add_za3rmp$(transform($receiver[i], other[i])); - } - return list; - }), joinTo_7uchso$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0, tmp$1, tmp$2; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element == null ? "null" : element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_barwct$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_2qnkcz$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_w9i6k3$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0, tmp$1, tmp$2; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_ac0spn$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_a0zr9v$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_5dssjp$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_q1okz1$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinTo_at1d3j$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinToString_qtax42$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_7uchso$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_k0u3cz$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_barwct$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_av5xiv$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_2qnkcz$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_gctiqr$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_w9i6k3$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_kp0x6r$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_ac0spn$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_92s1ft$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_a0zr9v$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_47ib1f$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_5dssjp$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_tyzo35$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_q1okz1$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, joinToString_d1dl19$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_at1d3j$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, asIterable_eg9ybj$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_eg9ybj$f($receiver)); - }, asIterable_964n92$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_964n92$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_964n92$f($receiver)); - }, asIterable_i2lc78$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_i2lc78$f($receiver)); - }, asIterable_tmsbgp$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_tmsbgp$f($receiver)); - }, asIterable_se6h4y$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_se6h4y$f($receiver)); - }, asIterable_rjqrz0$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_rjqrz0$f($receiver)); - }, asIterable_bvy38t$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_bvy38t$f($receiver)); - }, asIterable_l1lu5s$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_l1lu5s$f($receiver)); - }, asIterable_355nu0$f:function(this$asIterable) { - return function() { - return Kotlin.arrayIterator(this$asIterable); - }; - }, asIterable_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.collections.emptyList(); - } - return new _.kotlin.collections.Iterable$f(_.kotlin.collections.asIterable_355nu0$f($receiver)); - }, asSequence_eg9ybj$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_eg9ybj$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_eg9ybj$f($receiver)); - }, asSequence_964n92$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_964n92$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_964n92$f($receiver)); - }, asSequence_i2lc78$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_i2lc78$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_i2lc78$f($receiver)); - }, asSequence_tmsbgp$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_tmsbgp$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_tmsbgp$f($receiver)); - }, asSequence_se6h4y$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_se6h4y$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_se6h4y$f($receiver)); - }, asSequence_rjqrz0$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_rjqrz0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_rjqrz0$f($receiver)); - }, asSequence_bvy38t$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_bvy38t$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_bvy38t$f($receiver)); - }, asSequence_l1lu5s$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_l1lu5s$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_l1lu5s$f($receiver)); - }, asSequence_355nu0$f:function(this$asSequence) { - return function() { - return Kotlin.arrayIterator(this$asSequence); - }; - }, asSequence_355nu0$:function($receiver) { - if ($receiver.length === 0) { - return _.kotlin.sequences.emptySequence(); - } - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_355nu0$f($receiver)); - }, average_mgx7ed$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_ekmd3j$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_eko7cy$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_r1royx$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_wafl1t$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_hb77ya$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_964n92$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_i2lc78$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - var count = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_se6h4y$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_rjqrz0$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_bvy38t$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, sum_mgx7ed$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_ekmd3j$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_eko7cy$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_r1royx$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = Kotlin.Long.ZERO; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum = sum.add(element); - } - return sum; - }, sum_wafl1t$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_hb77ya$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_964n92$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_i2lc78$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_tmsbgp$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var sum = 0; - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - sum += element; - } - return sum; - }, sum_se6h4y$:function($receiver) { - var tmp$0; - var sum = Kotlin.Long.ZERO; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum = sum.add(element); - } - return sum; - }, sum_rjqrz0$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_bvy38t$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = Kotlin.arrayIterator($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, component1_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(0); - }), component2_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(1); - }), component3_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component3_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(2); - }), component4_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component4_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(3); - }), component5_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component5_a7ptmv$", function($receiver) { - return $receiver.get_za3lpa$(4); - }), contains_cwuzrm$:function($receiver, element) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return $receiver.contains_za3rmp$(element); - } - return _.kotlin.collections.indexOf_cwuzrm$($receiver, element) >= 0; - }, elementAt_cwv5p1$f:function(closure$index) { - return function(it) { - throw new Kotlin.IndexOutOfBoundsException("Collection doesn't contain element at index " + closure$index + "."); - }; - }, elementAt_cwv5p1$:function($receiver, index) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.get_za3lpa$(index); - } - return _.kotlin.collections.elementAtOrElse_1h02b4$($receiver, index, _.kotlin.collections.elementAt_cwv5p1$f(index)); - }, elementAt_3iu80n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAt_3iu80n$", function($receiver, index) { - return $receiver.get_za3lpa$(index); - }), elementAtOrElse_1h02b4$:function($receiver, index, defaultValue) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : defaultValue(index); - } - if (index < 0) { - return defaultValue(index); - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return defaultValue(index); - }, elementAtOrElse_vup1yc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrElse_vup1yc$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : defaultValue(index); - }), elementAtOrNull_cwv5p1$:function($receiver, index) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.getOrNull_3iu80n$($receiver, index); - } - if (index < 0) { - return null; - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return null; - }, elementAtOrNull_3iu80n$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.elementAtOrNull_3iu80n$", function($receiver, index) { - return _.kotlin.collections.getOrNull_3iu80n$($receiver, index); - }), find_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.find_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_udlcbx$", function($receiver, predicate) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - var tmp$1; - tmp$1 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - var element_0 = $receiver.get_za3lpa$(index); - if (predicate(element_0)) { - return element_0; - } - } - return null; - } - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), findLast_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.findLast_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.get_za3lpa$(index); - if (predicate(element)) { - return element; - } - } - return null; - }), first_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.first_a7ptmv$($receiver); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Collection is empty."); - } - return iterator.next(); - } - }, first_a7ptmv$:function($receiver) { - if ($receiver.isEmpty()) { - throw new Kotlin.NoSuchElementException("List is empty."); - } - return $receiver.get_za3lpa$(0); - }, first_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.first_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Collection contains no element matching the predicate."); - }), firstOrNull_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - if ($receiver.isEmpty()) { - return null; - } else { - return $receiver.get_za3lpa$(0); - } - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - return iterator.next(); - } - }, firstOrNull_a7ptmv$:function($receiver) { - return $receiver.isEmpty() ? null : $receiver.get_za3lpa$(0); - }, firstOrNull_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.firstOrNull_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), getOrElse_vup1yc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_vup1yc$", function($receiver, index, defaultValue) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : defaultValue(index); - }), getOrNull_3iu80n$:function($receiver, index) { - return index >= 0 && index <= _.kotlin.collections.get_lastIndex_a7ptmv$($receiver) ? $receiver.get_za3lpa$(index) : null; - }, indexOf_cwuzrm$:function($receiver, element) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.indexOf_za3rmp$(element); - } - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - return index; - } - index++; - } - return-1; - }, indexOf_3iudy2$:function($receiver, element) { - return $receiver.indexOf_za3rmp$(element); - }, indexOfFirst_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_udlcbx$", function($receiver, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - return index; - } - index++; - } - return-1; - }), indexOfFirst_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfFirst_ymzesn$", function($receiver, predicate) { - var tmp$0, tmp$1, tmp$2, tmp$3; - tmp$0 = _.kotlin.collections.get_indices_mwto7b$($receiver), tmp$1 = tmp$0.first, tmp$2 = tmp$0.last, tmp$3 = tmp$0.step; - for (var index = tmp$1;index <= tmp$2;index += tmp$3) { - if (predicate($receiver.get_za3lpa$(index))) { - return index; - } - } - return-1; - }), indexOfLast_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_udlcbx$", function($receiver, predicate) { - var tmp$0; - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }), indexOfLast_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.indexOfLast_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (predicate($receiver.get_za3lpa$(index))) { - return index; - } - } - return-1; - }), last_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.last_a7ptmv$($receiver); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Collection is empty."); - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - } - }, last_a7ptmv$:function($receiver) { - if ($receiver.isEmpty()) { - throw new Kotlin.NoSuchElementException("List is empty."); - } - return $receiver.get_za3lpa$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver)); - }, last_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_udlcbx$", function($receiver, predicate) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - var tmp$2; - tmp$2 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$2.hasNext()) { - var index = tmp$2.next(); - var element_0 = $receiver.get_za3lpa$(index); - if (predicate(element_0)) { - return element_0; - } - } - throw new Kotlin.NoSuchElementException("List contains no element matching the predicate."); - } - var last = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Collection contains no element matching the predicate."); - } - return(tmp$1 = last) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), last_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.last_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.get_za3lpa$(index); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("List contains no element matching the predicate."); - }), lastIndexOf_cwuzrm$:function($receiver, element) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.lastIndexOf_za3rmp$(element); - } - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }, lastIndexOf_3iudy2$:function($receiver, element) { - return $receiver.lastIndexOf_za3rmp$(element); - }, lastOrNull_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.isEmpty() ? null : $receiver.get_za3lpa$($receiver.size - 1); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - } - }, lastOrNull_a7ptmv$:function($receiver) { - return $receiver.isEmpty() ? null : $receiver.get_za3lpa$($receiver.size - 1); - }, lastOrNull_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_udlcbx$", function($receiver, predicate) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - var tmp$1; - tmp$1 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$1.hasNext()) { - var index = tmp$1.next(); - var element_0 = $receiver.get_za3lpa$(index); - if (predicate(element_0)) { - return element_0; - } - } - return null; - } - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), lastOrNull_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.lastOrNull_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.reversed_q5oq31$(_.kotlin.collections.get_indices_mwto7b$($receiver)).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - var element = $receiver.get_za3lpa$(index); - if (predicate(element)) { - return element; - } - } - return null; - }), single_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return _.kotlin.collections.single_a7ptmv$($receiver); - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Collection is empty."); - } - var single = iterator.next(); - if (iterator.hasNext()) { - throw new Kotlin.IllegalArgumentException("Collection has more than one element."); - } - return single; - } - }, single_a7ptmv$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - throw new Kotlin.NoSuchElementException("List is empty."); - } else { - if (tmp$0 === 1) { - tmp$1 = $receiver.get_za3lpa$(0); - } else { - throw new Kotlin.IllegalArgumentException("List has more than one element."); - } - } - return tmp$1; - }, single_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.single_udlcbx$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Collection contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Collection contains no element matching the predicate."); - } - return(tmp$1 = single) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - return $receiver.size === 1 ? $receiver.get_za3lpa$(0) : null; - } else { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var single = iterator.next(); - if (iterator.hasNext()) { - return null; - } - return single; - } - }, singleOrNull_a7ptmv$:function($receiver) { - return $receiver.size === 1 ? $receiver.get_za3lpa$(0) : null; - }, singleOrNull_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.singleOrNull_udlcbx$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_cwv5p1$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var list; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - var resultSize = $receiver.size - n; - if (resultSize <= 0) { - return _.kotlin.collections.emptyList(); - } - list = new Kotlin.ArrayList(resultSize); - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List)) { - tmp$0 = $receiver.size - 1; - for (var index = n;index <= tmp$0;index++) { - list.add_za3rmp$($receiver.get_za3lpa$(index)); - } - return list; - } - } else { - list = new Kotlin.ArrayList; - } - var count = 0; - tmp$1 = $receiver.iterator(); - while (tmp$1.hasNext()) { - var item = tmp$1.next(); - if (count++ >= n) { - list.add_za3rmp$(item); - } - } - return list; - }, dropLast_3iu80n$:function($receiver, n) { - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - return _.kotlin.collections.take_cwv5p1$($receiver, _.kotlin.ranges.coerceAtLeast_rksjo2$($receiver.size - n, 0)); - }, dropLastWhile_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropLastWhile_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.get_za3lpa$(index))) { - return _.kotlin.collections.take_cwv5p1$($receiver, index + 1); - } - } - return _.kotlin.collections.emptyList(); - }), dropWhile_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.dropWhile_udlcbx$", function($receiver, predicate) { - var tmp$0; - var yielding = false; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (yielding) { - list.add_za3rmp$(item); - } else { - if (!predicate(item)) { - list.add_za3rmp$(item); - yielding = true; - } - } - } - return list; - }), filter_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_udlcbx$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterIndexed_6wagxu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexed_6wagxu$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterIndexedTo_ej6hz7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterIndexedTo_ej6hz7$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterNot_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_udlcbx$", function($receiver, predicate) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterNotNull_q5oq31$:function($receiver) { - return _.kotlin.collections.filterNotNullTo_xc5ofo$($receiver, new Kotlin.ArrayList); - }, filterNotNullTo_xc5ofo$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element != null) { - destination.add_za3rmp$(element); - } - } - return destination; - }, filterNotTo_u1o9so$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_u1o9so$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_u1o9so$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_u1o9so$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), slice_smmin4$:function($receiver, indices) { - if (indices.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - return _.kotlin.collections.toList_q5oq31$($receiver.subList_vux9f0$(indices.start, indices.endInclusive + 1)); - }, slice_5fse6p$:function($receiver, indices) { - var tmp$0; - var size = _.kotlin.collections.collectionSizeOrDefault(indices, 10); - if (size === 0) { - return _.kotlin.collections.emptyList(); - } - var list = new Kotlin.ArrayList(size); - tmp$0 = indices.iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - list.add_za3rmp$($receiver.get_za3lpa$(index)); - } - return list; - }, take_cwv5p1$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) && n >= $receiver.size) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var count = 0; - var list = new Kotlin.ArrayList(n); - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (count++ === n) { - break; - } - list.add_za3rmp$(item); - } - return list; - }, takeLast_3iu80n$:function($receiver, n) { - var tmp$0, tmp$1; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - return _.kotlin.collections.emptyList(); - } - var size = $receiver.size; - if (n >= size) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var list = new Kotlin.ArrayList(n); - tmp$0 = size - n; - tmp$1 = size - 1; - for (var index = tmp$0;index <= tmp$1;index++) { - list.add_za3rmp$($receiver.get_za3lpa$(index)); - } - return list; - }, takeLastWhile_ymzesn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeLastWhile_ymzesn$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver), 0).iterator(); - while (tmp$0.hasNext()) { - var index = tmp$0.next(); - if (!predicate($receiver.get_za3lpa$(index))) { - return _.kotlin.collections.drop_cwv5p1$($receiver, index + 1); - } - } - return _.kotlin.collections.toList_q5oq31$($receiver); - }), takeWhile_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.takeWhile_udlcbx$", function($receiver, predicate) { - var tmp$0; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (!predicate(item)) { - break; - } - list.add_za3rmp$(item); - } - return list; - }), reverse_sqtfhv$:function($receiver) { - _.java.util.Collections.reverse_heioe9$($receiver); - }, reversed_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) && $receiver.isEmpty()) { - return _.kotlin.collections.emptyList(); - } - var list = _.kotlin.collections.toMutableList_q5oq31$($receiver); - _.java.util.Collections.reverse_heioe9$(list); - return list; - }, sortBy_an8rl9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortBy_an8rl9$", function($receiver, selector) { - if ($receiver.size > 1) { - _.kotlin.collections.sortWith_lcufbu$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - } - }), sortByDescending_an8rl9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortByDescending_an8rl9$", function($receiver, selector) { - if ($receiver.size > 1) { - _.kotlin.collections.sortWith_lcufbu$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - } - }), sortDescending_h06zi1$:function($receiver) { - _.kotlin.collections.sortWith_lcufbu$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sorted_349qs3$:function($receiver) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - if ($receiver.size <= 1) { - return _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - var $receiver_0 = Array.isArray(tmp$0 = Kotlin.copyToArray($receiver)) ? tmp$0 : Kotlin.throwCCE(); - _.kotlin.collections.sort_ehvuiv$($receiver_0); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - } - var $receiver_1 = _.kotlin.collections.toMutableList_q5oq31$($receiver); - _.kotlin.collections.sort_h06zi1$($receiver_1); - return $receiver_1; - }, sortedBy_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedBy_l82ugp$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_7dpn5g$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedByDescending_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sortedByDescending_l82ugp$", function($receiver, selector) { - return _.kotlin.collections.sortedWith_7dpn5g$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedDescending_349qs3$:function($receiver) { - return _.kotlin.collections.sortedWith_7dpn5g$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortedWith_7dpn5g$:function($receiver, comparator) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - if ($receiver.size <= 1) { - return _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - var $receiver_0 = Array.isArray(tmp$0 = Kotlin.copyToArray($receiver)) ? tmp$0 : Kotlin.throwCCE(); - _.kotlin.collections.sortWith_pf0rc$($receiver_0, comparator); - return _.kotlin.collections.asList_eg9ybj$($receiver_0); - } - var $receiver_1 = _.kotlin.collections.toMutableList_q5oq31$($receiver); - _.kotlin.collections.sortWith_lcufbu$($receiver_1, comparator); - return $receiver_1; - }, toBooleanArray_82yf0d$:function($receiver) { - var tmp$0; - var result = Kotlin.booleanArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toByteArray_lg9v1$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toCharArray_stj23$:function($receiver) { - var tmp$0; - var result = Kotlin.charArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toDoubleArray_d8u8cq$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toFloatArray_2vwy1$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toIntArray_n17x8q$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toLongArray_56arfl$:function($receiver) { - var tmp$0; - var result = Kotlin.longArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toShortArray_o8y0rt$:function($receiver) { - var tmp$0; - var result = Kotlin.numberArrayOfSize($receiver.size); - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, associate_l9f2x3$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associate_l9f2x3$", function($receiver, transform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_fcza0h$", function($receiver, keySelector) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_qadzix$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateBy_qadzix$", function($receiver, keySelector, valueTransform) { - var capacity = _.kotlin.ranges.coerceAtLeast_rksjo2$(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)), 16); - var destination = new Kotlin.LinkedHashMap(capacity); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_57hlw1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_57hlw1$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_8dch1j$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateByTo_8dch1j$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_j5xf4p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.associateTo_j5xf4p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_xc5ofo$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_q5oq31$:function($receiver) { - return _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.ComplexHashSet(_.kotlin.collections.mapCapacity(_.kotlin.collections.collectionSizeOrDefault($receiver, 12)))); - }, toList_q5oq31$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.listOf_za3rmp$(Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? $receiver.get_za3lpa$(0) : $receiver.iterator().next()); - } else { - tmp$1 = _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - } - return tmp$1; - } - return _.kotlin.collections.optimizeReadOnlyList(_.kotlin.collections.toMutableList_q5oq31$($receiver)); - }, toMutableList_q5oq31$:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.toMutableList_mwto7b$($receiver); - } - return _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.ArrayList); - }, toMutableList_mwto7b$:function($receiver) { - return _.java.util.ArrayList_wtfk93$($receiver); - }, toSet_q5oq31$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.setOf_za3rmp$(Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? $receiver.get_za3lpa$(0) : $receiver.iterator().next()); - } else { - tmp$1 = _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size))); - } - } - return tmp$1; - } - return _.kotlin.collections.optimizeReadOnlySet(_.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.LinkedHashSet)); - }, flatMap_pwhhp2$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_pwhhp2$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_k30zm7$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_k30zm7$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), groupBy_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_fcza0h$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_qadzix$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupBy_qadzix$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_i7ktse$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_i7ktse$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_t445s6$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.groupByTo_t445s6$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_fcza0h$", function($receiver, transform) { - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)); - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapIndexed_kgzjie$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexed_kgzjie$", function($receiver, transform) { - var destination = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)); - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapIndexedNotNull_kgzjie$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNull_kgzjie$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedNotNullTo_9rrt4x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedNotNullTo_9rrt4x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedTo_9rrt4x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapIndexedTo_9rrt4x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNull_fcza0h$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapNotNullTo_nzn0z0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNullTo_nzn0z0$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_nzn0z0$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_nzn0z0$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_q5oq31$f:function(this$withIndex) { - return function() { - return this$withIndex.iterator(); - }; - }, withIndex_q5oq31$:function($receiver) { - return new _.kotlin.collections.IndexingIterable(_.kotlin.collections.withIndex_q5oq31$f($receiver)); - }, distinct_q5oq31$:function($receiver) { - return _.kotlin.collections.toList_q5oq31$(_.kotlin.collections.toMutableSet_q5oq31$($receiver)); - }, distinctBy_fcza0h$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.distinctBy_fcza0h$", function($receiver, selector) { - var tmp$0; - var set = new Kotlin.ComplexHashSet; - var list = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var e = tmp$0.next(); - var key = selector(e); - if (set.add_za3rmp$(key)) { - list.add_za3rmp$(e); - } - } - return list; - }), intersect_71wgqg$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_q5oq31$($receiver); - _.kotlin.collections.retainAll_fwwv5a$(set, other); - return set; - }, subtract_71wgqg$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_q5oq31$($receiver); - _.kotlin.collections.removeAll_fwwv5a$(set, other); - return set; - }, toMutableSet_q5oq31$:function($receiver) { - var tmp$0; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = _.java.util.LinkedHashSet_wtfk93$($receiver); - } else { - tmp$0 = _.kotlin.collections.toCollection_xc5ofo$($receiver, new Kotlin.LinkedHashSet); - } - return tmp$0; - }, union_71wgqg$:function($receiver, other) { - var set = _.kotlin.collections.toMutableSet_q5oq31$($receiver); - _.kotlin.collections.addAll_fwwv5a$(set, other); - return set; - }, all_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_q5oq31$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_q5oq31$:function($receiver) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - count++; - } - return count; - }, count_mwto7b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_mwto7b$", function($receiver) { - return $receiver.size; - }), count_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_udlcbx$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_x36ydg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.fold_x36ydg$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_a212pb$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldIndexed_a212pb$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), foldRight_18gea8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRight_18gea8$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation($receiver.get_za3lpa$(index--), accumulator); - } - return accumulator; - }), foldRightIndexed_77874r$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.foldRightIndexed_77874r$", function($receiver, initial, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - var accumulator = initial; - while (index >= 0) { - accumulator = operation(index, $receiver.get_za3lpa$(index), accumulator); - --index; - } - return accumulator; - }), forEach_lcecrh$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_lcecrh$", function($receiver, action) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_4yeaaa$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEachIndexed_4yeaaa$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_349qs3$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(max, e) < 0) { - max = e; - } - } - return max; - }, maxBy_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_l82ugp$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var maxElem = iterator.next(); - var maxValue = selector(maxElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_7dpn5g$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_349qs3$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(min, e) > 0) { - min = e; - } - } - return min; - }, minBy_l82ugp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_l82ugp$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var minElem = iterator.next(); - var minValue = selector(minElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_7dpn5g$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_q5oq31$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_udlcbx$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_fsnvh9$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduce_fsnvh9$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty collection can't be reduced."); - } - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(accumulator, iterator.next()); - } - return accumulator; - }), reduceIndexed_3edsso$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceIndexed_3edsso$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty collection can't be reduced."); - } - var index = 1; - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(index++, accumulator, iterator.next()); - } - return accumulator; - }), reduceRight_mue0zz$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRight_mue0zz$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty list can't be reduced."); - } - var accumulator = $receiver.get_za3lpa$(index--); - while (index >= 0) { - accumulator = operation($receiver.get_za3lpa$(index--), accumulator); - } - return accumulator; - }), reduceRightIndexed_4tyq1o$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.reduceRightIndexed_4tyq1o$", function($receiver, operation) { - var index = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - if (index < 0) { - throw new Kotlin.UnsupportedOperationException("Empty list can't be reduced."); - } - var accumulator = $receiver.get_za3lpa$(index--); - while (index >= 0) { - accumulator = operation(index, $receiver.get_za3lpa$(index), accumulator); - --index; - } - return accumulator; - }), sumBy_fcu68k$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumBy_fcu68k$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_jaowxc$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.sumByDouble_jaowxc$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), requireNoNulls_q5oq31$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + $receiver + "."); - } - } - return Kotlin.isType(tmp$1 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Iterable) ? tmp$1 : Kotlin.throwCCE(); - }, requireNoNulls_a7ptmv$:function($receiver) { - var tmp$0, tmp$1; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + $receiver + "."); - } - } - return Kotlin.isType(tmp$1 = $receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? tmp$1 : Kotlin.throwCCE(); - }, minus_cwuzrm$:function($receiver, element) { - var result = new Kotlin.ArrayList(_.kotlin.collections.collectionSizeOrDefault($receiver, 10)); - var removed = {v:false}; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element_0 = tmp$0.next(); - var minus_cwuzrm$f$result; - if (!removed.v && Kotlin.equals(element_0, element)) { - removed.v = true; - minus_cwuzrm$f$result = false; - } else { - minus_cwuzrm$f$result = true; - } - if (minus_cwuzrm$f$result) { - result.add_za3rmp$(element_0); - } - } - return result; - }, minus_uspeym$:function($receiver, elements) { - if (elements.length === 0) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var other = _.kotlin.collections.toHashSet_eg9ybj$(elements); - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }, minus_71wgqg$:function($receiver, elements) { - var other = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - if (other.isEmpty()) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }, minus_81az5y$:function($receiver, elements) { - var other = _.kotlin.sequences.toHashSet_uya9q7$(elements); - if (other.isEmpty()) { - return _.kotlin.collections.toList_q5oq31$($receiver); - } - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }, minusElement_cwuzrm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusElement_cwuzrm$", function($receiver, element) { - return _.kotlin.collections.minus_cwuzrm$($receiver, element); - }), partition_udlcbx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.partition_udlcbx$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), plus_cwuzrm$:function($receiver, element) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.plus_ukps2u$($receiver, element); - } - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - result.add_za3rmp$(element); - return result; - }, plus_ukps2u$:function($receiver, element) { - var result = new Kotlin.ArrayList($receiver.size + 1); - result.addAll_wtfk93$($receiver); - result.add_za3rmp$(element); - return result; - }, plus_uspeym$:function($receiver, elements) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.plus_b3ixii$($receiver, elements); - } - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - _.kotlin.collections.addAll_jzhv38$(result, elements); - return result; - }, plus_b3ixii$:function($receiver, elements) { - var result = new Kotlin.ArrayList($receiver.size + elements.length); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_jzhv38$(result, elements); - return result; - }, plus_71wgqg$:function($receiver, elements) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.plus_hfjk0c$($receiver, elements); - } - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - _.kotlin.collections.addAll_fwwv5a$(result, elements); - return result; - }, plus_hfjk0c$:function($receiver, elements) { - if (Kotlin.isType(elements, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - var result = new Kotlin.ArrayList($receiver.size + elements.size); - result.addAll_wtfk93$($receiver); - result.addAll_wtfk93$(elements); - return result; - } else { - var result_0 = _.java.util.ArrayList_wtfk93$($receiver); - _.kotlin.collections.addAll_fwwv5a$(result_0, elements); - return result_0; - } - }, plus_81az5y$:function($receiver, elements) { - var result = new Kotlin.ArrayList; - _.kotlin.collections.addAll_fwwv5a$(result, $receiver); - _.kotlin.collections.addAll_h3qeu8$(result, elements); - return result; - }, plus_9axfq2$:function($receiver, elements) { - var result = new Kotlin.ArrayList($receiver.size + 10); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_h3qeu8$(result, elements); - return result; - }, plusElement_cwuzrm$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_cwuzrm$", function($receiver, element) { - return _.kotlin.collections.plus_cwuzrm$($receiver, element); - }), plusElement_ukps2u$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_ukps2u$", function($receiver, element) { - return _.kotlin.collections.plus_ukps2u$($receiver, element); - }), zip_uspeym$:function($receiver, other) { - var tmp$0; - var arraySize = other.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), arraySize)); - var i = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(_.kotlin.to_l1ob02$(element, other[i++])); - } - return list; - }, zip_6hx15g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_6hx15g$", function($receiver, other, transform) { - var tmp$0; - var arraySize = other.length; - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), arraySize)); - var i = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (i >= arraySize) { - break; - } - list.add_za3rmp$(transform(element, other[i++])); - } - return list; - }), zip_71wgqg$:function($receiver, other) { - var first = $receiver.iterator(); - var second = other.iterator(); - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), _.kotlin.collections.collectionSizeOrDefault(other, 10))); - while (first.hasNext() && second.hasNext()) { - list.add_za3rmp$(_.kotlin.to_l1ob02$(first.next(), second.next())); - } - return list; - }, zip_aqs41e$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.zip_aqs41e$", function($receiver, other, transform) { - var first = $receiver.iterator(); - var second = other.iterator(); - var list = new Kotlin.ArrayList(Math.min(_.kotlin.collections.collectionSizeOrDefault($receiver, 10), _.kotlin.collections.collectionSizeOrDefault(other, 10))); - while (first.hasNext() && second.hasNext()) { - list.add_za3rmp$(transform(first.next(), second.next())); - } - return list; - }), joinTo_euycuk$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element == null ? "null" : element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinToString_ld60a2$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.collections.joinTo_euycuk$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, asIterable_q5oq31$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asIterable_q5oq31$", function($receiver) { - return $receiver; - }), asSequence_q5oq31$f:function(this$asSequence) { - return function() { - return this$asSequence.iterator(); - }; - }, asSequence_q5oq31$:function($receiver) { - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_q5oq31$f($receiver)); - }, average_sx0vjz$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_fr8z0d$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_q1ah1m$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_oc6dzf$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_8et4tf$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_y4pxme$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, sum_sx0vjz$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_fr8z0d$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_q1ah1m$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_oc6dzf$:function($receiver) { - var tmp$0; - var sum = Kotlin.Long.ZERO; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum = sum.add(element); - } - return sum; - }, sum_8et4tf$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_y4pxme$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, toList_efxzmg$:function($receiver) { - if ($receiver.size === 0) { - return _.kotlin.collections.emptyList(); - } - var iterator = $receiver.entries.iterator(); - if (!iterator.hasNext()) { - return _.kotlin.collections.emptyList(); - } - var first = iterator.next(); - if (!iterator.hasNext()) { - return _.kotlin.collections.listOf_za3rmp$(new _.kotlin.Pair(first.key, first.value)); - } - var result = new Kotlin.ArrayList($receiver.size); - result.add_za3rmp$(new _.kotlin.Pair(first.key, first.value)); - do { - var $receiver_0 = iterator.next(); - result.add_za3rmp$(new _.kotlin.Pair($receiver_0.key, $receiver_0.value)); - } while (iterator.hasNext()); - return result; - }, flatMap_yh70lg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMap_yh70lg$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), flatMapTo_5n3275$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.flatMapTo_5n3275$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_fwwv5a$(destination, list); - } - return destination; - }), map_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.map_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.ArrayList($receiver.size); - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), mapNotNull_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNull_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.ArrayList; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapNotNullTo_v1ibx8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapNotNullTo_v1ibx8$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_v1ibx8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapTo_v1ibx8$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), all_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.all_oixulp$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_efxzmg$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.any_oixulp$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_efxzmg$", function($receiver) { - return $receiver.size; - }), count_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.count_oixulp$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), forEach_8umwe5$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_8umwe5$", function($receiver, action) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), maxBy_dubjrn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxBy_dubjrn$", function($receiver, selector) { - var iterator = $receiver.entries.iterator(); - if (!iterator.hasNext()) { - return null; - } - var maxElem = iterator.next(); - var maxValue = selector(maxElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_9gigyu$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.maxWith_9gigyu$", function($receiver, comparator) { - return _.kotlin.collections.maxWith_7dpn5g$($receiver.entries, comparator); - }), minBy_dubjrn$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minBy_dubjrn$", function($receiver, selector) { - var iterator = $receiver.entries.iterator(); - if (!iterator.hasNext()) { - return null; - } - var minElem = iterator.next(); - var minValue = selector(minElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_9gigyu$:function($receiver, comparator) { - return _.kotlin.collections.minWith_7dpn5g$($receiver.entries, comparator); - }, none_efxzmg$:function($receiver) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.none_oixulp$", function($receiver, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), asIterable_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.asIterable_efxzmg$", function($receiver) { - return $receiver.entries; - }), asSequence_efxzmg$f:function(this$asSequence) { - return function() { - return this$asSequence.entries.iterator(); - }; - }, asSequence_efxzmg$:function($receiver) { - return new _.kotlin.sequences.Sequence$f(_.kotlin.collections.asSequence_efxzmg$f($receiver)); - }, minus_bfnyky$:function($receiver, element) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size)); - var removed = {v:false}; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element_0 = tmp$0.next(); - var minus_bfnyky$f$result; - if (!removed.v && Kotlin.equals(element_0, element)) { - removed.v = true; - minus_bfnyky$f$result = false; - } else { - minus_bfnyky$f$result = true; - } - if (minus_bfnyky$f$result) { - result.add_za3rmp$(element_0); - } - } - return result; - }, minus_bs0yn6$:function($receiver, elements) { - var result = _.java.util.LinkedHashSet_wtfk93$($receiver); - _.kotlin.collections.removeAll_jzhv38$(result, elements); - return result; - }, minus_rp2n1o$:function($receiver, elements) { - var other = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - if (other.isEmpty()) { - return _.kotlin.collections.toSet_q5oq31$($receiver); - } - if (Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.Set)) { - var destination = new Kotlin.LinkedHashSet; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!other.contains_za3rmp$(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - } - var result = _.java.util.LinkedHashSet_wtfk93$($receiver); - result.removeAll_wtfk93$(other); - return result; - }, minus_w7ip9a$:function($receiver, elements) { - var result = _.java.util.LinkedHashSet_wtfk93$($receiver); - _.kotlin.collections.removeAll_h3qeu8$(result, elements); - return result; - }, minusElement_bfnyky$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusElement_bfnyky$", function($receiver, element) { - return _.kotlin.collections.minus_bfnyky$($receiver, element); - }), plus_bfnyky$:function($receiver, element) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size + 1)); - result.addAll_wtfk93$($receiver); - result.add_za3rmp$(element); - return result; - }, plus_bs0yn6$:function($receiver, elements) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size + elements.length)); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_jzhv38$(result, elements); - return result; - }, plus_rp2n1o$:function($receiver, elements) { - var tmp$0, tmp$1; - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity((tmp$1 = (tmp$0 = _.kotlin.collections.collectionSizeOrNull(elements)) != null ? $receiver.size + tmp$0 : null) != null ? tmp$1 : $receiver.size * 2)); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_fwwv5a$(result, elements); - return result; - }, plus_w7ip9a$:function($receiver, elements) { - var result = new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity($receiver.size * 2)); - result.addAll_wtfk93$($receiver); - _.kotlin.collections.addAll_h3qeu8$(result, elements); - return result; - }, plusElement_bfnyky$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusElement_bfnyky$", function($receiver, element) { - return _.kotlin.collections.plus_bfnyky$($receiver, element); - }), State:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{Ready:function() { - return new _.kotlin.collections.State; - }, NotReady:function() { - return new _.kotlin.collections.State; - }, Done:function() { - return new _.kotlin.collections.State; - }, Failed:function() { - return new _.kotlin.collections.State; - }}; - }), AbstractIterator:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function() { - this.state_v5kh2x$ = _.kotlin.collections.State.NotReady; - this.nextValue_tlc62$ = null; - }, {hasNext:function() { - var tmp$0, tmp$1; - if (!(this.state_v5kh2x$ !== _.kotlin.collections.State.Failed)) { - var message = "Failed requirement."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - tmp$0 = this.state_v5kh2x$; - if (tmp$0 === _.kotlin.collections.State.Done) { - tmp$1 = false; - } else { - if (tmp$0 === _.kotlin.collections.State.Ready) { - tmp$1 = true; - } else { - tmp$1 = this.tryToComputeNext(); - } - } - return tmp$1; - }, next:function() { - var tmp$0; - if (!this.hasNext()) { - throw new Kotlin.NoSuchElementException; - } - this.state_v5kh2x$ = _.kotlin.collections.State.NotReady; - return(tmp$0 = this.nextValue_tlc62$) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }, tryToComputeNext:function() { - this.state_v5kh2x$ = _.kotlin.collections.State.Failed; - this.computeNext(); - return this.state_v5kh2x$ === _.kotlin.collections.State.Ready; - }, setNext_za3rmp$:function(value) { - this.nextValue_tlc62$ = value; - this.state_v5kh2x$ = _.kotlin.collections.State.Ready; - }, done:function() { - this.state_v5kh2x$ = _.kotlin.collections.State.Done; - }}), flatten_vrdqc4$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var tmp$5, tmp$3, tmp$4; - var sum = 0; - tmp$5 = $receiver, tmp$3 = tmp$5.length; - for (var tmp$4 = 0;tmp$4 !== tmp$3;++tmp$4) { - var element_0 = tmp$5[tmp$4]; - sum += element_0.length; - } - var result = new Kotlin.ArrayList(sum); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - _.kotlin.collections.addAll_jzhv38$(result, element); - } - return result; - }, unzip_sq63gn$:function($receiver) { - var tmp$0, tmp$1, tmp$2; - var listT = new Kotlin.ArrayList($receiver.length); - var listR = new Kotlin.ArrayList($receiver.length); - tmp$0 = $receiver, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var pair = tmp$0[tmp$2]; - listT.add_za3rmp$(pair.first); - listR.add_za3rmp$(pair.second); - } - return _.kotlin.to_l1ob02$(listT, listR); - }, EmptyIterator:Kotlin.createObject(function() { - return[Kotlin.modules["builtins"].kotlin.collections.ListIterator]; - }, null, {hasNext:function() { - return false; - }, hasPrevious:function() { - return false; - }, nextIndex:function() { - return 0; - }, previousIndex:function() { - return-1; - }, next:function() { - throw new Kotlin.NoSuchElementException; - }, previous:function() { - throw new Kotlin.NoSuchElementException; - }}), EmptyList:Kotlin.createObject(function() { - return[Kotlin.RandomAccess, _.java.io.Serializable, Kotlin.modules["builtins"].kotlin.collections.List]; - }, function() { - this.serialVersionUID_jwftuz$ = new Kotlin.Long(-1478467534, -1720727600); - }, {equals_za3rmp$:function(other) { - return Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.List) && other.isEmpty(); - }, hashCode:function() { - return 1; - }, toString:function() { - return "[]"; - }, size:{get:function() { - return 0; - }}, isEmpty:function() { - return true; - }, contains_za3rmp$:function(element) { - return false; - }, containsAll_wtfk93$:function(elements) { - return elements.isEmpty(); - }, get_za3lpa$:function(index) { - throw new Kotlin.IndexOutOfBoundsException("Empty list doesn't contain element at index " + index + "."); - }, indexOf_za3rmp$:function(element) { - return-1; - }, lastIndexOf_za3rmp$:function(element) { - return-1; - }, iterator:function() { - return _.kotlin.collections.EmptyIterator; - }, listIterator:function() { - return _.kotlin.collections.EmptyIterator; - }, listIterator_za3lpa$:function(index) { - if (index !== 0) { - throw new Kotlin.IndexOutOfBoundsException("Index: " + index); - } - return _.kotlin.collections.EmptyIterator; - }, subList_vux9f0$:function(fromIndex, toIndex) { - if (fromIndex === 0 && toIndex === 0) { - return this; - } - throw new Kotlin.IndexOutOfBoundsException("fromIndex: " + fromIndex + ", toIndex: " + toIndex); - }, readResolve:function() { - return _.kotlin.collections.EmptyList; - }}), asCollection:function($receiver) { - return new _.kotlin.collections.ArrayAsCollection($receiver, false); - }, ArrayAsCollection:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Collection]; - }, function(values, isVarargs) { - this.values = values; - this.isVarargs = isVarargs; - }, {size:{get:function() { - return this.values.length; - }}, isEmpty:function() { - return this.values.length === 0; - }, contains_za3rmp$:function(element) { - return _.kotlin.collections.contains_ke19y6$(this.values, element); - }, containsAll_wtfk93$:function(elements) { - var tmp$0; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!this.contains_za3rmp$(element)) { - return false; - } - } - return true; - }, iterator:function() { - return Kotlin.arrayIterator(this.values); - }, toArray:function() { - return this.isVarargs ? this.values : this.values.slice(); - }}, {}), emptyList:function() { - return _.kotlin.collections.EmptyList; - }, listOf_9mqe4v$:function(elements) { - return elements.length > 0 ? _.kotlin.collections.asList_eg9ybj$(elements) : _.kotlin.collections.emptyList(); - }, listOf:Kotlin.defineInlineFunction("stdlib.kotlin.collections.listOf", function() { - return _.kotlin.collections.emptyList(); - }), mutableListOf_9mqe4v$:function(elements) { - return elements.length === 0 ? new Kotlin.ArrayList : _.java.util.ArrayList_wtfk93$(new _.kotlin.collections.ArrayAsCollection(elements, true)); - }, arrayListOf_9mqe4v$:function(elements) { - return elements.length === 0 ? new Kotlin.ArrayList : _.java.util.ArrayList_wtfk93$(new _.kotlin.collections.ArrayAsCollection(elements, true)); - }, listOfNotNull_za3rmp$:function(element) { - return element != null ? _.kotlin.collections.listOf_za3rmp$(element) : _.kotlin.collections.emptyList(); - }, listOfNotNull_9mqe4v$:function(elements) { - return _.kotlin.collections.filterNotNull_eg9ybj$(elements); - }, get_indices_mwto7b$:{value:function($receiver) { - return new Kotlin.NumberRange(0, $receiver.size - 1); - }}, get_lastIndex_a7ptmv$:{value:function($receiver) { - return $receiver.size - 1; - }}, isNotEmpty_mwto7b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_mwto7b$", function($receiver) { - return!$receiver.isEmpty(); - }), orEmpty_mwto7b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_mwto7b$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptyList(); - }), orEmpty_a7ptmv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_a7ptmv$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptyList(); - }), containsAll_2px7j4$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.containsAll_2px7j4$", function($receiver, elements) { - return $receiver.containsAll_wtfk93$(elements); - }), optimizeReadOnlyList:function($receiver) { - var tmp$0; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - return _.kotlin.collections.emptyList(); - } else { - if (tmp$0 === 1) { - return _.kotlin.collections.listOf_za3rmp$($receiver.get_za3lpa$(0)); - } else { - return $receiver; - } - } - }, binarySearch_i1wy23$:function($receiver, element, fromIndex, toIndex) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - _.kotlin.collections.rangeCheck($receiver.size, fromIndex, toIndex); - var low = fromIndex; - var high = toIndex - 1; - while (low <= high) { - var mid = low + high >>> 1; - var midVal = $receiver.get_za3lpa$(mid); - var cmp = _.kotlin.comparisons.compareValues_cj5vqg$(midVal, element); - if (cmp < 0) { - low = mid + 1; - } else { - if (cmp > 0) { - high = mid - 1; - } else { - return mid; - } - } - } - return-(low + 1); - }, binarySearch_1open$:function($receiver, element, comparator, fromIndex, toIndex) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - _.kotlin.collections.rangeCheck($receiver.size, fromIndex, toIndex); - var low = fromIndex; - var high = toIndex - 1; - while (low <= high) { - var mid = low + high >>> 1; - var midVal = $receiver.get_za3lpa$(mid); - var cmp = comparator.compare(midVal, element); - if (cmp < 0) { - low = mid + 1; - } else { - if (cmp > 0) { - high = mid - 1; - } else { - return mid; - } - } - } - return-(low + 1); - }, binarySearchBy_uuu8x$f:function(closure$selector, closure$key) { - return function(it) { - return _.kotlin.comparisons.compareValues_cj5vqg$(closure$selector(it), closure$key); - }; - }, binarySearchBy_uuu8x$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.binarySearchBy_uuu8x$", function($receiver, key, fromIndex, toIndex, selector) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - return _.kotlin.collections.binarySearch_e4ogxs$($receiver, fromIndex, toIndex, _.kotlin.collections.binarySearchBy_uuu8x$f(selector, key)); - }), binarySearch_e4ogxs$:function($receiver, fromIndex, toIndex, comparison) { - if (fromIndex === void 0) { - fromIndex = 0; - } - if (toIndex === void 0) { - toIndex = $receiver.size; - } - _.kotlin.collections.rangeCheck($receiver.size, fromIndex, toIndex); - var low = fromIndex; - var high = toIndex - 1; - while (low <= high) { - var mid = low + high >>> 1; - var midVal = $receiver.get_za3lpa$(mid); - var cmp = comparison(midVal); - if (cmp < 0) { - low = mid + 1; - } else { - if (cmp > 0) { - high = mid - 1; - } else { - return mid; - } - } - } - return-(low + 1); - }, rangeCheck:function(size, fromIndex, toIndex) { - if (fromIndex > toIndex) { - throw new Kotlin.IllegalArgumentException("fromIndex (" + fromIndex + ") is greater than toIndex (" + toIndex + ")."); - } else { - if (fromIndex < 0) { - throw new Kotlin.IndexOutOfBoundsException("fromIndex (" + fromIndex + ") is less than zero."); - } else { - if (toIndex > size) { - throw new Kotlin.IndexOutOfBoundsException("toIndex (" + toIndex + ") is greater than size (" + size + ")."); - } - } - } - }, IndexedValue:Kotlin.createClass(null, function(index, value) { - this.index = index; - this.value = value; - }, {component1:function() { - return this.index; - }, component2:function() { - return this.value; - }, copy_vux3hl$:function(index, value) { - return new _.kotlin.collections.IndexedValue(index === void 0 ? this.index : index, value === void 0 ? this.value : value); - }, toString:function() { - return "IndexedValue(index\x3d" + Kotlin.toString(this.index) + (", value\x3d" + Kotlin.toString(this.value)) + ")"; - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.index) | 0; - result = result * 31 + Kotlin.hashCode(this.value) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.index, other.index) && Kotlin.equals(this.value, other.value)))); - }}), Iterable$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(closure$iterator_0) { - this.closure$iterator_0 = closure$iterator_0; - }, {iterator:function() { - return this.closure$iterator_0(); - }}, {}), Iterable_kxhynv$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.Iterable_kxhynv$", function(iterator) { - return new _.kotlin.collections.Iterable$f(iterator); - }), IndexingIterable:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(iteratorFactory) { - this.iteratorFactory_fvkcba$ = iteratorFactory; - }, {iterator:function() { - return new _.kotlin.collections.IndexingIterator(this.iteratorFactory_fvkcba$()); - }}), collectionSizeOrNull:function($receiver) { - return Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) ? $receiver.size : null; - }, collectionSizeOrDefault:function($receiver, default_0) { - return Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection) ? $receiver.size : default_0; - }, safeToConvertToSet:function($receiver) { - return $receiver.size > 2 && Kotlin.isType($receiver, Kotlin.ArrayList); - }, convertToSetForSetOperationWith:function($receiver, source) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Set)) { - return $receiver; - } else { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - if (Kotlin.isType(source, Kotlin.modules["builtins"].kotlin.collections.Collection) && source.size < 2) { - return $receiver; - } else { - return _.kotlin.collections.safeToConvertToSet($receiver) ? _.kotlin.collections.toHashSet_q5oq31$($receiver) : $receiver; - } - } else { - return _.kotlin.collections.toHashSet_q5oq31$($receiver); - } - } - }, convertToSetForSetOperation:function($receiver) { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Set)) { - return $receiver; - } else { - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return _.kotlin.collections.safeToConvertToSet($receiver) ? _.kotlin.collections.toHashSet_q5oq31$($receiver) : $receiver; - } else { - return _.kotlin.collections.toHashSet_q5oq31$($receiver); - } - } - }, flatten_ryy49w$:function($receiver) { - var tmp$0; - var result = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.addAll_fwwv5a$(result, element); - } - return result; - }, unzip_mnrzhp$:function($receiver) { - var tmp$0; - var expectedSize = _.kotlin.collections.collectionSizeOrDefault($receiver, 10); - var listT = new Kotlin.ArrayList(expectedSize); - var listR = new Kotlin.ArrayList(expectedSize); - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var pair = tmp$0.next(); - listT.add_za3rmp$(pair.first); - listR.add_za3rmp$(pair.second); - } - return _.kotlin.to_l1ob02$(listT, listR); - }, iterator_123wqf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.iterator_123wqf$", function($receiver) { - return $receiver; - }), withIndex_123wqf$:function($receiver) { - return new _.kotlin.collections.IndexingIterator($receiver); - }, forEach_3ydtzt$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.forEach_3ydtzt$", function($receiver, operation) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_123wqf$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - operation(element); - } - }), IndexingIterator:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(iterator) { - this.iterator_qhnuqw$ = iterator; - this.index_9l0vtk$ = 0; - }, {hasNext:function() { - return this.iterator_qhnuqw$.hasNext(); - }, next:function() { - return new _.kotlin.collections.IndexedValue(this.index_9l0vtk$++, this.iterator_qhnuqw$.next()); - }}), getValue_lromyx$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getValue_lromyx$", function($receiver, thisRef, property) { - var tmp$0; - return(tmp$0 = _.kotlin.collections.getOrImplicitDefault($receiver, property.name)) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }), getValue_pmw3g1$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getValue_pmw3g1$", function($receiver, thisRef, property) { - var tmp$0; - return(tmp$0 = _.kotlin.collections.getOrImplicitDefault($receiver, property.name)) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }), setValue_vfsqka$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.setValue_vfsqka$", function($receiver, thisRef, property, value) { - $receiver.put_wn2jw4$(property.name, value); - }), getOrImplicitDefault:function($receiver, key) { - if (Kotlin.isType($receiver, _.kotlin.collections.MapWithDefault)) { - return $receiver.getOrImplicitDefault_za3rmp$(key); - } - var tmp$0; - var value = $receiver.get_za3rmp$(key); - if (value == null && !$receiver.containsKey_za3rmp$(key)) { - throw new Kotlin.NoSuchElementException("Key " + key + " is missing in the map."); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }, withDefault_86p62k$:function($receiver, defaultValue) { - if (Kotlin.isType($receiver, _.kotlin.collections.MapWithDefault)) { - return _.kotlin.collections.withDefault_86p62k$($receiver.map, defaultValue); - } else { - return new _.kotlin.collections.MapWithDefaultImpl($receiver, defaultValue); - } - }, withDefault_g6ll1e$:function($receiver, defaultValue) { - if (Kotlin.isType($receiver, _.kotlin.collections.MutableMapWithDefault)) { - return _.kotlin.collections.withDefault_g6ll1e$($receiver.map, defaultValue); - } else { - return new _.kotlin.collections.MutableMapWithDefaultImpl($receiver, defaultValue); - } - }, MapWithDefault:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Map]; - }), MutableMapWithDefault:Kotlin.createTrait(function() { - return[_.kotlin.collections.MapWithDefault, Kotlin.modules["builtins"].kotlin.collections.MutableMap]; - }), MapWithDefaultImpl:Kotlin.createClass(function() { - return[_.kotlin.collections.MapWithDefault]; - }, function(map, default_0) { - this.$map_5wo5ir$ = map; - this.default_61dz8o$ = default_0; - }, {map:{get:function() { - return this.$map_5wo5ir$; - }}, equals_za3rmp$:function(other) { - return Kotlin.equals(this.map, other); - }, hashCode:function() { - return Kotlin.hashCode(this.map); - }, toString:function() { - return this.map.toString(); - }, size:{get:function() { - return this.map.size; - }}, isEmpty:function() { - return this.map.isEmpty(); - }, containsKey_za3rmp$:function(key) { - return this.map.containsKey_za3rmp$(key); - }, containsValue_za3rmp$:function(value) { - return this.map.containsValue_za3rmp$(value); - }, get_za3rmp$:function(key) { - return this.map.get_za3rmp$(key); - }, keys:{get:function() { - return this.map.keys; - }}, values:{get:function() { - return this.map.values; - }}, entries:{get:function() { - return this.map.entries; - }}, getOrImplicitDefault_za3rmp$:function(key) { - var tmp$0; - var value = this.map.get_za3rmp$(key); - if (value == null && !this.map.containsKey_za3rmp$(key)) { - return this.default_61dz8o$(key); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }}, {}), MutableMapWithDefaultImpl:Kotlin.createClass(function() { - return[_.kotlin.collections.MutableMapWithDefault]; - }, function(map, default_0) { - this.$map_6ju9n7$ = map; - this.default_vonn6a$ = default_0; - }, {map:{get:function() { - return this.$map_6ju9n7$; - }}, equals_za3rmp$:function(other) { - return Kotlin.equals(this.map, other); - }, hashCode:function() { - return Kotlin.hashCode(this.map); - }, toString:function() { - return this.map.toString(); - }, size:{get:function() { - return this.map.size; - }}, isEmpty:function() { - return this.map.isEmpty(); - }, containsKey_za3rmp$:function(key) { - return this.map.containsKey_za3rmp$(key); - }, containsValue_za3rmp$:function(value) { - return this.map.containsValue_za3rmp$(value); - }, get_za3rmp$:function(key) { - return this.map.get_za3rmp$(key); - }, keys:{get:function() { - return this.map.keys; - }}, values:{get:function() { - return this.map.values; - }}, entries:{get:function() { - return this.map.entries; - }}, put_wn2jw4$:function(key, value) { - return this.map.put_wn2jw4$(key, value); - }, remove_za3rmp$:function(key) { - return this.map.remove_za3rmp$(key); - }, putAll_r12sna$:function(from) { - this.map.putAll_r12sna$(from); - }, clear:function() { - this.map.clear(); - }, getOrImplicitDefault_za3rmp$:function(key) { - var tmp$0; - var value = this.map.get_za3rmp$(key); - if (value == null && !this.map.containsKey_za3rmp$(key)) { - return this.default_vonn6a$(key); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }}, {}), EmptyMap:Kotlin.createObject(function() { - return[_.java.io.Serializable, Kotlin.modules["builtins"].kotlin.collections.Map]; - }, null, {equals_za3rmp$:function(other) { - return Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.Map) && other.isEmpty(); - }, hashCode:function() { - return 0; - }, toString:function() { - return "{}"; - }, size:{get:function() { - return 0; - }}, isEmpty:function() { - return true; - }, containsKey_za3rmp$:function(key) { - return false; - }, containsValue_za3rmp$:function(value) { - return false; - }, get_za3rmp$:function(key) { - return null; - }, entries:{get:function() { - return _.kotlin.collections.EmptySet; - }}, keys:{get:function() { - return _.kotlin.collections.EmptySet; - }}, values:{get:function() { - return _.kotlin.collections.EmptyList; - }}, readResolve:function() { - return _.kotlin.collections.EmptyMap; - }}), emptyMap:function() { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.collections.EmptyMap, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE(); - }, mapOf_eoa9s7$:function(pairs) { - return pairs.length > 0 ? _.kotlin.collections.linkedMapOf_eoa9s7$(pairs.slice()) : _.kotlin.collections.emptyMap(); - }, mapOf:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapOf", function() { - return _.kotlin.collections.emptyMap(); - }), mutableMapOf_eoa9s7$:function(pairs) { - var $receiver = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity(pairs.length)); - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - return $receiver; - }, hashMapOf_eoa9s7$:function(pairs) { - var $receiver = new Kotlin.ComplexHashMap(_.kotlin.collections.mapCapacity(pairs.length)); - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - return $receiver; - }, linkedMapOf_eoa9s7$:function(pairs) { - var $receiver = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity(pairs.length)); - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - return $receiver; - }, mapCapacity:function(expectedSize) { - if (expectedSize < 3) { - return expectedSize + 1; - } - if (expectedSize < _.kotlin.collections.INT_MAX_POWER_OF_TWO_y8578v$) { - return expectedSize + (expectedSize / 3 | 0); - } - return Kotlin.modules["stdlib"].kotlin.js.internal.IntCompanionObject.MAX_VALUE; - }, isNotEmpty_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.isNotEmpty_efxzmg$", function($receiver) { - return!$receiver.isEmpty(); - }), orEmpty_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_efxzmg$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptyMap(); - }), contains_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.contains_9ju2mf$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE()).containsKey_za3rmp$(key); - }), get_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.get_9ju2mf$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE()).get_za3rmp$(key); - }), containsKey_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.containsKey_9ju2mf$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.Map) ? tmp$0 : Kotlin.throwCCE()).containsKey_za3rmp$(key); - }), containsValue_9ju2mf$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.containsValue_9ju2mf$", function($receiver, value) { - return $receiver.containsValue_za3rmp$(value); - }), remove_dr77nj$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.remove_dr77nj$", function($receiver, key) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableMap) ? tmp$0 : Kotlin.throwCCE()).remove_za3rmp$(key); - }), component1_95c3g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component1_95c3g$", function($receiver) { - return $receiver.key; - }), component2_95c3g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.component2_95c3g$", function($receiver) { - return $receiver.value; - }), toPair_95c3g$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.toPair_95c3g$", function($receiver) { - return new _.kotlin.Pair($receiver.key, $receiver.value); - }), getOrElse_yh3n4j$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrElse_yh3n4j$", function($receiver, key, defaultValue) { - var tmp$0; - return(tmp$0 = $receiver.get_za3rmp$(key)) != null ? tmp$0 : defaultValue(); - }), getOrElseNullable:function($receiver, key, defaultValue) { - var tmp$0; - var value = $receiver.get_za3rmp$(key); - if (value == null && !$receiver.containsKey_za3rmp$(key)) { - return defaultValue(); - } else { - return(tmp$0 = value) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - }, getOrPut_5hy1z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.getOrPut_5hy1z$", function($receiver, key, defaultValue) { - var tmp$0; - var value = $receiver.get_za3rmp$(key); - if (value == null) { - var answer = defaultValue(); - $receiver.put_wn2jw4$(key, answer); - tmp$0 = answer; - } else { - tmp$0 = value; - } - return tmp$0; - }), iterator_efxzmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.iterator_efxzmg$", function($receiver) { - return $receiver.entries.iterator(); - }), mapValuesTo_6rxb0p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapValuesTo_6rxb0p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(element.key, transform(element)); - } - return destination; - }), mapKeysTo_6rxb0p$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapKeysTo_6rxb0p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(transform(element), element.value); - } - return destination; - }), putAll_76v9np$:function($receiver, pairs) { - var tmp$1, tmp$2, tmp$3; - tmp$1 = pairs, tmp$2 = tmp$1.length; - for (var tmp$3 = 0;tmp$3 !== tmp$2;++tmp$3) { - var tmp$0 = tmp$1[tmp$3], key = tmp$0.component1(), value = tmp$0.component2(); - $receiver.put_wn2jw4$(key, value); - } - }, putAll_6588df$:function($receiver, pairs) { - var tmp$1; - tmp$1 = pairs.iterator(); - while (tmp$1.hasNext()) { - var tmp$0 = tmp$1.next(), key = tmp$0.component1(), value = tmp$0.component2(); - $receiver.put_wn2jw4$(key, value); - } - }, putAll_6ze1sl$:function($receiver, pairs) { - var tmp$1; - tmp$1 = pairs.iterator(); - while (tmp$1.hasNext()) { - var tmp$0 = tmp$1.next(), key = tmp$0.component1(), value = tmp$0.component2(); - $receiver.put_wn2jw4$(key, value); - } - }, mapValues_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapValues_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.size)); - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(element.key, transform(element)); - } - return destination; - }), mapKeys_e1k39z$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.mapKeys_e1k39z$", function($receiver, transform) { - var destination = new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.size)); - var tmp$0; - tmp$0 = $receiver.entries.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(transform(element), element.value); - } - return destination; - }), filterKeys_m7gpmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterKeys_m7gpmg$", function($receiver, predicate) { - var tmp$0; - var result = new Kotlin.LinkedHashMap; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var entry = tmp$0.next(); - if (predicate(entry.key)) { - result.put_wn2jw4$(entry.key, entry.value); - } - } - return result; - }), filterValues_m7gpmg$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterValues_m7gpmg$", function($receiver, predicate) { - var tmp$0; - var result = new Kotlin.LinkedHashMap; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var entry = tmp$0.next(); - if (predicate(entry.value)) { - result.put_wn2jw4$(entry.key, entry.value); - } - } - return result; - }), filterTo_186nyl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterTo_186nyl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), filter_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filter_oixulp$", function($receiver, predicate) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), filterNotTo_186nyl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNotTo_186nyl$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), filterNot_oixulp$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.filterNot_oixulp$", function($receiver, predicate) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = _.kotlin.collections.iterator_efxzmg$($receiver); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.put_wn2jw4$(element.key, element.value); - } - } - return destination; - }), toMap_mnrzhp$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - tmp$1 = _.kotlin.collections.emptyMap(); - } else { - if (tmp$0 === 1) { - tmp$1 = _.kotlin.collections.mapOf_dvvt93$(Kotlin.isType($receiver, Kotlin.modules["builtins"].kotlin.collections.List) ? $receiver.get_za3lpa$(0) : $receiver.iterator().next()); - } else { - tmp$1 = _.kotlin.collections.toMap_q9c1bb$($receiver, new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.size))); - } - } - return tmp$1; - } - return _.kotlin.collections.optimizeReadOnlyMap(_.kotlin.collections.toMap_q9c1bb$($receiver, new Kotlin.LinkedHashMap)); - }, toMap_q9c1bb$:function($receiver, destination) { - _.kotlin.collections.putAll_6588df$(destination, $receiver); - return destination; - }, toMap_sq63gn$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.length; - if (tmp$0 === 0) { - return _.kotlin.collections.emptyMap(); - } else { - if (tmp$0 === 1) { - return _.kotlin.collections.mapOf_dvvt93$($receiver[0]); - } else { - return _.kotlin.collections.toMap_6ddun9$($receiver, new Kotlin.LinkedHashMap(_.kotlin.collections.mapCapacity($receiver.length))); - } - } - }, toMap_6ddun9$:function($receiver, destination) { - _.kotlin.collections.putAll_76v9np$(destination, $receiver); - return destination; - }, toMap_t83shn$:function($receiver) { - return _.kotlin.collections.optimizeReadOnlyMap(_.kotlin.collections.toMap_7lph5z$($receiver, new Kotlin.LinkedHashMap)); - }, toMap_7lph5z$:function($receiver, destination) { - _.kotlin.collections.putAll_6ze1sl$(destination, $receiver); - return destination; - }, plus_gd9jsf$:function($receiver, pair) { - if ($receiver.isEmpty()) { - return _.kotlin.collections.mapOf_dvvt93$(pair); - } else { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - $receiver_0.put_wn2jw4$(pair.first, pair.second); - return $receiver_0; - } - }, plus_1uo6lf$:function($receiver, pairs) { - if ($receiver.isEmpty()) { - return _.kotlin.collections.toMap_mnrzhp$(pairs); - } else { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - _.kotlin.collections.putAll_6588df$($receiver_0, pairs); - return $receiver_0; - } - }, plus_kx5j6p$:function($receiver, pairs) { - if ($receiver.isEmpty()) { - return _.kotlin.collections.toMap_sq63gn$(pairs); - } else { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - _.kotlin.collections.putAll_76v9np$($receiver_0, pairs); - return $receiver_0; - } - }, plus_85nxov$:function($receiver, pairs) { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - _.kotlin.collections.putAll_6ze1sl$($receiver_0, pairs); - return _.kotlin.collections.optimizeReadOnlyMap($receiver_0); - }, plus_y1w8a6$:function($receiver, map) { - var $receiver_0 = _.java.util.LinkedHashMap_r12sna$($receiver); - $receiver_0.putAll_r12sna$(map); - return $receiver_0; - }, plusAssign_fda80b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_fda80b$", function($receiver, pair) { - $receiver.put_wn2jw4$(pair.first, pair.second); - }), plusAssign_6588df$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_6588df$", function($receiver, pairs) { - _.kotlin.collections.putAll_6588df$($receiver, pairs); - }), plusAssign_76v9np$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_76v9np$", function($receiver, pairs) { - _.kotlin.collections.putAll_76v9np$($receiver, pairs); - }), plusAssign_6ze1sl$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_6ze1sl$", function($receiver, pairs) { - _.kotlin.collections.putAll_6ze1sl$($receiver, pairs); - }), plusAssign_wb8lso$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_wb8lso$", function($receiver, map) { - $receiver.putAll_r12sna$(map); - }), optimizeReadOnlyMap:function($receiver) { - var tmp$0; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - return _.kotlin.collections.emptyMap(); - } else { - if (tmp$0 === 1) { - return $receiver; - } else { - return $receiver; - } - } - }, remove_4kvzvw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.remove_4kvzvw$", function($receiver, element) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).remove_za3rmp$(element); - }), removeAll_dah1ga$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.removeAll_dah1ga$", function($receiver, elements) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).removeAll_wtfk93$(elements); - }), retainAll_dah1ga$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.retainAll_dah1ga$", function($receiver, elements) { - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).retainAll_wtfk93$(elements); - }), remove_ter78v$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.remove_ter78v$", function($receiver, index) { - return $receiver.removeAt_za3lpa$(index); - }), plusAssign_4kvzvw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_4kvzvw$", function($receiver, element) { - $receiver.add_za3rmp$(element); - }), plusAssign_fwwv5a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_fwwv5a$", function($receiver, elements) { - _.kotlin.collections.addAll_fwwv5a$($receiver, elements); - }), plusAssign_jzhv38$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_jzhv38$", function($receiver, elements) { - _.kotlin.collections.addAll_jzhv38$($receiver, elements); - }), plusAssign_h3qeu8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.plusAssign_h3qeu8$", function($receiver, elements) { - _.kotlin.collections.addAll_h3qeu8$($receiver, elements); - }), minusAssign_4kvzvw$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_4kvzvw$", function($receiver, element) { - $receiver.remove_za3rmp$(element); - }), minusAssign_fwwv5a$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_fwwv5a$", function($receiver, elements) { - _.kotlin.collections.removeAll_fwwv5a$($receiver, elements); - }), minusAssign_jzhv38$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_jzhv38$", function($receiver, elements) { - _.kotlin.collections.removeAll_jzhv38$($receiver, elements); - }), minusAssign_h3qeu8$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.minusAssign_h3qeu8$", function($receiver, elements) { - _.kotlin.collections.removeAll_h3qeu8$($receiver, elements); - }), addAll_fwwv5a$:function($receiver, elements) { - var tmp$0; - if (Kotlin.isType(elements, Kotlin.modules["builtins"].kotlin.collections.Collection)) { - return $receiver.addAll_wtfk93$(elements); - } else { - var result = false; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if ($receiver.add_za3rmp$(item)) { - result = true; - } - } - return result; - } - }, addAll_h3qeu8$:function($receiver, elements) { - var tmp$0; - var result = false; - tmp$0 = elements.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if ($receiver.add_za3rmp$(item)) { - result = true; - } - } - return result; - }, addAll_jzhv38$:function($receiver, elements) { - return $receiver.addAll_wtfk93$(_.kotlin.collections.asList_eg9ybj$(elements)); - }, removeAll_d717bt$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace($receiver, predicate, true); - }, retainAll_d717bt$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace($receiver, predicate, false); - }, filterInPlace:function($receiver, predicate, predicateResultToRemove) { - var result = {v:false}; - var receiver = $receiver.iterator(); - while (receiver.hasNext()) { - if (Kotlin.equals(predicate(receiver.next()), predicateResultToRemove)) { - receiver.remove(); - result.v = true; - } - } - return result.v; - }, removeAll_5xdc4t$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace_1($receiver, predicate, true); - }, retainAll_5xdc4t$:function($receiver, predicate) { - return _.kotlin.collections.filterInPlace_1($receiver, predicate, false); - }, filterInPlace_1:function($receiver, predicate, predicateResultToRemove) { - var tmp$0, tmp$1; - var writeIndex = 0; - tmp$0 = _.kotlin.collections.get_lastIndex_a7ptmv$($receiver); - for (var readIndex = 0;readIndex <= tmp$0;readIndex++) { - var element = $receiver.get_za3lpa$(readIndex); - if (Kotlin.equals(predicate(element), predicateResultToRemove)) { - continue; - } - if (writeIndex !== readIndex) { - $receiver.set_vux3hl$(writeIndex, element); - } - writeIndex++; - } - if (writeIndex < $receiver.size) { - tmp$1 = _.kotlin.ranges.downTo_rksjo2$(_.kotlin.collections.get_lastIndex_a7ptmv$($receiver), writeIndex).iterator(); - while (tmp$1.hasNext()) { - var removeIndex = tmp$1.next(); - $receiver.removeAt_za3lpa$(removeIndex); - } - return true; - } else { - return false; - } - }, removeAll_fwwv5a$:function($receiver, elements) { - var elements_0 = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).removeAll_wtfk93$(elements_0); - }, removeAll_h3qeu8$:function($receiver, elements) { - var set = _.kotlin.sequences.toHashSet_uya9q7$(elements); - return!set.isEmpty() && $receiver.removeAll_wtfk93$(set); - }, removeAll_jzhv38$:function($receiver, elements) { - return!(elements.length === 0) && $receiver.removeAll_wtfk93$(_.kotlin.collections.toHashSet_eg9ybj$(elements)); - }, retainAll_fwwv5a$:function($receiver, elements) { - var elements_0 = _.kotlin.collections.convertToSetForSetOperationWith(elements, $receiver); - var tmp$0; - return(Kotlin.isType(tmp$0 = $receiver, Kotlin.modules["builtins"].kotlin.collections.MutableCollection) ? tmp$0 : Kotlin.throwCCE()).retainAll_wtfk93$(elements_0); - }, retainAll_jzhv38$:function($receiver, elements) { - if (!(elements.length === 0)) { - return $receiver.retainAll_wtfk93$(_.kotlin.collections.toHashSet_eg9ybj$(elements)); - } else { - return _.kotlin.collections.retainNothing($receiver); - } - }, retainAll_h3qeu8$:function($receiver, elements) { - var set = _.kotlin.sequences.toHashSet_uya9q7$(elements); - if (!set.isEmpty()) { - return $receiver.retainAll_wtfk93$(set); - } else { - return _.kotlin.collections.retainNothing($receiver); - } - }, retainNothing:function($receiver) { - var result = !$receiver.isEmpty(); - $receiver.clear(); - return result; - }, sort_h06zi1$:function($receiver) { - if ($receiver.size > 1) { - _.java.util.Collections.sort_pr3zit$($receiver); - } - }, sortWith_lcufbu$:function($receiver, comparator) { - if ($receiver.size > 1) { - _.java.util.Collections.sort_k5qxi4$($receiver, comparator); - } - }, ReversedListReadOnly:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this); - this.$delegate_h46x6d$ = delegate; - }, {delegate:{get:function() { - return this.$delegate_h46x6d$; - }}, size:{get:function() { - return this.delegate.size; - }}, get_za3lpa$:function(index) { - return this.delegate.get_za3lpa$(this.flipIndex_s8ev3o$(index)); - }, flipIndex_s8ev3o$:function($receiver) { - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$($receiver)) { - return this.size - $receiver - 1; - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + $receiver + " should be in range [" + new Kotlin.NumberRange(0, this.size - 1) + "]."); - } - }, flipIndexForward_s8ev3o$:function($receiver) { - if ((new Kotlin.NumberRange(0, this.size)).contains_htax2k$($receiver)) { - return this.size - $receiver; - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + $receiver + " should be in range [" + new Kotlin.NumberRange(0, this.size) + "]."); - } - }}), ReversedList:Kotlin.createClass(function() { - return[_.kotlin.collections.ReversedListReadOnly]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this, delegate); - this.$delegate_20w7qr$ = delegate; - }, {delegate:{get:function() { - return this.$delegate_20w7qr$; - }}, clear:function() { - this.delegate.clear(); - }, removeAt_za3lpa$:function(index) { - return this.delegate.removeAt_za3lpa$(this.flipIndex_s8ev3o$(index)); - }, set_vux3hl$:function(index, element) { - return this.delegate.set_vux3hl$(this.flipIndex_s8ev3o$(index), element); - }, add_vux3hl$:function(index, element) { - this.delegate.add_vux3hl$(this.flipIndexForward_s8ev3o$(index), element); - }}), asReversed_a7ptmv$:function($receiver) { - return new _.kotlin.collections.ReversedListReadOnly($receiver); - }, asReversed_sqtfhv$:function($receiver) { - return new _.kotlin.collections.ReversedList($receiver); - }, EmptySet:Kotlin.createObject(function() { - return[_.java.io.Serializable, Kotlin.modules["builtins"].kotlin.collections.Set]; - }, null, {equals_za3rmp$:function(other) { - return Kotlin.isType(other, Kotlin.modules["builtins"].kotlin.collections.Set) && other.isEmpty(); - }, hashCode:function() { - return 0; - }, toString:function() { - return "[]"; - }, size:{get:function() { - return 0; - }}, isEmpty:function() { - return true; - }, contains_za3rmp$:function(element) { - return false; - }, containsAll_wtfk93$:function(elements) { - return elements.isEmpty(); - }, iterator:function() { - return _.kotlin.collections.EmptyIterator; - }, readResolve:function() { - return _.kotlin.collections.EmptySet; - }}), emptySet:function() { - return _.kotlin.collections.EmptySet; - }, setOf_9mqe4v$:function(elements) { - return elements.length > 0 ? _.kotlin.collections.toSet_eg9ybj$(elements) : _.kotlin.collections.emptySet(); - }, setOf:Kotlin.defineInlineFunction("stdlib.kotlin.collections.setOf", function() { - return _.kotlin.collections.emptySet(); - }), mutableSetOf_9mqe4v$:function(elements) { - return _.kotlin.collections.toCollection_ajv5ds$(elements, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity(elements.length))); - }, hashSetOf_9mqe4v$:function(elements) { - return _.kotlin.collections.toCollection_ajv5ds$(elements, new Kotlin.ComplexHashSet(_.kotlin.collections.mapCapacity(elements.length))); - }, linkedSetOf_9mqe4v$:function(elements) { - return _.kotlin.collections.toCollection_ajv5ds$(elements, new Kotlin.LinkedHashSet(_.kotlin.collections.mapCapacity(elements.length))); - }, orEmpty_9io49b$:Kotlin.defineInlineFunction("stdlib.kotlin.collections.orEmpty_9io49b$", function($receiver) { - return $receiver != null ? $receiver : _.kotlin.collections.emptySet(); - }), optimizeReadOnlySet:function($receiver) { - var tmp$0; - tmp$0 = $receiver.size; - if (tmp$0 === 0) { - return _.kotlin.collections.emptySet(); - } else { - if (tmp$0 === 1) { - return _.kotlin.collections.setOf_za3rmp$($receiver.iterator().next()); - } else { - return $receiver; - } - } - }}), synchronized_pzucw5$:Kotlin.defineInlineFunction("stdlib.kotlin.synchronized_pzucw5$", function(lock, block) { - return block(); - }), emptyArray:Kotlin.defineInlineFunction("stdlib.kotlin.emptyArray", function(isT) { - var tmp$0; - return Array.isArray(tmp$0 = Kotlin.nullArray(0)) ? tmp$0 : Kotlin.throwCCE(); - }), lazy_un3fny$:function(initializer) { - return new _.kotlin.UnsafeLazyImpl(initializer); - }, lazy_b4usna$:function(mode, initializer) { - return new _.kotlin.UnsafeLazyImpl(initializer); - }, lazy_pzucw5$:function(lock, initializer) { - return new _.kotlin.UnsafeLazyImpl(initializer); - }, arrayOfNulls:function(reference, size) { - var tmp$0; - return Array.isArray(tmp$0 = Kotlin.nullArray(size)) ? tmp$0 : Kotlin.throwCCE(); - }, arrayCopyResize:function(source, newSize, defaultValue) { - var result = source.slice(0, newSize); - var index = source.length; - if (newSize > index) { - result.length = newSize; - while (index < newSize) { - result[index++] = defaultValue; - } - } - return result; - }, arrayPlusCollection:function(array, collection) { - var tmp$0; - var result = array.slice(); - result.length += collection.size; - var index = array.length; - tmp$0 = collection.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - result[index++] = element; - } - return result; - }, toSingletonMap:function($receiver) { - return $receiver; - }, copyToArrayOfAny:function($receiver, isVarargs) { - return isVarargs ? $receiver : $receiver.slice(); - }, isNaN_yrwdxs$:function($receiver) { - return $receiver !== $receiver; - }, isNaN_81szl$:function($receiver) { - return $receiver !== $receiver; - }, isInfinite_yrwdxs$:function($receiver) { - return $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.DoubleCompanionObject.POSITIVE_INFINITY || $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.DoubleCompanionObject.NEGATIVE_INFINITY; - }, isInfinite_81szl$:function($receiver) { - return $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.FloatCompanionObject.POSITIVE_INFINITY || $receiver === Kotlin.modules["stdlib"].kotlin.js.internal.FloatCompanionObject.NEGATIVE_INFINITY; - }, isFinite_yrwdxs$:function($receiver) { - return!_.kotlin.isInfinite_yrwdxs$($receiver) && !_.kotlin.isNaN_yrwdxs$($receiver); - }, isFinite_81szl$:function($receiver) { - return!_.kotlin.isInfinite_81szl$($receiver) && !_.kotlin.isNaN_81szl$($receiver); - }, Unit:Kotlin.createObject(null, null, {toString:function() { - return "kotlin.Unit"; - }}), Lazy:Kotlin.createTrait(null), lazyOf_za3rmp$:function(value) { - return new _.kotlin.InitializedLazyImpl(value); - }, getValue_em0fd4$:Kotlin.defineInlineFunction("stdlib.kotlin.getValue_em0fd4$", function($receiver, thisRef, property) { - return $receiver.value; - }), LazyThreadSafetyMode:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{SYNCHRONIZED:function() { - return new _.kotlin.LazyThreadSafetyMode; - }, PUBLICATION:function() { - return new _.kotlin.LazyThreadSafetyMode; - }, NONE:function() { - return new _.kotlin.LazyThreadSafetyMode; - }}; - }), UNINITIALIZED_VALUE:Kotlin.createObject(null, null), SynchronizedLazyImpl:Kotlin.createClass(function() { - return[_.java.io.Serializable, _.kotlin.Lazy]; - }, function(initializer, lock) { - if (lock === void 0) { - lock = null; - } - this.initializer_r73809$ = initializer; - this._value_vvwq51$ = _.kotlin.UNINITIALIZED_VALUE; - this.lock_1qw5us$ = lock != null ? lock : this; - }, {value:{get:function() { - var tmp$0; - var _v1 = this._value_vvwq51$; - if (_v1 !== _.kotlin.UNINITIALIZED_VALUE) { - return(tmp$0 = _v1) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - } - var tmp$2, tmp$1; - var _v2 = this._value_vvwq51$; - if (_v2 !== _.kotlin.UNINITIALIZED_VALUE) { - return(tmp$2 = _v2) == null || tmp$2 != null ? tmp$2 : Kotlin.throwCCE(); - } else { - var typedValue = ((tmp$1 = this.initializer_r73809$) != null ? tmp$1 : Kotlin.throwNPE())(); - this._value_vvwq51$ = typedValue; - this.initializer_r73809$ = null; - return typedValue; - } - }}, isInitialized:function() { - return this._value_vvwq51$ !== _.kotlin.UNINITIALIZED_VALUE; - }, toString:function() { - return this.isInitialized() ? Kotlin.toString(this.value) : "Lazy value not initialized yet."; - }, writeReplace:function() { - return new _.kotlin.InitializedLazyImpl(this.value); - }}, {}), UnsafeLazyImpl:Kotlin.createClass(function() { - return[_.java.io.Serializable, _.kotlin.Lazy]; - }, function(initializer) { - this.initializer_r8paat$ = initializer; - this._value_94f8d5$ = _.kotlin.UNINITIALIZED_VALUE; - }, {value:{get:function() { - var tmp$0, tmp$1; - if (this._value_94f8d5$ === _.kotlin.UNINITIALIZED_VALUE) { - this._value_94f8d5$ = ((tmp$0 = this.initializer_r8paat$) != null ? tmp$0 : Kotlin.throwNPE())(); - this.initializer_r8paat$ = null; - } - return(tmp$1 = this._value_94f8d5$) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }}, isInitialized:function() { - return this._value_94f8d5$ !== _.kotlin.UNINITIALIZED_VALUE; - }, toString:function() { - return this.isInitialized() ? Kotlin.toString(this.value) : "Lazy value not initialized yet."; - }, writeReplace:function() { - return new _.kotlin.InitializedLazyImpl(this.value); - }}), InitializedLazyImpl:Kotlin.createClass(function() { - return[_.java.io.Serializable, _.kotlin.Lazy]; - }, function(value) { - this.$value_2jk7vi$ = value; - }, {value:{get:function() { - return this.$value_2jk7vi$; - }}, isInitialized:function() { - return true; - }, toString:function() { - return Kotlin.toString(this.value); - }}), require_6taknv$:Kotlin.defineInlineFunction("stdlib.kotlin.require_6taknv$", function(value) { - if (!value) { - var message = "Failed requirement."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }), require_588y69$:Kotlin.defineInlineFunction("stdlib.kotlin.require_588y69$", function(value, lazyMessage) { - if (!value) { - var message = lazyMessage(); - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }), requireNotNull_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.requireNotNull_za3rmp$", function(value) { - if (value == null) { - var message = "Required value was null."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } else { - return value; - } - }), requireNotNull_pzucw5$:Kotlin.defineInlineFunction("stdlib.kotlin.requireNotNull_pzucw5$", function(value, lazyMessage) { - if (value == null) { - var message = lazyMessage(); - throw new Kotlin.IllegalArgumentException(message.toString()); - } else { - return value; - } - }), check_6taknv$:Kotlin.defineInlineFunction("stdlib.kotlin.check_6taknv$", function(value) { - if (!value) { - var message = "Check failed."; - throw new Kotlin.IllegalStateException(message.toString()); - } - }), check_588y69$:Kotlin.defineInlineFunction("stdlib.kotlin.check_588y69$", function(value, lazyMessage) { - if (!value) { - var message = lazyMessage(); - throw new Kotlin.IllegalStateException(message.toString()); - } - }), checkNotNull_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.checkNotNull_za3rmp$", function(value) { - if (value == null) { - var message = "Required value was null."; - throw new Kotlin.IllegalStateException(message.toString()); - } else { - return value; - } - }), checkNotNull_pzucw5$:Kotlin.defineInlineFunction("stdlib.kotlin.checkNotNull_pzucw5$", function(value, lazyMessage) { - if (value == null) { - var message = lazyMessage(); - throw new Kotlin.IllegalStateException(message.toString()); - } else { - return value; - } - }), error_za3rmp$:Kotlin.defineInlineFunction("stdlib.kotlin.error_za3rmp$", function(message) { - throw new Kotlin.IllegalStateException(message.toString()); - }), NotImplementedError:Kotlin.createClass(function() { - return[Kotlin.Error]; - }, function $fun(message) { - if (message === void 0) { - message = "An operation is not implemented."; - } - $fun.baseInitializer.call(this, message); - }), TODO:Kotlin.defineInlineFunction("stdlib.kotlin.TODO", function() { - throw new _.kotlin.NotImplementedError; - }), TODO_61zpoe$:Kotlin.defineInlineFunction("stdlib.kotlin.TODO_61zpoe$", function(reason) { - throw new _.kotlin.NotImplementedError("An operation is not implemented: " + reason); - }), run_un3fny$:Kotlin.defineInlineFunction("stdlib.kotlin.run_un3fny$", function(block) { - return block(); - }), run_7hr6ff$:Kotlin.defineInlineFunction("stdlib.kotlin.run_7hr6ff$", function($receiver, block) { - return block.call($receiver); - }), with_hiyix$:Kotlin.defineInlineFunction("stdlib.kotlin.with_hiyix$", function(receiver, block) { - return block.call(receiver); - }), apply_ji1yox$:Kotlin.defineInlineFunction("stdlib.kotlin.apply_ji1yox$", function($receiver, block) { - block.call($receiver); - return $receiver; - }), let_7hr6ff$:Kotlin.defineInlineFunction("stdlib.kotlin.let_7hr6ff$", function($receiver, block) { - return block($receiver); - }), repeat_nxnjqh$:Kotlin.defineInlineFunction("stdlib.kotlin.repeat_nxnjqh$", function(times, action) { - var tmp$0; - tmp$0 = times - 1; - for (var index = 0;index <= tmp$0;index++) { - action(index); - } - }), Pair:Kotlin.createClass(function() { - return[_.java.io.Serializable]; - }, function(first, second) { - this.first = first; - this.second = second; - }, {toString:function() { - return "(" + this.first + ", " + this.second + ")"; - }, component1:function() { - return this.first; - }, component2:function() { - return this.second; - }, copy_wn2jw4$:function(first, second) { - return new _.kotlin.Pair(first === void 0 ? this.first : first, second === void 0 ? this.second : second); - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.first) | 0; - result = result * 31 + Kotlin.hashCode(this.second) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.first, other.first) && Kotlin.equals(this.second, other.second)))); - }}), to_l1ob02$:function($receiver, that) { - return new _.kotlin.Pair($receiver, that); - }, toList_49pv07$:function($receiver) { - return _.kotlin.collections.listOf_9mqe4v$([$receiver.first, $receiver.second]); - }, Triple:Kotlin.createClass(function() { - return[_.java.io.Serializable]; - }, function(first, second, third) { - this.first = first; - this.second = second; - this.third = third; - }, {toString:function() { - return "(" + this.first + ", " + this.second + ", " + this.third + ")"; - }, component1:function() { - return this.first; - }, component2:function() { - return this.second; - }, component3:function() { - return this.third; - }, copy_2br51b$:function(first, second, third) { - return new _.kotlin.Triple(first === void 0 ? this.first : first, second === void 0 ? this.second : second, third === void 0 ? this.third : third); - }, hashCode:function() { - var result = 0; - result = result * 31 + Kotlin.hashCode(this.first) | 0; - result = result * 31 + Kotlin.hashCode(this.second) | 0; - result = result * 31 + Kotlin.hashCode(this.third) | 0; - return result; - }, equals_za3rmp$:function(other) { - return this === other || other !== null && (typeof other === "object" && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.first, other.first) && (Kotlin.equals(this.second, other.second) && Kotlin.equals(this.third, other.third))))); - }}), toList_lyhsl6$:function($receiver) { - return _.kotlin.collections.listOf_9mqe4v$([$receiver.first, $receiver.second, $receiver.third]); - }, sequences:Kotlin.definePackage(null, {ConstrainedOnceSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence) { - this.sequenceRef_sxf5v1$ = sequence; - }, {iterator:function() { - var tmp$0; - tmp$0 = this.sequenceRef_sxf5v1$; - if (tmp$0 == null) { - throw new Kotlin.IllegalStateException("This sequence can be consumed only once."); - } - var sequence = tmp$0; - this.sequenceRef_sxf5v1$ = null; - return sequence.iterator(); - }}), contains_8xuhcw$:function($receiver, element) { - return _.kotlin.sequences.indexOf_8xuhcw$($receiver, element) >= 0; - }, elementAt_8xunab$f:function(closure$index) { - return function(it) { - throw new Kotlin.IndexOutOfBoundsException("Sequence doesn't contain element at index " + closure$index + "."); - }; - }, elementAt_8xunab$:function($receiver, index) { - return _.kotlin.sequences.elementAtOrElse_1xituq$($receiver, index, _.kotlin.sequences.elementAt_8xunab$f(index)); - }, elementAtOrElse_1xituq$:function($receiver, index, defaultValue) { - if (index < 0) { - return defaultValue(index); - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return defaultValue(index); - }, elementAtOrNull_8xunab$:function($receiver, index) { - if (index < 0) { - return null; - } - var iterator = $receiver.iterator(); - var count = 0; - while (iterator.hasNext()) { - var element = iterator.next(); - if (index === count++) { - return element; - } - } - return null; - }, find_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.find_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), findLast_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.findLast_6bub1b$", function($receiver, predicate) { - var tmp$0; - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), first_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Sequence is empty."); - } - return iterator.next(); - }, first_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.first_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - throw new Kotlin.NoSuchElementException("Sequence contains no element matching the predicate."); - }), firstOrNull_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - return iterator.next(); - }, firstOrNull_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.firstOrNull_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return element; - } - } - return null; - }), indexOf_8xuhcw$:function($receiver, element) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - return index; - } - index++; - } - return-1; - }, indexOfFirst_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.indexOfFirst_6bub1b$", function($receiver, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - return index; - } - index++; - } - return-1; - }), indexOfLast_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.indexOfLast_6bub1b$", function($receiver, predicate) { - var tmp$0; - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }), last_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Sequence is empty."); - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - }, last_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.last_6bub1b$", function($receiver, predicate) { - var tmp$0, tmp$1; - var last = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Sequence contains no element matching the predicate."); - } - return(tmp$1 = last) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), lastIndexOf_8xuhcw$:function($receiver, element) { - var tmp$0; - var lastIndex = -1; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (Kotlin.equals(element, item)) { - lastIndex = index; - } - index++; - } - return lastIndex; - }, lastOrNull_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var last = iterator.next(); - while (iterator.hasNext()) { - last = iterator.next(); - } - return last; - }, lastOrNull_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.lastOrNull_6bub1b$", function($receiver, predicate) { - var tmp$0; - var last = null; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - last = element; - } - } - return last; - }), single_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.NoSuchElementException("Sequence is empty."); - } - var single = iterator.next(); - if (iterator.hasNext()) { - throw new Kotlin.IllegalArgumentException("Sequence has more than one element."); - } - return single; - }, single_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.single_6bub1b$", function($receiver, predicate) { - var tmp$0, tmp$1; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - throw new Kotlin.IllegalArgumentException("Sequence contains more than one matching element."); - } - single = element; - found = true; - } - } - if (!found) { - throw new Kotlin.NoSuchElementException("Sequence contains no element matching the predicate."); - } - return(tmp$1 = single) == null || tmp$1 != null ? tmp$1 : Kotlin.throwCCE(); - }), singleOrNull_uya9q7$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var single = iterator.next(); - if (iterator.hasNext()) { - return null; - } - return single; - }, singleOrNull_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.singleOrNull_6bub1b$", function($receiver, predicate) { - var tmp$0; - var single = null; - var found = false; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - if (found) { - return null; - } - single = element; - found = true; - } - } - if (!found) { - return null; - } - return single; - }), drop_8xunab$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - tmp$0 = $receiver; - } else { - if (Kotlin.isType($receiver, _.kotlin.sequences.DropTakeSequence)) { - tmp$0 = $receiver.drop_za3lpa$(n); - } else { - tmp$0 = new _.kotlin.sequences.DropSequence($receiver, n); - } - } - return tmp$0; - }, dropWhile_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.DropWhileSequence($receiver, predicate); - }, filter_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.FilteringSequence($receiver, true, predicate); - }, filterIndexed_2lipl8$f:function(closure$predicate) { - return function(it) { - return closure$predicate(it.index, it.value); - }; - }, filterIndexed_2lipl8$f_0:function(it) { - return it.value; - }, filterIndexed_2lipl8$:function($receiver, predicate) { - return new _.kotlin.sequences.TransformingSequence(new _.kotlin.sequences.FilteringSequence(new _.kotlin.sequences.IndexingSequence($receiver), true, _.kotlin.sequences.filterIndexed_2lipl8$f(predicate)), _.kotlin.sequences.filterIndexed_2lipl8$f_0); - }, filterIndexedTo_rs7kz9$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.filterIndexedTo_rs7kz9$", function($receiver, destination, predicate) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - if (predicate(index++, item)) { - destination.add_za3rmp$(item); - } - } - return destination; - }), filterNot_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.FilteringSequence($receiver, false, predicate); - }, filterNotNull_uya9q7$f:function(it) { - return it == null; - }, filterNotNull_uya9q7$:function($receiver) { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.sequences.filterNot_6bub1b$($receiver, _.kotlin.sequences.filterNotNull_uya9q7$f), _.kotlin.sequences.Sequence) ? tmp$0 : Kotlin.throwCCE(); - }, filterNotNullTo_9pj6f6$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (element != null) { - destination.add_za3rmp$(element); - } - } - return destination; - }, filterNotTo_z1ybyi$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.filterNotTo_z1ybyi$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), filterTo_z1ybyi$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.filterTo_z1ybyi$", function($receiver, destination, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - destination.add_za3rmp$(element); - } - } - return destination; - }), take_8xunab$:function($receiver, n) { - var tmp$0; - if (!(n >= 0)) { - var message = "Requested element count " + n + " is less than zero."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (n === 0) { - tmp$0 = _.kotlin.sequences.emptySequence(); - } else { - if (Kotlin.isType($receiver, _.kotlin.sequences.DropTakeSequence)) { - tmp$0 = $receiver.take_za3lpa$(n); - } else { - tmp$0 = new _.kotlin.sequences.TakeSequence($receiver, n); - } - } - return tmp$0; - }, takeWhile_6bub1b$:function($receiver, predicate) { - return new _.kotlin.sequences.TakeWhileSequence($receiver, predicate); - }, sorted$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(this$sorted_0) { - this.this$sorted_0 = this$sorted_0; - }, {iterator:function() { - var sortedList = _.kotlin.sequences.toMutableList_uya9q7$(this.this$sorted_0); - _.kotlin.collections.sort_h06zi1$(sortedList); - return sortedList.iterator(); - }}, {}), sorted_f9rmbp$:function($receiver) { - return new _.kotlin.sequences.sorted$f($receiver); - }, sortedBy_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sortedBy_5y3tfr$", function($receiver, selector) { - return _.kotlin.sequences.sortedWith_pwgv1i$($receiver, new _.kotlin.comparisons.compareBy$f_0(selector)); - }), sortedByDescending_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sortedByDescending_5y3tfr$", function($receiver, selector) { - return _.kotlin.sequences.sortedWith_pwgv1i$($receiver, new _.kotlin.comparisons.compareByDescending$f(selector)); - }), sortedDescending_f9rmbp$:function($receiver) { - return _.kotlin.sequences.sortedWith_pwgv1i$($receiver, _.kotlin.comparisons.reverseOrder()); - }, sortedWith$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(this$sortedWith_0, closure$comparator_0) { - this.this$sortedWith_0 = this$sortedWith_0; - this.closure$comparator_0 = closure$comparator_0; - }, {iterator:function() { - var sortedList = _.kotlin.sequences.toMutableList_uya9q7$(this.this$sortedWith_0); - _.kotlin.collections.sortWith_lcufbu$(sortedList, this.closure$comparator_0); - return sortedList.iterator(); - }}, {}), sortedWith_pwgv1i$:function($receiver, comparator) { - return new _.kotlin.sequences.sortedWith$f($receiver, comparator); - }, associate_212ozr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associate_212ozr$", function($receiver, transform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), associateBy_mzhnvn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateBy_mzhnvn$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateBy_mq2phn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateBy_mq2phn$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateByTo_7yy56l$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateByTo_7yy56l$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), element); - } - return destination; - }), associateByTo_z626hh$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateByTo_z626hh$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - destination.put_wn2jw4$(keySelector(element), valueTransform(element)); - } - return destination; - }), associateTo_y82m8p$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.associateTo_y82m8p$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - _.kotlin.collections.plusAssign_fda80b$(destination, transform(element)); - } - return destination; - }), toCollection_9pj6f6$:function($receiver, destination) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(item); - } - return destination; - }, toHashSet_uya9q7$:function($receiver) { - return _.kotlin.sequences.toCollection_9pj6f6$($receiver, new Kotlin.ComplexHashSet); - }, toList_uya9q7$:function($receiver) { - return _.kotlin.collections.optimizeReadOnlyList(_.kotlin.sequences.toMutableList_uya9q7$($receiver)); - }, toMutableList_uya9q7$:function($receiver) { - return _.kotlin.sequences.toCollection_9pj6f6$($receiver, new Kotlin.ArrayList); - }, toSet_uya9q7$:function($receiver) { - return _.kotlin.collections.optimizeReadOnlySet(_.kotlin.sequences.toCollection_9pj6f6$($receiver, new Kotlin.LinkedHashSet)); - }, flatMap_f7251y$f:function(it) { - return it.iterator(); - }, flatMap_f7251y$:function($receiver, transform) { - return new _.kotlin.sequences.FlatteningSequence($receiver, transform, _.kotlin.sequences.flatMap_f7251y$f); - }, flatMapTo_mxza43$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.flatMapTo_mxza43$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var list = transform(element); - _.kotlin.collections.addAll_h3qeu8$(destination, list); - } - return destination; - }), groupBy_mzhnvn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupBy_mzhnvn$", function($receiver, keySelector) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupBy_mq2phn$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupBy_mq2phn$", function($receiver, keySelector, valueTransform) { - var destination = new Kotlin.LinkedHashMap; - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), groupByTo_ngq3c4$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupByTo_ngq3c4$", function($receiver, destination, keySelector) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(element); - } - return destination; - }), groupByTo_315m50$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.groupByTo_315m50$", function($receiver, destination, keySelector, valueTransform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var key = keySelector(element); - var tmp$1; - var value = destination.get_za3rmp$(key); - if (value == null) { - var answer = new Kotlin.ArrayList; - destination.put_wn2jw4$(key, answer); - tmp$1 = answer; - } else { - tmp$1 = value; - } - var list = tmp$1; - list.add_za3rmp$(valueTransform(element)); - } - return destination; - }), map_mzhnvn$:function($receiver, transform) { - return new _.kotlin.sequences.TransformingSequence($receiver, transform); - }, mapIndexed_68ttmg$:function($receiver, transform) { - return new _.kotlin.sequences.TransformingIndexedSequence($receiver, transform); - }, mapIndexedNotNull_68ttmg$:function($receiver, transform) { - return _.kotlin.sequences.filterNotNull_uya9q7$(new _.kotlin.sequences.TransformingIndexedSequence($receiver, transform)); - }, mapIndexedNotNullTo_1k8h0x$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapIndexedNotNullTo_1k8h0x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(index++, item)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapIndexedTo_1k8h0x$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapIndexedTo_1k8h0x$", function($receiver, destination, transform) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(index++, item)); - } - return destination; - }), mapNotNull_mzhnvn$:function($receiver, transform) { - return _.kotlin.sequences.filterNotNull_uya9q7$(new _.kotlin.sequences.TransformingSequence($receiver, transform)); - }, mapNotNullTo_qkxpve$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapNotNullTo_qkxpve$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - var tmp$1; - (tmp$1 = transform(element)) != null ? destination.add_za3rmp$(tmp$1) : null; - } - return destination; - }), mapTo_qkxpve$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.mapTo_qkxpve$", function($receiver, destination, transform) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - destination.add_za3rmp$(transform(item)); - } - return destination; - }), withIndex_uya9q7$:function($receiver) { - return new _.kotlin.sequences.IndexingSequence($receiver); - }, distinct_uya9q7$f:function(it) { - return it; - }, distinct_uya9q7$:function($receiver) { - return _.kotlin.sequences.distinctBy_mzhnvn$($receiver, _.kotlin.sequences.distinct_uya9q7$f); - }, distinctBy_mzhnvn$:function($receiver, selector) { - return new _.kotlin.sequences.DistinctSequence($receiver, selector); - }, toMutableSet_uya9q7$:function($receiver) { - var tmp$0; - var set = new Kotlin.LinkedHashSet; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - set.add_za3rmp$(item); - } - return set; - }, all_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.all_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (!predicate(element)) { - return false; - } - } - return true; - }), any_uya9q7$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return true; - } - return false; - }, any_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.any_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return true; - } - } - return false; - }), count_uya9q7$:function($receiver) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - count++; - } - return count; - }, count_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.count_6bub1b$", function($receiver, predicate) { - var tmp$0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - count++; - } - } - return count; - }), fold_vmk5me$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.fold_vmk5me$", function($receiver, initial, operation) { - var tmp$0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(accumulator, element); - } - return accumulator; - }), foldIndexed_xn82zj$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.foldIndexed_xn82zj$", function($receiver, initial, operation) { - var tmp$0; - var index = 0; - var accumulator = initial; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - accumulator = operation(index++, accumulator, element); - } - return accumulator; - }), forEach_1y3f5d$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.forEach_1y3f5d$", function($receiver, action) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - action(element); - } - }), forEachIndexed_jsn8xw$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.forEachIndexed_jsn8xw$", function($receiver, action) { - var tmp$0; - var index = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var item = tmp$0.next(); - action(index++, item); - } - }), max_f9rmbp$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(max, e) < 0) { - max = e; - } - } - return max; - }, maxBy_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.maxBy_5y3tfr$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var maxElem = iterator.next(); - var maxValue = selector(maxElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(maxValue, v) < 0) { - maxElem = e; - maxValue = v; - } - } - return maxElem; - }), maxWith_pwgv1i$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var max = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(max, e) < 0) { - max = e; - } - } - return max; - }, min_f9rmbp$:function($receiver) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (Kotlin.compareTo(min, e) > 0) { - min = e; - } - } - return min; - }, minBy_5y3tfr$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.minBy_5y3tfr$", function($receiver, selector) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var minElem = iterator.next(); - var minValue = selector(minElem); - while (iterator.hasNext()) { - var e = iterator.next(); - var v = selector(e); - if (Kotlin.compareTo(minValue, v) > 0) { - minElem = e; - minValue = v; - } - } - return minElem; - }), minWith_pwgv1i$:function($receiver, comparator) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - return null; - } - var min = iterator.next(); - while (iterator.hasNext()) { - var e = iterator.next(); - if (comparator.compare(min, e) > 0) { - min = e; - } - } - return min; - }, none_uya9q7$:function($receiver) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - return false; - } - return true; - }, none_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.none_6bub1b$", function($receiver, predicate) { - var tmp$0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - return false; - } - } - return true; - }), reduce_u0tld7$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.reduce_u0tld7$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty sequence can't be reduced."); - } - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(accumulator, iterator.next()); - } - return accumulator; - }), reduceIndexed_t3v3h2$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.reduceIndexed_t3v3h2$", function($receiver, operation) { - var iterator = $receiver.iterator(); - if (!iterator.hasNext()) { - throw new Kotlin.UnsupportedOperationException("Empty sequence can't be reduced."); - } - var index = 1; - var accumulator = iterator.next(); - while (iterator.hasNext()) { - accumulator = operation(index++, accumulator, iterator.next()); - } - return accumulator; - }), sumBy_mzck3q$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sumBy_mzck3q$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), sumByDouble_awo3oi$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.sumByDouble_awo3oi$", function($receiver, selector) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += selector(element); - } - return sum; - }), requireNoNulls_uya9q7$f:function(this$requireNoNulls) { - return function(it) { - if (it == null) { - throw new Kotlin.IllegalArgumentException("null element found in " + this$requireNoNulls + "."); - } - return it; - }; - }, requireNoNulls_uya9q7$:function($receiver) { - return _.kotlin.sequences.map_mzhnvn$($receiver, _.kotlin.sequences.requireNoNulls_uya9q7$f($receiver)); - }, minus$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(this$minus_0, closure$element_0) { - this.this$minus_0 = this$minus_0; - this.closure$element_0 = closure$element_0; - }, {iterator:function() { - var removed = {v:false}; - return _.kotlin.sequences.filter_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f.iterator$f(removed, this.closure$element_0)).iterator(); - }}, {iterator$f:function(closure$removed, closure$element) { - return function(it) { - if (!closure$removed.v && Kotlin.equals(it, closure$element)) { - closure$removed.v = true; - return false; - } else { - return true; - } - }; - }}), minus_8xuhcw$:function($receiver, element) { - return new _.kotlin.sequences.minus$f($receiver, element); - }, minus$f_0:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$elements_0, this$minus_0) { - this.closure$elements_0 = closure$elements_0; - this.this$minus_0 = this$minus_0; - }, {iterator:function() { - var other = _.kotlin.collections.toHashSet_eg9ybj$(this.closure$elements_0); - return _.kotlin.sequences.filterNot_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f_0.iterator$f(other)).iterator(); - }}, {iterator$f:function(closure$other) { - return function(it) { - return closure$other.contains_za3rmp$(it); - }; - }}), minus_l2r1yo$:function($receiver, elements) { - if (elements.length === 0) { - return $receiver; - } - return new _.kotlin.sequences.minus$f_0(elements, $receiver); - }, minus$f_1:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$elements_0, this$minus_0) { - this.closure$elements_0 = closure$elements_0; - this.this$minus_0 = this$minus_0; - }, {iterator:function() { - var other = _.kotlin.collections.convertToSetForSetOperation(this.closure$elements_0); - if (other.isEmpty()) { - return this.this$minus_0.iterator(); - } else { - return _.kotlin.sequences.filterNot_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f_1.iterator$f(other)).iterator(); - } - }}, {iterator$f:function(closure$other) { - return function(it) { - return closure$other.contains_za3rmp$(it); - }; - }}), minus_yslupy$:function($receiver, elements) { - return new _.kotlin.sequences.minus$f_1(elements, $receiver); - }, minus$f_2:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$elements_0, this$minus_0) { - this.closure$elements_0 = closure$elements_0; - this.this$minus_0 = this$minus_0; - }, {iterator:function() { - var other = _.kotlin.sequences.toHashSet_uya9q7$(this.closure$elements_0); - if (other.isEmpty()) { - return this.this$minus_0.iterator(); - } else { - return _.kotlin.sequences.filterNot_6bub1b$(this.this$minus_0, _.kotlin.sequences.minus$f_2.iterator$f(other)).iterator(); - } - }}, {iterator$f:function(closure$other) { - return function(it) { - return closure$other.contains_za3rmp$(it); - }; - }}), minus_j4v1m4$:function($receiver, elements) { - return new _.kotlin.sequences.minus$f_2(elements, $receiver); - }, minusElement_8xuhcw$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.minusElement_8xuhcw$", function($receiver, element) { - return _.kotlin.sequences.minus_8xuhcw$($receiver, element); - }), partition_6bub1b$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.partition_6bub1b$", function($receiver, predicate) { - var tmp$0; - var first = new Kotlin.ArrayList; - var second = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (predicate(element)) { - first.add_za3rmp$(element); - } else { - second.add_za3rmp$(element); - } - } - return new _.kotlin.Pair(first, second); - }), plus_8xuhcw$:function($receiver, element) { - return _.kotlin.sequences.flatten_skdoy0$(_.kotlin.sequences.sequenceOf_9mqe4v$([$receiver, _.kotlin.sequences.sequenceOf_9mqe4v$([element])])); - }, plus_l2r1yo$:function($receiver, elements) { - return _.kotlin.sequences.plus_yslupy$($receiver, _.kotlin.collections.asList_eg9ybj$(elements)); - }, plus_yslupy$:function($receiver, elements) { - return _.kotlin.sequences.flatten_skdoy0$(_.kotlin.sequences.sequenceOf_9mqe4v$([$receiver, _.kotlin.collections.asSequence_q5oq31$(elements)])); - }, plus_j4v1m4$:function($receiver, elements) { - return _.kotlin.sequences.flatten_skdoy0$(_.kotlin.sequences.sequenceOf_9mqe4v$([$receiver, elements])); - }, plusElement_8xuhcw$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.plusElement_8xuhcw$", function($receiver, element) { - return _.kotlin.sequences.plus_8xuhcw$($receiver, element); - }), zip_j4v1m4$f:function(t1, t2) { - return _.kotlin.to_l1ob02$(t1, t2); - }, zip_j4v1m4$:function($receiver, other) { - return new _.kotlin.sequences.MergingSequence($receiver, other, _.kotlin.sequences.zip_j4v1m4$f); - }, zip_houmqe$:function($receiver, other, transform) { - return new _.kotlin.sequences.MergingSequence($receiver, other, transform); - }, joinTo_mrn40q$:function($receiver, buffer, separator, prefix, postfix, limit, truncated, transform) { - var tmp$0; - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - buffer.append(prefix); - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - if (++count > 1) { - buffer.append(separator); - } - if (limit < 0 || count <= limit) { - if (transform != null) { - buffer.append(transform(element)); - } else { - buffer.append(element == null ? "null" : element.toString()); - } - } else { - break; - } - } - if (limit >= 0 && count > limit) { - buffer.append(truncated); - } - buffer.append(postfix); - return buffer; - }, joinToString_mbzd5w$:function($receiver, separator, prefix, postfix, limit, truncated, transform) { - if (separator === void 0) { - separator = ", "; - } - if (prefix === void 0) { - prefix = ""; - } - if (postfix === void 0) { - postfix = ""; - } - if (limit === void 0) { - limit = -1; - } - if (truncated === void 0) { - truncated = "..."; - } - if (transform === void 0) { - transform = null; - } - return _.kotlin.sequences.joinTo_mrn40q$($receiver, new Kotlin.StringBuilder, separator, prefix, postfix, limit, truncated, transform).toString(); - }, asIterable_uya9q7$f:function(this$asIterable) { - return function() { - return this$asIterable.iterator(); - }; - }, asIterable_uya9q7$:function($receiver) { - return new _.kotlin.collections.Iterable$f(_.kotlin.sequences.asIterable_uya9q7$f($receiver)); - }, asSequence_uya9q7$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.asSequence_uya9q7$", function($receiver) { - return $receiver; - }), average_zhcojx$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_662s1b$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_utw0os$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_uwi6zd$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_hzzbsh$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, average_l0u5c4$:function($receiver) { - var tmp$0; - var sum = 0; - var count = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - count += 1; - } - return count === 0 ? 0 : sum / count; - }, sum_zhcojx$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_662s1b$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_utw0os$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_uwi6zd$:function($receiver) { - var tmp$0; - var sum = Kotlin.Long.ZERO; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum = sum.add(element); - } - return sum; - }, sum_hzzbsh$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, sum_l0u5c4$:function($receiver) { - var tmp$0; - var sum = 0; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var element = tmp$0.next(); - sum += element; - } - return sum; - }, Sequence:Kotlin.createTrait(null), Sequence$f:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(closure$iterator_0) { - this.closure$iterator_0 = closure$iterator_0; - }, {iterator:function() { - return this.closure$iterator_0(); - }}, {}), Sequence_kxhynv$:Kotlin.defineInlineFunction("stdlib.kotlin.sequences.Sequence_kxhynv$", function(iterator) { - return new _.kotlin.sequences.Sequence$f(iterator); - }), asSequence_123wqf$f:function(this$asSequence) { - return function() { - return this$asSequence; - }; - }, asSequence_123wqf$:function($receiver) { - return _.kotlin.sequences.constrainOnce_uya9q7$(new _.kotlin.sequences.Sequence$f(_.kotlin.sequences.asSequence_123wqf$f($receiver))); - }, sequenceOf_9mqe4v$:function(elements) { - return elements.length === 0 ? _.kotlin.sequences.emptySequence() : _.kotlin.collections.asSequence_eg9ybj$(elements); - }, emptySequence:function() { - return _.kotlin.sequences.EmptySequence; - }, EmptySequence:Kotlin.createObject(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, null, {iterator:function() { - return _.kotlin.collections.EmptyIterator; - }, drop_za3lpa$:function(n) { - return _.kotlin.sequences.EmptySequence; - }, take_za3lpa$:function(n) { - return _.kotlin.sequences.EmptySequence; - }}), flatten_skdoy0$f:function(it) { - return it.iterator(); - }, flatten_skdoy0$:function($receiver) { - return _.kotlin.sequences.flatten_2($receiver, _.kotlin.sequences.flatten_skdoy0$f); - }, flatten_9q41nu$f:function(it) { - return it.iterator(); - }, flatten_9q41nu$:function($receiver) { - return _.kotlin.sequences.flatten_2($receiver, _.kotlin.sequences.flatten_9q41nu$f); - }, flatten_2$f:function(it) { - return it; - }, flatten_2:function($receiver, iterator) { - var tmp$0; - if (Kotlin.isType($receiver, _.kotlin.sequences.TransformingSequence)) { - return(Kotlin.isType(tmp$0 = $receiver, _.kotlin.sequences.TransformingSequence) ? tmp$0 : Kotlin.throwCCE()).flatten(iterator); - } - return new _.kotlin.sequences.FlatteningSequence($receiver, _.kotlin.sequences.flatten_2$f, iterator); - }, unzip_t83shn$:function($receiver) { - var tmp$0; - var listT = new Kotlin.ArrayList; - var listR = new Kotlin.ArrayList; - tmp$0 = $receiver.iterator(); - while (tmp$0.hasNext()) { - var pair = tmp$0.next(); - listT.add_za3rmp$(pair.first); - listR.add_za3rmp$(pair.second); - } - return _.kotlin.to_l1ob02$(listT, listR); - }, FilteringSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, sendWhen, predicate) { - if (sendWhen === void 0) { - sendWhen = true; - } - this.sequence_z4pg1f$ = sequence; - this.sendWhen_y7o6ge$ = sendWhen; - this.predicate_rgqu8l$ = predicate; - }, {iterator:function() { - return new _.kotlin.sequences.FilteringSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$FilteringSequence) { - this.this$FilteringSequence_0 = this$FilteringSequence; - this.iterator = this$FilteringSequence.sequence_z4pg1f$.iterator(); - this.nextState = -1; - this.nextItem = null; - }, {calcNext:function() { - while (this.iterator.hasNext()) { - var item = this.iterator.next(); - if (Kotlin.equals(this.this$FilteringSequence_0.predicate_rgqu8l$(item), this.this$FilteringSequence_0.sendWhen_y7o6ge$)) { - this.nextItem = item; - this.nextState = 1; - return; - } - } - this.nextState = 0; - }, next:function() { - var tmp$0; - if (this.nextState === -1) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = this.nextItem; - this.nextItem = null; - this.nextState = -1; - return(tmp$0 = result) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - }, hasNext:function() { - if (this.nextState === -1) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), TransformingSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, transformer) { - this.sequence_n6gmof$ = sequence; - this.transformer_t8sv9n$ = transformer; - }, {iterator:function() { - return new _.kotlin.sequences.TransformingSequence.iterator$f(this); - }, flatten:function(iterator) { - return new _.kotlin.sequences.FlatteningSequence(this.sequence_n6gmof$, this.transformer_t8sv9n$, iterator); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TransformingSequence) { - this.this$TransformingSequence_0 = this$TransformingSequence; - this.iterator = this$TransformingSequence.sequence_n6gmof$.iterator(); - }, {next:function() { - return this.this$TransformingSequence_0.transformer_t8sv9n$(this.iterator.next()); - }, hasNext:function() { - return this.iterator.hasNext(); - }}, {})}), TransformingIndexedSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, transformer) { - this.sequence_wt2qws$ = sequence; - this.transformer_vk8fya$ = transformer; - }, {iterator:function() { - return new _.kotlin.sequences.TransformingIndexedSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TransformingIndexedSequence) { - this.this$TransformingIndexedSequence_0 = this$TransformingIndexedSequence; - this.iterator = this$TransformingIndexedSequence.sequence_wt2qws$.iterator(); - this.index = 0; - }, {next:function() { - return this.this$TransformingIndexedSequence_0.transformer_vk8fya$(this.index++, this.iterator.next()); - }, hasNext:function() { - return this.iterator.hasNext(); - }}, {})}), IndexingSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence) { - this.sequence_4mu851$ = sequence; - }, {iterator:function() { - return new _.kotlin.sequences.IndexingSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$IndexingSequence) { - this.iterator = this$IndexingSequence.sequence_4mu851$.iterator(); - this.index = 0; - }, {next:function() { - return new _.kotlin.collections.IndexedValue(this.index++, this.iterator.next()); - }, hasNext:function() { - return this.iterator.hasNext(); - }}, {})}), MergingSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence1, sequence2, transform) { - this.sequence1_gsgqfj$ = sequence1; - this.sequence2_gsgqfk$ = sequence2; - this.transform_ieuv6d$ = transform; - }, {iterator:function() { - return new _.kotlin.sequences.MergingSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$MergingSequence) { - this.this$MergingSequence_0 = this$MergingSequence; - this.iterator1 = this$MergingSequence.sequence1_gsgqfj$.iterator(); - this.iterator2 = this$MergingSequence.sequence2_gsgqfk$.iterator(); - }, {next:function() { - return this.this$MergingSequence_0.transform_ieuv6d$(this.iterator1.next(), this.iterator2.next()); - }, hasNext:function() { - return this.iterator1.hasNext() && this.iterator2.hasNext(); - }}, {})}), FlatteningSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, transformer, iterator) { - this.sequence_cjvkmf$ = sequence; - this.transformer_eche5v$ = transformer; - this.iterator_9sfvmc$ = iterator; - }, {iterator:function() { - return new _.kotlin.sequences.FlatteningSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$FlatteningSequence) { - this.this$FlatteningSequence_0 = this$FlatteningSequence; - this.iterator = this$FlatteningSequence.sequence_cjvkmf$.iterator(); - this.itemIterator = null; - }, {next:function() { - var tmp$0; - if (!this.ensureItemIterator()) { - throw new Kotlin.NoSuchElementException; - } - return((tmp$0 = this.itemIterator) != null ? tmp$0 : Kotlin.throwNPE()).next(); - }, hasNext:function() { - return this.ensureItemIterator(); - }, ensureItemIterator:function() { - var tmp$0; - if (Kotlin.equals((tmp$0 = this.itemIterator) != null ? tmp$0.hasNext() : null, false)) { - this.itemIterator = null; - } - while (this.itemIterator == null) { - if (!this.iterator.hasNext()) { - return false; - } else { - var element = this.iterator.next(); - var nextItemIterator = this.this$FlatteningSequence_0.iterator_9sfvmc$(this.this$FlatteningSequence_0.transformer_eche5v$(element)); - if (nextItemIterator.hasNext()) { - this.itemIterator = nextItemIterator; - return true; - } - } - } - return true; - }}, {})}), DropTakeSequence:Kotlin.createTrait(function() { - return[_.kotlin.sequences.Sequence]; - }), SubSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, function(sequence, startIndex, endIndex) { - this.sequence_oyhgp5$ = sequence; - this.startIndex_90rd2$ = startIndex; - this.endIndex_j2ttcj$ = endIndex; - if (!(this.startIndex_90rd2$ >= 0)) { - var message = "startIndex should be non-negative, but is " + this.startIndex_90rd2$; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - if (!(this.endIndex_j2ttcj$ >= 0)) { - var message_0 = "endIndex should be non-negative, but is " + this.endIndex_j2ttcj$; - throw new Kotlin.IllegalArgumentException(message_0.toString()); - } - if (!(this.endIndex_j2ttcj$ >= this.startIndex_90rd2$)) { - var message_1 = "endIndex should be not less than startIndex, but was " + this.endIndex_j2ttcj$ + " \x3c " + this.startIndex_90rd2$; - throw new Kotlin.IllegalArgumentException(message_1.toString()); - } - }, {count_9mr353$:{get:function() { - return this.endIndex_j2ttcj$ - this.startIndex_90rd2$; - }}, drop_za3lpa$:function(n) { - return n >= this.count_9mr353$ ? _.kotlin.sequences.emptySequence() : new _.kotlin.sequences.SubSequence(this.sequence_oyhgp5$, this.startIndex_90rd2$ + n, this.endIndex_j2ttcj$); - }, take_za3lpa$:function(n) { - return n >= this.count_9mr353$ ? this : new _.kotlin.sequences.SubSequence(this.sequence_oyhgp5$, this.startIndex_90rd2$, this.startIndex_90rd2$ + n); - }, iterator:function() { - return new _.kotlin.sequences.SubSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$SubSequence) { - this.this$SubSequence_0 = this$SubSequence; - this.iterator = this$SubSequence.sequence_oyhgp5$.iterator(); - this.position = 0; - }, {drop:function() { - while (this.position < this.this$SubSequence_0.startIndex_90rd2$ && this.iterator.hasNext()) { - this.iterator.next(); - this.position++; - } - }, hasNext:function() { - this.drop(); - return this.position < this.this$SubSequence_0.endIndex_j2ttcj$ && this.iterator.hasNext(); - }, next:function() { - this.drop(); - if (this.position >= this.this$SubSequence_0.endIndex_j2ttcj$) { - throw new Kotlin.NoSuchElementException; - } - this.position++; - return this.iterator.next(); - }}, {})}), TakeSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, function(sequence, count) { - this.sequence_4b84m6$ = sequence; - this.count_rcgz8u$ = count; - if (!(this.count_rcgz8u$ >= 0)) { - var message = "count must be non-negative, but was " + this.count_rcgz8u$ + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }, {drop_za3lpa$:function(n) { - return n >= this.count_rcgz8u$ ? _.kotlin.sequences.emptySequence() : new _.kotlin.sequences.SubSequence(this.sequence_4b84m6$, n, this.count_rcgz8u$); - }, take_za3lpa$:function(n) { - return n >= this.count_rcgz8u$ ? this : new _.kotlin.sequences.TakeSequence(this.sequence_4b84m6$, n); - }, iterator:function() { - return new _.kotlin.sequences.TakeSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TakeSequence) { - this.left = this$TakeSequence.count_rcgz8u$; - this.iterator = this$TakeSequence.sequence_4b84m6$.iterator(); - }, {next:function() { - if (this.left === 0) { - throw new Kotlin.NoSuchElementException; - } - this.left--; - return this.iterator.next(); - }, hasNext:function() { - return this.left > 0 && this.iterator.hasNext(); - }}, {})}), TakeWhileSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, predicate) { - this.sequence_augs99$ = sequence; - this.predicate_msmsk5$ = predicate; - }, {iterator:function() { - return new _.kotlin.sequences.TakeWhileSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$TakeWhileSequence) { - this.this$TakeWhileSequence_0 = this$TakeWhileSequence; - this.iterator = this$TakeWhileSequence.sequence_augs99$.iterator(); - this.nextState = -1; - this.nextItem = null; - }, {calcNext:function() { - if (this.iterator.hasNext()) { - var item = this.iterator.next(); - if (this.this$TakeWhileSequence_0.predicate_msmsk5$(item)) { - this.nextState = 1; - this.nextItem = item; - return; - } - } - this.nextState = 0; - }, next:function() { - var tmp$0; - if (this.nextState === -1) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = (tmp$0 = this.nextItem) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - this.nextItem = null; - this.nextState = -1; - return result; - }, hasNext:function() { - if (this.nextState === -1) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), DropSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.DropTakeSequence, _.kotlin.sequences.Sequence]; - }, function(sequence, count) { - this.sequence_mdo2d2$ = sequence; - this.count_52wnp6$ = count; - if (!(this.count_52wnp6$ >= 0)) { - var message = "count must be non-negative, but was " + this.count_52wnp6$ + "."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - }, {drop_za3lpa$:function(n) { - return new _.kotlin.sequences.DropSequence(this.sequence_mdo2d2$, this.count_52wnp6$ + n); - }, take_za3lpa$:function(n) { - return new _.kotlin.sequences.SubSequence(this.sequence_mdo2d2$, this.count_52wnp6$, this.count_52wnp6$ + n); - }, iterator:function() { - return new _.kotlin.sequences.DropSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$DropSequence) { - this.iterator = this$DropSequence.sequence_mdo2d2$.iterator(); - this.left = this$DropSequence.count_52wnp6$; - }, {drop:function() { - while (this.left > 0 && this.iterator.hasNext()) { - this.iterator.next(); - this.left--; - } - }, next:function() { - this.drop(); - return this.iterator.next(); - }, hasNext:function() { - this.drop(); - return this.iterator.hasNext(); - }}, {})}), DropWhileSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(sequence, predicate) { - this.sequence_474bkb$ = sequence; - this.predicate_81zatf$ = predicate; - }, {iterator:function() { - return new _.kotlin.sequences.DropWhileSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$DropWhileSequence) { - this.this$DropWhileSequence_0 = this$DropWhileSequence; - this.iterator = this$DropWhileSequence.sequence_474bkb$.iterator(); - this.dropState = -1; - this.nextItem = null; - }, {drop:function() { - while (this.iterator.hasNext()) { - var item = this.iterator.next(); - if (!this.this$DropWhileSequence_0.predicate_81zatf$(item)) { - this.nextItem = item; - this.dropState = 1; - return; - } - } - this.dropState = 0; - }, next:function() { - var tmp$0; - if (this.dropState === -1) { - this.drop(); - } - if (this.dropState === 1) { - var result = (tmp$0 = this.nextItem) == null || tmp$0 != null ? tmp$0 : Kotlin.throwCCE(); - this.nextItem = null; - this.dropState = 0; - return result; - } - return this.iterator.next(); - }, hasNext:function() { - if (this.dropState === -1) { - this.drop(); - } - return this.dropState === 1 || this.iterator.hasNext(); - }}, {})}), DistinctSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(source, keySelector) { - this.source_2sma8z$ = source; - this.keySelector_x7nm6u$ = keySelector; - }, {iterator:function() { - return new _.kotlin.sequences.DistinctIterator(this.source_2sma8z$.iterator(), this.keySelector_x7nm6u$); - }}), DistinctIterator:Kotlin.createClass(function() { - return[_.kotlin.collections.AbstractIterator]; - }, function $fun(source, keySelector) { - $fun.baseInitializer.call(this); - this.source_8cb0nq$ = source; - this.keySelector_t0csl9$ = keySelector; - this.observed_x3rjst$ = new Kotlin.ComplexHashSet; - }, {computeNext:function() { - while (this.source_8cb0nq$.hasNext()) { - var next = this.source_8cb0nq$.next(); - var key = this.keySelector_t0csl9$(next); - if (this.observed_x3rjst$.add_za3rmp$(key)) { - this.setNext_za3rmp$(next); - return; - } - } - this.done(); - }}), GeneratorSequence:Kotlin.createClass(function() { - return[_.kotlin.sequences.Sequence]; - }, function(getInitialValue, getNextValue) { - this.getInitialValue_of3t40$ = getInitialValue; - this.getNextValue_wqyet1$ = getNextValue; - }, {iterator:function() { - return new _.kotlin.sequences.GeneratorSequence.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterator]; - }, function(this$GeneratorSequence_0) { - this.this$GeneratorSequence_0 = this$GeneratorSequence_0; - this.nextItem = null; - this.nextState = -2; - }, {calcNext:function() { - var tmp$0; - this.nextItem = this.nextState === -2 ? this.this$GeneratorSequence_0.getInitialValue_of3t40$() : this.this$GeneratorSequence_0.getNextValue_wqyet1$((tmp$0 = this.nextItem) != null ? tmp$0 : Kotlin.throwNPE()); - this.nextState = this.nextItem == null ? 0 : 1; - }, next:function() { - var tmp$0; - if (this.nextState < 0) { - this.calcNext(); - } - if (this.nextState === 0) { - throw new Kotlin.NoSuchElementException; - } - var result = (tmp$0 = this.nextItem) != null ? tmp$0 : Kotlin.throwCCE(); - this.nextState = -1; - return result; - }, hasNext:function() { - if (this.nextState < 0) { - this.calcNext(); - } - return this.nextState === 1; - }}, {})}), constrainOnce_uya9q7$:function($receiver) { - return Kotlin.isType($receiver, _.kotlin.sequences.ConstrainedOnceSequence) ? $receiver : new _.kotlin.sequences.ConstrainedOnceSequence($receiver); - }, generateSequence_un3fny$f:function(closure$nextFunction) { - return function(it) { - return closure$nextFunction(); - }; - }, generateSequence_un3fny$:function(nextFunction) { - return _.kotlin.sequences.constrainOnce_uya9q7$(new _.kotlin.sequences.GeneratorSequence(nextFunction, _.kotlin.sequences.generateSequence_un3fny$f(nextFunction))); - }, generateSequence_hiyix$f:function(closure$seed) { - return function() { - return closure$seed; - }; - }, generateSequence_hiyix$:function(seed, nextFunction) { - return seed == null ? _.kotlin.sequences.EmptySequence : new _.kotlin.sequences.GeneratorSequence(_.kotlin.sequences.generateSequence_hiyix$f(seed), nextFunction); - }, generateSequence_x7nywq$:function(seedFunction, nextFunction) { - return new _.kotlin.sequences.GeneratorSequence(seedFunction, nextFunction); - }}), dom:Kotlin.definePackage(null, {build:Kotlin.definePackage(null, {createElement_juqb3g$:function($receiver, name, init) { - var elem = $receiver.createElement(name); - init.call(elem); - return elem; - }, createElement_hart3b$:function($receiver, name, doc, init) { - if (doc === void 0) { - doc = null; - } - var elem = _.kotlin.dom.ownerDocument_pmnl5l$($receiver, doc).createElement(name); - init.call(elem); - return elem; - }, addElement_juqb3g$:function($receiver, name, init) { - var child = _.kotlin.dom.build.createElement_juqb3g$($receiver, name, init); - $receiver.appendChild(child); - return child; - }, addElement_hart3b$:function($receiver, name, doc, init) { - if (doc === void 0) { - doc = null; - } - var child = _.kotlin.dom.build.createElement_hart3b$($receiver, name, doc, init); - $receiver.appendChild(child); - return child; - }}), hasClass_cjmw3z$:function($receiver, cssClass) { - return _.kotlin.text.Regex_61zpoe$("(^|.*" + "\\" + "s+)" + cssClass + "(" + "$" + "|" + "\\" + "s+.*)").matches_6bul2c$($receiver.className); - }, addClass_fwdim7$:function($receiver, cssClasses) { - var destination = new Kotlin.ArrayList; - var tmp$0, tmp$1, tmp$2; - tmp$0 = cssClasses, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (!_.kotlin.dom.hasClass_cjmw3z$($receiver, element)) { - destination.add_za3rmp$(element); - } - } - var missingClasses = destination; - if (!missingClasses.isEmpty()) { - var tmp$3; - var presentClasses = _.kotlin.text.trim_gw00vq$($receiver.className).toString(); - var $receiver_0 = new Kotlin.StringBuilder; - $receiver_0.append(presentClasses); - if (!(presentClasses.length === 0)) { - $receiver_0.append(" "); - } - _.kotlin.collections.joinTo_euycuk$(missingClasses, $receiver_0, " "); - $receiver.className = $receiver_0.toString(); - return true; - } - return false; - }, removeClass_fwdim7$:function($receiver, cssClasses) { - var any_dgtl0h$result; - any_dgtl0h$break: { - var tmp$0, tmp$1, tmp$2; - tmp$0 = cssClasses, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var element = tmp$0[tmp$2]; - if (_.kotlin.dom.hasClass_cjmw3z$($receiver, element)) { - any_dgtl0h$result = true; - break any_dgtl0h$break; - } - } - any_dgtl0h$result = false; - } - if (any_dgtl0h$result) { - var toBeRemoved = _.kotlin.collections.toSet_eg9ybj$(cssClasses); - var tmp$4; - var tmp$3 = _.kotlin.text.trim_gw00vq$($receiver.className).toString(); - var toRegex_pdl1w0$result; - toRegex_pdl1w0$result = _.kotlin.text.Regex_61zpoe$("\\s+"); - var limit; - var split_nhz2th$result; - limit = 0; - split_nhz2th$result = toRegex_pdl1w0$result.split_905azu$(tmp$3, limit); - var destination = new Kotlin.ArrayList; - var tmp$5; - tmp$5 = split_nhz2th$result.iterator(); - while (tmp$5.hasNext()) { - var element_0 = tmp$5.next(); - if (!toBeRemoved.contains_za3rmp$(element_0)) { - destination.add_za3rmp$(element_0); - } - } - $receiver.className = _.kotlin.collections.joinToString_ld60a2$(destination, " "); - return true; - } - return false; - }, children_ejp6nl$:function($receiver) { - var tmp$0, tmp$1; - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.childNodes : null) != null ? _.kotlin.dom.asList_d3eamn$(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, childElements_ejp6nl$:function($receiver) { - var tmp$0, tmp$1; - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.childNodes : null) != null ? _.kotlin.dom.filterElements_d3eamn$(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, childElements_cjmw3z$:function($receiver, name) { - var tmp$0, tmp$1, tmp$2; - var tmp$3; - if ((tmp$1 = (tmp$0 = $receiver != null ? $receiver.childNodes : null) != null ? _.kotlin.dom.filterElements_d3eamn$(tmp$0) : null) != null) { - var destination = new Kotlin.ArrayList; - var tmp$4; - tmp$4 = tmp$1.iterator(); - while (tmp$4.hasNext()) { - var element = tmp$4.next(); - if (Kotlin.equals(element.nodeName, name)) { - destination.add_za3rmp$(element); - } - } - tmp$3 = destination; - } else { - tmp$3 = null; - } - return(tmp$2 = tmp$3) != null ? tmp$2 : _.kotlin.collections.emptyList(); - }, get_elements_4wc2mi$:{value:function($receiver) { - return _.kotlin.dom.elements_nnvvt4$($receiver); - }}, get_elements_ejp6nl$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.elements_cjmw3z$($receiver) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }}, elements_cjmw3z$_0:function($receiver, localName) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.elements_cjmw3z$($receiver, localName) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, elements_cjmw3z$:function($receiver, localName) { - if (localName === void 0) { - localName = "*"; - } - return _.kotlin.dom.asElementList_1($receiver.getElementsByTagName(localName)); - }, elements_nnvvt4$:function($receiver, localName) { - var tmp$0, tmp$1; - if (localName === void 0) { - localName = "*"; - } - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.getElementsByTagName(localName) : null) != null ? _.kotlin.dom.asElementList_1(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, elements_achogv$:function($receiver, namespaceUri, localName) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.elements_achogv$_0($receiver, namespaceUri, localName) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, elements_achogv$_0:function($receiver, namespaceUri, localName) { - return _.kotlin.dom.asElementList_1($receiver.getElementsByTagNameNS(namespaceUri, localName)); - }, elements_awnjmu$:function($receiver, namespaceUri, localName) { - var tmp$0, tmp$1; - return(tmp$1 = (tmp$0 = $receiver != null ? $receiver.getElementsByTagNameNS(namespaceUri, localName) : null) != null ? _.kotlin.dom.asElementList_1(tmp$0) : null) != null ? tmp$1 : _.kotlin.collections.emptyList(); - }, asList_d3eamn$_0:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, asList_d3eamn$:function($receiver) { - return new _.kotlin.dom.NodeListAsList($receiver); - }, toElementList_d3eamn$:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asElementList_d3eamn$($receiver) : null) != null ? tmp$0 : _.kotlin.collections.emptyList(); - }, asElementList_d3eamn$:function($receiver) { - return $receiver.length === 0 ? _.kotlin.collections.emptyList() : new _.kotlin.dom.ElementListAsList($receiver); - }, filterElements_24irbb$:function($receiver) { - var tmp$0; - var tmp$1 = Kotlin.isInstanceOf(Kotlin.modules["builtins"].kotlin.collections.List); - var destination = new Kotlin.ArrayList; - var tmp$2; - tmp$2 = $receiver.iterator(); - while (tmp$2.hasNext()) { - var element = tmp$2.next(); - if (_.kotlin.dom.get_isElement_asww5t$(element)) { - destination.add_za3rmp$(element); - } - } - return tmp$1(tmp$0 = destination) ? tmp$0 : Kotlin.throwCCE(); - }, filterElements_d3eamn$:function($receiver) { - return _.kotlin.dom.filterElements_24irbb$(_.kotlin.dom.asList_d3eamn$($receiver)); - }, NodeListAsList:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this); - this.delegate_jo5qae$ = delegate; - }, {size:{get:function() { - return this.delegate_jo5qae$.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$(index)) { - return(tmp$0 = this.delegate_jo5qae$.item(index)) != null ? tmp$0 : Kotlin.throwNPE(); - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + index + " is not in range [0 .. " + (this.size - 1) + ")"); - } - }}), ElementListAsList:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(nodeList) { - $fun.baseInitializer.call(this); - this.nodeList_yjzc8t$ = nodeList; - }, {get_za3lpa$:function(index) { - var tmp$0; - var node = this.nodeList_yjzc8t$.item(index); - if (node == null) { - throw new Kotlin.IndexOutOfBoundsException("NodeList does not contain a node at index: " + index); - } else { - if (node.nodeType === Node.ELEMENT_NODE) { - return Kotlin.isType(tmp$0 = node, Element) ? tmp$0 : Kotlin.throwCCE(); - } else { - throw new Kotlin.IllegalArgumentException("Node is not an Element as expected but is " + Kotlin.toString(node)); - } - } - }, size:{get:function() { - return this.nodeList_yjzc8t$.length; - }}}), nextSiblings_asww5t$:function($receiver) { - return new _.kotlin.dom.NextSiblings($receiver); - }, NextSiblings:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(node) { - this.node_9zprnx$ = node; - }, {iterator:function() { - return new _.kotlin.dom.NextSiblings.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[_.kotlin.collections.AbstractIterator]; - }, function $fun(this$NextSiblings_0) { - this.this$NextSiblings_0 = this$NextSiblings_0; - $fun.baseInitializer.call(this); - }, {computeNext:function() { - var nextValue = this.this$NextSiblings_0.node_9zprnx$.nextSibling; - if (nextValue != null) { - this.setNext_za3rmp$(nextValue); - this.this$NextSiblings_0.node_9zprnx$ = nextValue; - } else { - this.done(); - } - }}, {})}), previousSiblings_asww5t$:function($receiver) { - return new _.kotlin.dom.PreviousSiblings($receiver); - }, PreviousSiblings:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.collections.Iterable]; - }, function(node) { - this.node_ugyp4f$ = node; - }, {iterator:function() { - return new _.kotlin.dom.PreviousSiblings.iterator$f(this); - }}, {iterator$f:Kotlin.createClass(function() { - return[_.kotlin.collections.AbstractIterator]; - }, function $fun(this$PreviousSiblings_0) { - this.this$PreviousSiblings_0 = this$PreviousSiblings_0; - $fun.baseInitializer.call(this); - }, {computeNext:function() { - var nextValue = this.this$PreviousSiblings_0.node_ugyp4f$.previousSibling; - if (nextValue != null) { - this.setNext_za3rmp$(nextValue); - this.this$PreviousSiblings_0.node_ugyp4f$ = nextValue; - } else { - this.done(); - } - }}, {})}), get_isText_asww5t$:{value:function($receiver) { - return $receiver.nodeType === Node.TEXT_NODE || $receiver.nodeType === Node.CDATA_SECTION_NODE; - }}, get_isElement_asww5t$:{value:function($receiver) { - return $receiver.nodeType === Node.ELEMENT_NODE; - }}, attribute_cjmw3z$:function($receiver, name) { - var tmp$0; - return(tmp$0 = $receiver.getAttribute(name)) != null ? tmp$0 : ""; - }, get_head_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.firstOrNull_a7ptmv$(tmp$0) : null; - }}, get_first_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.firstOrNull_a7ptmv$(tmp$0) : null; - }}, get_last_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.lastOrNull_a7ptmv$(tmp$0) : null; - }}, get_tail_d3eamn$:{value:function($receiver) { - var tmp$0; - return(tmp$0 = $receiver != null ? _.kotlin.dom.asList_d3eamn$($receiver) : null) != null ? _.kotlin.collections.lastOrNull_a7ptmv$(tmp$0) : null; - }}, eventHandler_kcwmyb$:function(handler) { - return new _.kotlin.dom.EventListenerHandler(handler); - }, EventListenerHandler:Kotlin.createClass(null, function(handler) { - this.handler_nfhy41$ = handler; - }, {handleEvent:function(e) { - this.handler_nfhy41$(e); - }, toString:function() { - return "EventListenerHandler(" + this.handler_nfhy41$ + ")"; - }}), mouseEventHandler_3m19zy$f:function(closure$handler) { - return function(e) { - if (Kotlin.isType(e, MouseEvent)) { - closure$handler(e); - } - }; - }, mouseEventHandler_3m19zy$:function(handler) { - return _.kotlin.dom.eventHandler_kcwmyb$(_.kotlin.dom.mouseEventHandler_3m19zy$f(handler)); - }, on_9k7t35$:function($receiver, name, capture, handler) { - return _.kotlin.dom.on_edii0a$($receiver, name, capture, _.kotlin.dom.eventHandler_kcwmyb$(handler)); - }, on_edii0a$:function($receiver, name, capture, listener) { - var tmp$0; - if (Kotlin.isType($receiver, EventTarget)) { - $receiver.addEventListener(name, listener, capture); - tmp$0 = new _.kotlin.dom.CloseableEventListener($receiver, listener, name, capture); - } else { - tmp$0 = null; - } - return tmp$0; - }, CloseableEventListener:Kotlin.createClass(function() { - return[Kotlin.Closeable]; - }, function(target, listener, name, capture) { - this.target_isfv2i$ = target; - this.listener_q3o4k3$ = listener; - this.name_a3xzng$ = name; - this.capture_m7iaz7$ = capture; - }, {close:function() { - this.target_isfv2i$.removeEventListener(this.name_a3xzng$, this.listener_q3o4k3$, this.capture_m7iaz7$); - }, toString:function() { - return "CloseableEventListener(" + this.target_isfv2i$ + ", " + this.name_a3xzng$ + ")"; - }}), onClick_g2lu80$:function($receiver, capture, handler) { - if (capture === void 0) { - capture = false; - } - return _.kotlin.dom.on_edii0a$($receiver, "click", capture, _.kotlin.dom.mouseEventHandler_3m19zy$(handler)); - }, onDoubleClick_g2lu80$:function($receiver, capture, handler) { - if (capture === void 0) { - capture = false; - } - return _.kotlin.dom.on_edii0a$($receiver, "dblclick", capture, _.kotlin.dom.mouseEventHandler_3m19zy$(handler)); - }, get_nnvvt4$:function($receiver, selector) { - var tmp$0, tmp$1, tmp$2; - return(tmp$2 = (tmp$1 = (tmp$0 = $receiver != null ? $receiver.querySelectorAll(selector) : null) != null ? _.kotlin.dom.asList_d3eamn$(tmp$0) : null) != null ? _.kotlin.dom.filterElements_24irbb$(tmp$1) : null) != null ? tmp$2 : _.kotlin.collections.emptyList(); - }, get_cjmw3z$:function($receiver, selector) { - return _.kotlin.dom.filterElements_24irbb$(_.kotlin.dom.asList_d3eamn$($receiver.querySelectorAll(selector))); - }, HTMLCollectionListView:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(collection) { - $fun.baseInitializer.call(this); - this.collection = collection; - }, {size:{get:function() { - return this.collection.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$(index)) { - return Kotlin.isType(tmp$0 = this.collection.item(index), HTMLElement) ? tmp$0 : Kotlin.throwCCE(); - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + index + " is not in range [0 .. " + (this.size - 1) + ")"); - } - }}), asList_sg7yuw$:function($receiver) { - return new _.kotlin.dom.HTMLCollectionListView($receiver); - }, DOMTokenListView:Kotlin.createClass(function() { - return[Kotlin.AbstractList]; - }, function $fun(delegate) { - $fun.baseInitializer.call(this); - this.delegate = delegate; - }, {size:{get:function() { - return this.delegate.length; - }}, get_za3lpa$:function(index) { - var tmp$0; - if ((new Kotlin.NumberRange(0, this.size - 1)).contains_htax2k$(index)) { - return(tmp$0 = this.delegate.item(index)) != null ? tmp$0 : Kotlin.throwNPE(); - } else { - throw new Kotlin.IndexOutOfBoundsException("index " + index + " is not in range [0 .. " + (this.size - 1) + ")"); - } - }}), asList_u75qis$:function($receiver) { - return new _.kotlin.dom.DOMTokenListView($receiver); - }, asElementList_1:function($receiver) { - return _.kotlin.dom.asList_sg7yuw$($receiver); - }, clear_asww5t$:function($receiver) { - var tmp$0; - while ($receiver.hasChildNodes()) { - $receiver.removeChild((tmp$0 = $receiver.firstChild) != null ? tmp$0 : Kotlin.throwNPE()); - } - }, removeFromParent_asww5t$:function($receiver) { - var tmp$0; - (tmp$0 = $receiver.parentNode) != null ? tmp$0.removeChild($receiver) : null; - }, plus_6xfunm$:function($receiver, child) { - $receiver.appendChild(child); - return $receiver; - }, plus_cjmw3z$:function($receiver, text) { - return _.kotlin.dom.appendText_esmrqt$($receiver, text); - }, plusAssign_cjmw3z$:function($receiver, text) { - _.kotlin.dom.appendText_esmrqt$($receiver, text); - }, ownerDocument_pmnl5l$:function($receiver, doc) { - var tmp$0, tmp$1; - if (doc === void 0) { - doc = null; - } - if ($receiver.nodeType === Node.DOCUMENT_NODE) { - return Kotlin.isType(tmp$0 = $receiver, Document) ? tmp$0 : Kotlin.throwCCE(); - } else { - tmp$1 = doc != null ? doc : $receiver.ownerDocument; - if (tmp$1 == null) { - throw new Kotlin.IllegalArgumentException("Neither node contains nor parameter doc provides an owner document for " + $receiver); - } - return tmp$1; - } - }, addText_esmrqt$:function($receiver, text, doc) { - if (doc === void 0) { - doc = null; - } - return _.kotlin.dom.appendText_esmrqt$($receiver, text, doc); - }, addText_cjmw3z$:function($receiver, text) { - return _.kotlin.dom.appendText_esmrqt$($receiver, text); - }, appendText_esmrqt$:function($receiver, text, doc) { - if (doc === void 0) { - doc = null; - } - $receiver.appendChild(_.kotlin.dom.ownerDocument_pmnl5l$($receiver, doc).createTextNode(text)); - return $receiver; - }, appendTo_5kzm9c$:function($receiver, parent) { - parent.appendChild($receiver); - }, createDocument:function() { - return new Document; - }, toXmlString_asww5t$:function($receiver) { - return $receiver.outerHTML; - }, toXmlString_rq0l4m$:function($receiver, xmlDeclaration) { - return $receiver.outerHTML; - }}), test:Kotlin.definePackage(function() { - this.asserter = new _.kotlin.test.QUnitAsserter; - }, {todo_un3fny$:function(block) { - Kotlin.println("TODO at " + block); - }, QUnitAsserter:Kotlin.createClass(function() { - return[_.kotlin.test.Asserter]; - }, null, {assertTrue_tup0fe$:function(lazyMessage, actual) { - _.kotlin.test.assertTrue_8kj6y5$(actual, lazyMessage()); - }, assertTrue_ivxn3r$:function(message, actual) { - ok(actual, message); - if (!actual) { - this.failWithMessage(message); - } - }, fail_61zpoe$:function(message) { - ok(false, message); - this.failWithMessage(message); - }, failWithMessage:function(message) { - if (message == null) { - throw new Kotlin.AssertionError; - } else { - throw new Kotlin.AssertionError(message); - } - }}), assertTrue_c0mt8g$:function(message, block) { - if (message === void 0) { - message = null; - } - _.kotlin.test.assertTrue_8kj6y5$(block(), message); - }, assertTrue_8kj6y5$:function(actual, message) { - if (message === void 0) { - message = null; - } - return _.kotlin.test.asserter.assertTrue_ivxn3r$(message != null ? message : "Expected value to be true.", actual); - }, assertFalse_c0mt8g$:function(message, block) { - if (message === void 0) { - message = null; - } - _.kotlin.test.assertFalse_8kj6y5$(block(), message); - }, assertFalse_8kj6y5$:function(actual, message) { - if (message === void 0) { - message = null; - } - return _.kotlin.test.asserter.assertTrue_ivxn3r$(message != null ? message : "Expected value to be false.", !actual); - }, assertEquals_8vv676$:function(expected, actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertEquals_a59ba6$(message, expected, actual); - }, assertNotEquals_8vv676$:function(illegal, actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNotEquals_a59ba6$(message, illegal, actual); - }, assertNotNull_hwpqgh$:function(actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNotNull_bm4g0d$(message, actual); - return actual != null ? actual : Kotlin.throwNPE(); - }, assertNotNull_nbs6dl$:function(actual, message, block) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNotNull_bm4g0d$(message, actual); - if (actual != null) { - block(actual); - } - }, assertNull_hwpqgh$:function(actual, message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.assertNull_bm4g0d$(message, actual); - }, fail_61zpoe$:function(message) { - if (message === void 0) { - message = null; - } - _.kotlin.test.asserter.fail_61zpoe$(message); - }, expect_pzucw5$:function(expected, block) { - _.kotlin.test.assertEquals_8vv676$(expected, block()); - }, expect_s8u0d3$:function(expected, message, block) { - _.kotlin.test.assertEquals_8vv676$(expected, block(), message); - }, assertFails_qshda6$:function(block) { - try { - block(); - } catch (e) { - return e; - } - _.kotlin.test.asserter.fail_61zpoe$("Expected an exception to be thrown"); - }, Asserter:Kotlin.createTrait(null, {assertTrue_tup0fe$:function(lazyMessage, actual) { - if (!actual) { - this.fail_61zpoe$(lazyMessage()); - } - }, assertTrue_ivxn3r$:function(message, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertTrue_ivxn3r$f(message), actual); - }, assertEquals_a59ba6$:function(message, expected, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertEquals_a59ba6$f(message, expected, actual), Kotlin.equals(actual, expected)); - }, assertNotEquals_a59ba6$:function(message, illegal, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertNotEquals_a59ba6$f(message, actual), !Kotlin.equals(actual, illegal)); - }, assertNull_bm4g0d$:function(message, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertNull_bm4g0d$f(message, actual), actual == null); - }, assertNotNull_bm4g0d$:function(message, actual) { - this.assertTrue_tup0fe$(_.kotlin.test.Asserter.assertNotNull_bm4g0d$f(message), actual != null); - }}, {assertTrue_ivxn3r$f:function(closure$message) { - return function() { - return closure$message; - }; - }, assertEquals_a59ba6$f:function(closure$message, closure$expected, closure$actual) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + ("Expected \x3c" + Kotlin.toString(closure$expected) + "\x3e, actual \x3c" + Kotlin.toString(closure$actual) + "\x3e."); - }; - }, assertNotEquals_a59ba6$f:function(closure$message, closure$actual) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + ("Illegal value: \x3c" + Kotlin.toString(closure$actual) + "\x3e."); - }; - }, assertNull_bm4g0d$f:function(closure$message, closure$actual) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + ("Expected value to be null, but was: \x3c" + Kotlin.toString(closure$actual) + "\x3e."); - }; - }, assertNotNull_bm4g0d$f:function(closure$message) { - return function() { - var tmp$0; - return((tmp$0 = closure$message != null ? closure$message + ". " : null) != null ? tmp$0 : "") + "Expected value to be not null."; - }; - }}), AsserterContributor:Kotlin.createTrait(null)}), annotation:Kotlin.definePackage(null, {AnnotationTarget:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, ANNOTATION_CLASS:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FIELD:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, LOCAL_VARIABLE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, VALUE_PARAMETER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, CONSTRUCTOR:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FUNCTION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_GETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, PROPERTY_SETTER:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, TYPE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, EXPRESSION:function() { - return new _.kotlin.annotation.AnnotationTarget; - }, FILE:function() { - return new _.kotlin.annotation.AnnotationTarget; - }}; - }), AnnotationRetention:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{SOURCE:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, BINARY:function() { - return new _.kotlin.annotation.AnnotationRetention; - }, RUNTIME:function() { - return new _.kotlin.annotation.AnnotationRetention; - }}; - }), Target:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(allowedTargets) { - this.allowedTargets = allowedTargets; - }), Retention:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, function(value) { - if (value === void 0) { - value = _.kotlin.annotation.AnnotationRetention.RUNTIME; - } - this.value = value; - }), Repeatable:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), MustBeDocumented:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)}), reflect:Kotlin.definePackage(null, {KAnnotatedElement:Kotlin.createTrait(null), KCallable:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KAnnotatedElement]; - }), KClass:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KAnnotatedElement, _.kotlin.reflect.KDeclarationContainer]; - }), KDeclarationContainer:Kotlin.createTrait(null), KFunction:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function, _.kotlin.reflect.KCallable]; - }), KParameter:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KAnnotatedElement]; - }, null, {Kind:Kotlin.createEnumClass(function() { - return[Kotlin.Enum]; - }, function $fun() { - $fun.baseInitializer.call(this); - }, function() { - return{INSTANCE:function() { - return new _.kotlin.reflect.KParameter.Kind; - }, EXTENSION_RECEIVER:function() { - return new _.kotlin.reflect.KParameter.Kind; - }, VALUE:function() { - return new _.kotlin.reflect.KParameter.Kind; - }}; - })}), KProperty:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KCallable]; - }, null, {Accessor:Kotlin.createTrait(null), Getter:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KFunction, _.kotlin.reflect.KProperty.Accessor]; - })}), KMutableProperty:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KProperty]; - }, null, {Setter:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KFunction, _.kotlin.reflect.KProperty.Accessor]; - })}), KProperty0:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function0, _.kotlin.reflect.KProperty]; - }, null, {Getter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function0, _.kotlin.reflect.KProperty.Getter]; - })}), KMutableProperty0:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KMutableProperty, _.kotlin.reflect.KProperty0]; - }, null, {Setter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function1, _.kotlin.reflect.KMutableProperty.Setter]; - })}), KProperty1:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function1, _.kotlin.reflect.KProperty]; - }, null, {Getter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function1, _.kotlin.reflect.KProperty.Getter]; - })}), KMutableProperty1:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KMutableProperty, _.kotlin.reflect.KProperty1]; - }, null, {Setter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function2, _.kotlin.reflect.KMutableProperty.Setter]; - })}), KProperty2:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function2, _.kotlin.reflect.KProperty]; - }, null, {Getter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function2, _.kotlin.reflect.KProperty.Getter]; - })}), KMutableProperty2:Kotlin.createTrait(function() { - return[_.kotlin.reflect.KMutableProperty, _.kotlin.reflect.KProperty2]; - }, null, {Setter:Kotlin.createTrait(function() { - return[Kotlin.modules["builtins"].kotlin.Function3, _.kotlin.reflect.KMutableProperty.Setter]; - })}), KType:Kotlin.createTrait(null)}), ranges:Kotlin.definePackage(null, {contains_axyzkj$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_noyhde$:function($receiver, value) { - return $receiver.start.compareTo_za3rmp$(Kotlin.Long.fromInt(value)) <= 0 && Kotlin.Long.fromInt(value).compareTo_za3rmp$($receiver.endInclusive) <= 0; - }, contains_7vxq2o$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_qod4al$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_tzsk0w$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_3hpgcq$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_uw1xdx$:function($receiver, value) { - return $receiver.start.toNumber() <= value && value <= $receiver.endInclusive.toNumber(); - }, contains_o0k7u7$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_jz6vw7$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_d9tryv$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_fyef13$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_o8j6lu$:function($receiver, value) { - return $receiver.start.toNumber() <= value && value <= $receiver.endInclusive.toNumber(); - }, contains_sas5oe$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_vgo278$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_pc36rd$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_8efj5n$:function($receiver, value) { - return $receiver.start.compareTo_za3rmp$(Kotlin.Long.fromInt(value)) <= 0 && Kotlin.Long.fromInt(value).compareTo_za3rmp$($receiver.endInclusive) <= 0; - }, contains_ro5ap$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_8wsbwp$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_8aysva$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_ll81hz$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_axst9b$:function($receiver, value) { - return Kotlin.Long.fromInt($receiver.start).compareTo_za3rmp$(value) <= 0 && value.compareTo_za3rmp$(Kotlin.Long.fromInt($receiver.endInclusive)) <= 0; - }, contains_ntuhui$:function($receiver, value) { - return Kotlin.Long.fromInt($receiver.start).compareTo_za3rmp$(value) <= 0 && value.compareTo_za3rmp$(Kotlin.Long.fromInt($receiver.endInclusive)) <= 0; - }, contains_7w3wdw$:function($receiver, value) { - return Kotlin.Long.fromInt($receiver.start).compareTo_za3rmp$(value) <= 0 && value.compareTo_za3rmp$(Kotlin.Long.fromInt($receiver.endInclusive)) <= 0; - }, contains_qojalt$:function($receiver, value) { - return $receiver.start <= value.toNumber() && value.toNumber() <= $receiver.endInclusive; - }, contains_tzyqc4$:function($receiver, value) { - return $receiver.start <= value.toNumber() && value.toNumber() <= $receiver.endInclusive; - }, contains_g5h77b$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_oflys2$:function($receiver, value) { - return $receiver.start.compareTo_za3rmp$(Kotlin.Long.fromInt(value)) <= 0 && Kotlin.Long.fromInt(value).compareTo_za3rmp$($receiver.endInclusive) <= 0; - }, contains_shuxum$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_p50el5$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, contains_6o6338$:function($receiver, value) { - return $receiver.start <= value && value <= $receiver.endInclusive; - }, downTo_2jcion$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_jzdo0$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, Kotlin.Long.fromInt(to), Kotlin.Long.NEG_ONE); - }, downTo_9q324c$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_9r634a$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_sd97h4$:function($receiver, to) { - return new Kotlin.CharProgression($receiver, to, -1); - }, downTo_rksjo2$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_mw85q1$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, Kotlin.Long.fromInt(to), Kotlin.Long.NEG_ONE); - }, downTo_y20kcl$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_rt69vj$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_2j6cdf$:function($receiver, to) { - return new Kotlin.LongProgression(Kotlin.Long.fromInt($receiver), to, Kotlin.Long.NEG_ONE); - }, downTo_k5jz8$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, to, Kotlin.Long.NEG_ONE); - }, downTo_9q98fk$:function($receiver, to) { - return new Kotlin.LongProgression(Kotlin.Long.fromInt($receiver), to, Kotlin.Long.NEG_ONE); - }, downTo_9qzwt2$:function($receiver, to) { - return new Kotlin.LongProgression(Kotlin.Long.fromInt($receiver), to, Kotlin.Long.NEG_ONE); - }, downTo_7dmh8l$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_hgibo4$:function($receiver, to) { - return new Kotlin.LongProgression($receiver, Kotlin.Long.fromInt(to), Kotlin.Long.NEG_ONE); - }, downTo_hl85u0$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, downTo_i0qws2$:function($receiver, to) { - return new Kotlin.NumberProgression($receiver, to, -1); - }, reversed_zf1xzd$:function($receiver) { - return new Kotlin.NumberProgression($receiver.last, $receiver.first, -$receiver.step); - }, reversed_3080ca$:function($receiver) { - return new Kotlin.LongProgression($receiver.last, $receiver.first, $receiver.step.unaryMinus()); - }, reversed_uthk7o$:function($receiver) { - return new Kotlin.CharProgression($receiver.last, $receiver.first, -$receiver.step); - }, step_7isp7r$:function($receiver, step) { - _.kotlin.ranges.checkStepIsPositive(step > 0, step); - return new Kotlin.NumberProgression($receiver.first, $receiver.last, $receiver.step > 0 ? step : -step); - }, step_bwrvkh$:function($receiver, step) { - _.kotlin.ranges.checkStepIsPositive(step.compareTo_za3rmp$(Kotlin.Long.fromInt(0)) > 0, step); - return new Kotlin.LongProgression($receiver.first, $receiver.last, $receiver.step.compareTo_za3rmp$(Kotlin.Long.fromInt(0)) > 0 ? step : step.unaryMinus()); - }, step_kw37re$:function($receiver, step) { - _.kotlin.ranges.checkStepIsPositive(step > 0, step); - return new Kotlin.CharProgression($receiver.first, $receiver.last, $receiver.step > 0 ? step : -step); - }, until_2jcion$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_jzdo0$:function($receiver, to) { - return $receiver.rangeTo(Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1))); - }, until_9q324c$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_9r634a$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_sd97h4$:function($receiver, to) { - var to_ = Kotlin.toChar(to.charCodeAt(0) - 1); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.CharRange($receiver, to_); - }, until_rksjo2$:function($receiver, to) { - var to_ = Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1)).toInt(); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.NumberRange($receiver, to_); - }, until_mw85q1$:function($receiver, to) { - return $receiver.rangeTo(Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1))); - }, until_y20kcl$:function($receiver, to) { - var to_ = Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1)).toInt(); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.NumberRange($receiver, to_); - }, until_rt69vj$:function($receiver, to) { - var to_ = Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1)).toInt(); - if (to_ > to) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return new Kotlin.NumberRange($receiver, to_); - }, until_2j6cdf$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return Kotlin.Long.fromInt($receiver).rangeTo(to_); - }, until_k5jz8$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return $receiver.rangeTo(to_); - }, until_9q98fk$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return Kotlin.Long.fromInt($receiver).rangeTo(to_); - }, until_9qzwt2$:function($receiver, to) { - var to_ = to.subtract(Kotlin.Long.fromInt(1)); - if (to_.compareTo_za3rmp$(to) > 0) { - throw new Kotlin.IllegalArgumentException("The to argument value '" + to + "' was too small."); - } - return Kotlin.Long.fromInt($receiver).rangeTo(to_); - }, until_7dmh8l$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_hgibo4$:function($receiver, to) { - return $receiver.rangeTo(Kotlin.Long.fromInt(to).subtract(Kotlin.Long.fromInt(1))); - }, until_hl85u0$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, until_i0qws2$:function($receiver, to) { - return new Kotlin.NumberRange($receiver, to - 1); - }, coerceAtLeast_n1zt5e$:function($receiver, minimumValue) { - return Kotlin.compareTo($receiver, minimumValue) < 0 ? minimumValue : $receiver; - }, coerceAtLeast_9q324c$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_i0qws2$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_rksjo2$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_k5jz8$:function($receiver, minimumValue) { - return $receiver.compareTo_za3rmp$(minimumValue) < 0 ? minimumValue : $receiver; - }, coerceAtLeast_3w14zy$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtLeast_541hxq$:function($receiver, minimumValue) { - return $receiver < minimumValue ? minimumValue : $receiver; - }, coerceAtMost_n1zt5e$:function($receiver, maximumValue) { - return Kotlin.compareTo($receiver, maximumValue) > 0 ? maximumValue : $receiver; - }, coerceAtMost_9q324c$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_i0qws2$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_rksjo2$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_k5jz8$:function($receiver, maximumValue) { - return $receiver.compareTo_za3rmp$(maximumValue) > 0 ? maximumValue : $receiver; - }, coerceAtMost_3w14zy$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceAtMost_541hxq$:function($receiver, maximumValue) { - return $receiver > maximumValue ? maximumValue : $receiver; - }, coerceIn_bgp82y$:function($receiver, minimumValue, maximumValue) { - if (minimumValue !== null && maximumValue !== null) { - if (Kotlin.compareTo(minimumValue, maximumValue) > 0) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + Kotlin.toString(maximumValue) + " is less than minimum " + Kotlin.toString(minimumValue) + "."); - } - if (Kotlin.compareTo($receiver, minimumValue) < 0) { - return minimumValue; - } - if (Kotlin.compareTo($receiver, maximumValue) > 0) { - return maximumValue; - } - } else { - if (minimumValue !== null && Kotlin.compareTo($receiver, minimumValue) < 0) { - return minimumValue; - } - if (maximumValue !== null && Kotlin.compareTo($receiver, maximumValue) > 0) { - return maximumValue; - } - } - return $receiver; - }, coerceIn_fhjj23$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_j4lnkd$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_n6qkdc$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_dh3qhr$:function($receiver, minimumValue, maximumValue) { - if (minimumValue.compareTo_za3rmp$(maximumValue) > 0) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver.compareTo_za3rmp$(minimumValue) < 0) { - return minimumValue; - } - if ($receiver.compareTo_za3rmp$(maximumValue) > 0) { - return maximumValue; - } - return $receiver; - }, coerceIn_x1n98z$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_rq40gw$:function($receiver, minimumValue, maximumValue) { - if (minimumValue > maximumValue) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: maximum " + maximumValue + " is less than minimum " + minimumValue + "."); - } - if ($receiver < minimumValue) { - return minimumValue; - } - if ($receiver > maximumValue) { - return maximumValue; - } - return $receiver; - }, coerceIn_4yefu9$:function($receiver, range) { - if (range.isEmpty()) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: " + range + "."); - } - return Kotlin.compareTo($receiver, range.start) < 0 ? range.start : Kotlin.compareTo($receiver, range.endInclusive) > 0 ? range.endInclusive : $receiver; - }, coerceIn_3p661y$:function($receiver, range) { - if (range.isEmpty()) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: " + range + "."); - } - return $receiver < range.start ? range.start : $receiver > range.endInclusive ? range.endInclusive : $receiver; - }, coerceIn_zhas5s$:function($receiver, range) { - if (range.isEmpty()) { - throw new Kotlin.IllegalArgumentException("Cannot coerce value to an empty range: " + range + "."); - } - return $receiver.compareTo_za3rmp$(range.start) < 0 ? range.start : $receiver.compareTo_za3rmp$(range.endInclusive) > 0 ? range.endInclusive : $receiver; - }, ComparableRange:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.ranges.ClosedRange]; - }, function(start, endInclusive) { - this.$start_v9qu5w$ = start; - this.$endInclusive_edlu3r$ = endInclusive; - }, {start:{get:function() { - return this.$start_v9qu5w$; - }}, endInclusive:{get:function() { - return this.$endInclusive_edlu3r$; - }}, equals_za3rmp$:function(other) { - return Kotlin.isType(other, _.kotlin.ranges.ComparableRange) && (this.isEmpty() && other.isEmpty() || Kotlin.equals(this.start, other.start) && Kotlin.equals(this.endInclusive, other.endInclusive)); - }, hashCode:function() { - return this.isEmpty() ? -1 : 31 * Kotlin.hashCode(this.start) + Kotlin.hashCode(this.endInclusive); - }, toString:function() { - return this.start + ".." + this.endInclusive; - }}), rangeTo_n1zt5e$:function($receiver, that) { - return new _.kotlin.ranges.ComparableRange($receiver, that); - }, checkStepIsPositive:function(isPositive, step) { - if (!isPositive) { - throw new Kotlin.IllegalArgumentException("Step must be positive, was: " + step + "."); - } - }}), comparisons:Kotlin.definePackage(null, {compareValuesBy_hhbmn6$:function(a, b, selectors) { - var tmp$0, tmp$1, tmp$2; - if (!(selectors.length > 0)) { - var message = "Failed requirement."; - throw new Kotlin.IllegalArgumentException(message.toString()); - } - tmp$0 = selectors, tmp$1 = tmp$0.length; - for (var tmp$2 = 0;tmp$2 !== tmp$1;++tmp$2) { - var fn = tmp$0[tmp$2]; - var v1 = fn(a); - var v2 = fn(b); - var diff = _.kotlin.comparisons.compareValues_cj5vqg$(v1, v2); - if (diff !== 0) { - return diff; - } - } - return 0; - }, compareValuesBy_mpbrga$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareValuesBy_mpbrga$", function(a, b, selector) { - return _.kotlin.comparisons.compareValues_cj5vqg$(selector(a), selector(b)); - }), compareValuesBy_hfyz69$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareValuesBy_hfyz69$", function(a, b, comparator, selector) { - return comparator.compare(selector(a), selector(b)); - }), compareValues_cj5vqg$:function(a, b) { - var tmp$0; - if (a === b) { - return 0; - } - if (a == null) { - return-1; - } - if (b == null) { - return 1; - } - return Kotlin.compareTo(Kotlin.isComparable(tmp$0 = a) ? tmp$0 : Kotlin.throwCCE(), b); - }, compareBy$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$selectors_0) { - this.closure$selectors_0 = closure$selectors_0; - }, {compare:function(a, b) { - return _.kotlin.comparisons.compareValuesBy_hhbmn6$(a, b, this.closure$selectors_0); - }}, {}), compareBy_so0gvy$:function(selectors) { - return new _.kotlin.comparisons.compareBy$f(selectors); - }, compareBy$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$selector_0) { - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), compareBy_lw40be$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareBy_lw40be$", function(selector) { - return new _.kotlin.comparisons.compareBy$f_0(selector); - }), compareBy$f_1:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0, closure$selector_0) { - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return this.closure$comparator_0.compare(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), compareBy_ej7qdr$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareBy_ej7qdr$", function(comparator, selector) { - return new _.kotlin.comparisons.compareBy$f_1(comparator, selector); - }), compareByDescending$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$selector_0) { - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), compareByDescending_lw40be$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareByDescending_lw40be$", function(selector) { - return new _.kotlin.comparisons.compareByDescending$f(selector); - }), compareByDescending$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0, closure$selector_0) { - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - return this.closure$comparator_0.compare(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), compareByDescending_ej7qdr$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.compareByDescending_ej7qdr$", function(comparator, selector) { - return new _.kotlin.comparisons.compareByDescending$f_0(comparator, selector); - }), thenBy$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenBy_0, closure$selector_0) { - this.this$thenBy_0 = this$thenBy_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenBy_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), thenBy_602gcl$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenBy_602gcl$", function($receiver, selector) { - return new _.kotlin.comparisons.thenBy$f($receiver, selector); - }), thenBy$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenBy_0, closure$comparator_0, closure$selector_0) { - this.this$thenBy_0 = this$thenBy_0; - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenBy_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(this.closure$selector_0(a), this.closure$selector_0(b)); - }}, {}), thenBy_njrgee$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenBy_njrgee$", function($receiver, comparator, selector) { - return new _.kotlin.comparisons.thenBy$f_0($receiver, comparator, selector); - }), thenByDescending$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenByDescending_0, closure$selector_0) { - this.this$thenByDescending_0 = this$thenByDescending_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenByDescending_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : _.kotlin.comparisons.compareValues_cj5vqg$(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), thenByDescending_602gcl$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenByDescending_602gcl$", function($receiver, selector) { - return new _.kotlin.comparisons.thenByDescending$f($receiver, selector); - }), thenByDescending$f_0:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenByDescending_0, closure$comparator_0, closure$selector_0) { - this.this$thenByDescending_0 = this$thenByDescending_0; - this.closure$comparator_0 = closure$comparator_0; - this.closure$selector_0 = closure$selector_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenByDescending_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(this.closure$selector_0(b), this.closure$selector_0(a)); - }}, {}), thenByDescending_njrgee$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenByDescending_njrgee$", function($receiver, comparator, selector) { - return new _.kotlin.comparisons.thenByDescending$f_0($receiver, comparator, selector); - }), thenComparator$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenComparator_0, closure$comparison_0) { - this.this$thenComparator_0 = this$thenComparator_0; - this.closure$comparison_0 = closure$comparison_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenComparator_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparison_0(a, b); - }}, {}), thenComparator_y0jjk4$:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.thenComparator_y0jjk4$", function($receiver, comparison) { - return new _.kotlin.comparisons.thenComparator$f($receiver, comparison); - }), then$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$then_0, closure$comparator_0) { - this.this$then_0 = this$then_0; - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - var previousCompare = this.this$then_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(a, b); - }}, {}), then_zdlmq6$:function($receiver, comparator) { - return new _.kotlin.comparisons.then$f($receiver, comparator); - }, thenDescending$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(this$thenDescending_0, closure$comparator_0) { - this.this$thenDescending_0 = this$thenDescending_0; - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - var previousCompare = this.this$thenDescending_0.compare(a, b); - return previousCompare !== 0 ? previousCompare : this.closure$comparator_0.compare(b, a); - }}, {}), thenDescending_zdlmq6$:function($receiver, comparator) { - return new _.kotlin.comparisons.thenDescending$f($receiver, comparator); - }, nullsFirst$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0) { - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - if (a === b) { - return 0; - } - if (a == null) { - return-1; - } - if (b == null) { - return 1; - } - return this.closure$comparator_0.compare(a, b); - }}, {}), nullsFirst_9wwew7$:function(comparator) { - return new _.kotlin.comparisons.nullsFirst$f(comparator); - }, nullsFirst:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.nullsFirst", function() { - return _.kotlin.comparisons.nullsFirst_9wwew7$(_.kotlin.comparisons.naturalOrder()); - }), nullsLast$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparator_0) { - this.closure$comparator_0 = closure$comparator_0; - }, {compare:function(a, b) { - if (a === b) { - return 0; - } - if (a == null) { - return 1; - } - if (b == null) { - return-1; - } - return this.closure$comparator_0.compare(a, b); - }}, {}), nullsLast_9wwew7$:function(comparator) { - return new _.kotlin.comparisons.nullsLast$f(comparator); - }, nullsLast:Kotlin.defineInlineFunction("stdlib.kotlin.comparisons.nullsLast", function() { - return _.kotlin.comparisons.nullsLast_9wwew7$(_.kotlin.comparisons.naturalOrder()); - }), naturalOrder:function() { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.comparisons.NaturalOrderComparator, Kotlin.Comparator) ? tmp$0 : Kotlin.throwCCE(); - }, reverseOrder:function() { - var tmp$0; - return Kotlin.isType(tmp$0 = _.kotlin.comparisons.ReverseOrderComparator, Kotlin.Comparator) ? tmp$0 : Kotlin.throwCCE(); - }, reversed_n7glsb$:function($receiver) { - var tmp$0, tmp$1; - if (Kotlin.isType($receiver, _.kotlin.comparisons.ReversedComparator)) { - return $receiver.comparator; - } else { - if ($receiver === _.kotlin.comparisons.NaturalOrderComparator) { - return Kotlin.isType(tmp$0 = _.kotlin.comparisons.ReverseOrderComparator, Kotlin.Comparator) ? tmp$0 : Kotlin.throwCCE(); - } else { - if ($receiver === _.kotlin.comparisons.ReverseOrderComparator) { - return Kotlin.isType(tmp$1 = _.kotlin.comparisons.NaturalOrderComparator, Kotlin.Comparator) ? tmp$1 : Kotlin.throwCCE(); - } else { - return new _.kotlin.comparisons.ReversedComparator($receiver); - } - } - } - }, ReversedComparator:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(comparator) { - this.comparator = comparator; - }, {compare:function(a, b) { - return this.comparator.compare(b, a); - }, reversed:function() { - return this.comparator; - }}), NaturalOrderComparator:Kotlin.createObject(function() { - return[Kotlin.Comparator]; - }, null, {compare:function(c1, c2) { - return Kotlin.compareTo(c1, c2); - }, reversed:function() { - return _.kotlin.comparisons.ReverseOrderComparator; - }}), ReverseOrderComparator:Kotlin.createObject(function() { - return[Kotlin.Comparator]; - }, null, {compare:function(c1, c2) { - return Kotlin.compareTo(c2, c1); - }, reversed:function() { - return _.kotlin.comparisons.NaturalOrderComparator; - }})}), internal:Kotlin.definePackage(null, {NoInfer:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), Exact:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), LowPriorityInOverloadResolution:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), HidesMembers:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), OnlyInputTypes:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), InlineOnly:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null), InlineExposed:Kotlin.createClass(function() { - return[Kotlin.modules["builtins"].kotlin.Annotation]; - }, null)}), properties:Kotlin.definePackage(null, {Delegates:Kotlin.createObject(null, null, {notNull:function() { - return new _.kotlin.properties.NotNullVar; - }, observable_toa4sq$:Kotlin.defineInlineFunction("stdlib.kotlin.properties.Delegates.observable_toa4sq$", function(initialValue, onChange) { - return new _.kotlin.properties.Delegates.observable$f(onChange, initialValue); - }), vetoable_jyribq$:Kotlin.defineInlineFunction("stdlib.kotlin.properties.Delegates.vetoable_jyribq$", function(initialValue, onChange) { - return new _.kotlin.properties.Delegates.vetoable$f(onChange, initialValue); - })}, {observable$f:Kotlin.createClass(function() { - return[_.kotlin.properties.ObservableProperty]; - }, function $fun(closure$onChange_0, initialValue) { - this.closure$onChange_0 = closure$onChange_0; - $fun.baseInitializer.call(this, initialValue); - }, {afterChange_lle7lx$:function(property, oldValue, newValue) { - this.closure$onChange_0(property, oldValue, newValue); - }}, {}), vetoable$f:Kotlin.createClass(function() { - return[_.kotlin.properties.ObservableProperty]; - }, function $fun(closure$onChange_0, initialValue) { - this.closure$onChange_0 = closure$onChange_0; - $fun.baseInitializer.call(this, initialValue); - }, {beforeChange_lle7lx$:function(property, oldValue, newValue) { - return this.closure$onChange_0(property, oldValue, newValue); - }}, {})}), NotNullVar:Kotlin.createClass(function() { - return[_.kotlin.properties.ReadWriteProperty]; - }, function() { - this.value_s2ygim$ = null; - }, {getValue_dsk1ci$:function(thisRef, property) { - var tmp$0; - tmp$0 = this.value_s2ygim$; - if (tmp$0 == null) { - throw new Kotlin.IllegalStateException("Property " + property.name + " should be initialized before get."); - } - return tmp$0; - }, setValue_w32e13$:function(thisRef, property, value) { - this.value_s2ygim$ = value; - }}), ReadOnlyProperty:Kotlin.createTrait(null), ReadWriteProperty:Kotlin.createTrait(null), ObservableProperty:Kotlin.createClass(function() { - return[_.kotlin.properties.ReadWriteProperty]; - }, function(initialValue) { - this.value_gpmoc7$ = initialValue; - }, {beforeChange_lle7lx$:function(property, oldValue, newValue) { - return true; - }, afterChange_lle7lx$:function(property, oldValue, newValue) { - }, getValue_dsk1ci$:function(thisRef, property) { - return this.value_gpmoc7$; - }, setValue_w32e13$:function(thisRef, property, value) { - var oldValue = this.value_gpmoc7$; - if (!this.beforeChange_lle7lx$(property, oldValue, value)) { - return; - } - this.value_gpmoc7$ = value; - this.afterChange_lle7lx$(property, oldValue, value); - }})})}), java:Kotlin.definePackage(null, {io:Kotlin.definePackage(null, {Serializable:Kotlin.createTrait(null)}), lang:Kotlin.definePackage(null, {Runnable$f:Kotlin.createClass(function() { - return[Kotlin.Runnable]; - }, function(closure$action_0) { - this.closure$action_0 = closure$action_0; - }, {run:function() { - this.closure$action_0(); - }}, {}), Runnable_qshda6$:function(action) { - return new _.java.lang.Runnable$f(action); - }, StringBuilder_za3lpa$:Kotlin.defineInlineFunction("stdlib.java.lang.StringBuilder_za3lpa$", function(capacity) { - return new Kotlin.StringBuilder; - }), StringBuilder_6bul2c$:Kotlin.defineInlineFunction("stdlib.java.lang.StringBuilder_6bul2c$", function(content) { - return new Kotlin.StringBuilder(content.toString()); - })}), util:Kotlin.definePackage(null, {Comparator$f:Kotlin.createClass(function() { - return[Kotlin.Comparator]; - }, function(closure$comparison_0) { - this.closure$comparison_0 = closure$comparison_0; - }, {compare:function(obj1, obj2) { - return this.closure$comparison_0(obj1, obj2); - }}, {}), Comparator_67l1x5$:Kotlin.defineInlineFunction("stdlib.java.util.Comparator_67l1x5$", function(comparison) { - return new _.java.util.Comparator$f(comparison); - }), HashSet_wtfk93$:function(c) { - var $receiver = new Kotlin.ComplexHashSet(c.size); - $receiver.addAll_wtfk93$(c); - return $receiver; - }, LinkedHashSet_wtfk93$:function(c) { - var $receiver = new Kotlin.LinkedHashSet(c.size); - $receiver.addAll_wtfk93$(c); - return $receiver; - }, HashMap_r12sna$:function(m) { - var $receiver = new Kotlin.ComplexHashMap(m.size); - $receiver.putAll_r12sna$(m); - return $receiver; - }, LinkedHashMap_r12sna$:function(m) { - var $receiver = new Kotlin.LinkedHashMap(m.size); - $receiver.putAll_r12sna$(m); - return $receiver; - }, ArrayList_wtfk93$:function(c) { - var $receiver = new Kotlin.ArrayList; - $receiver.array = Kotlin.copyToArray(c); - return $receiver; - }, Collections:Kotlin.createObject(null, null, {max_kqnpsu$:function(col, comp) { - return Kotlin.collectionsMax(col, comp); - }, sort_pr3zit$:function(list) { - Kotlin.collectionsSort(list, _.kotlin.comparisons.naturalOrder()); - }, sort_k5qxi4$:function(list, comparator) { - Kotlin.collectionsSort(list, comparator); - }, reverse_heioe9$:function(list) { - var tmp$0; - var size = list.size; - tmp$0 = (size / 2 | 0) - 1; - for (var i = 0;i <= tmp$0;i++) { - var i2 = size - i - 1; - var tmp = list.get_za3lpa$(i); - list.set_vux3hl$(i, list.get_za3lpa$(i2)); - list.set_vux3hl$(i2, tmp); - } - }})})}), org:Kotlin.definePackage(null, {khronos:Kotlin.definePackage(null, {webgl:Kotlin.definePackage(null, {WebGLContextAttributes_aby97w$:Kotlin.defineInlineFunction("stdlib.org.khronos.webgl.WebGLContextAttributes_aby97w$", function(alpha, depth, stencil, antialias, premultipliedAlpha, preserveDrawingBuffer, preferLowPowerToHighPerformance, failIfMajorPerformanceCaveat) { - if (alpha === void 0) { - alpha = true; - } - if (depth === void 0) { - depth = true; - } - if (stencil === void 0) { - stencil = false; - } - if (antialias === void 0) { - antialias = true; - } - if (premultipliedAlpha === void 0) { - premultipliedAlpha = true; - } - if (preserveDrawingBuffer === void 0) { - preserveDrawingBuffer = false; - } - if (preferLowPowerToHighPerformance === void 0) { - preferLowPowerToHighPerformance = false; - } - if (failIfMajorPerformanceCaveat === void 0) { - failIfMajorPerformanceCaveat = false; - } - var o = {}; - o["alpha"] = alpha; - o["depth"] = depth; - o["stencil"] = stencil; - o["antialias"] = antialias; - o["premultipliedAlpha"] = premultipliedAlpha; - o["preserveDrawingBuffer"] = preserveDrawingBuffer; - o["preferLowPowerToHighPerformance"] = preferLowPowerToHighPerformance; - o["failIfMajorPerformanceCaveat"] = failIfMajorPerformanceCaveat; - return o; - }), WebGLContextEventInit_o0ij6q$:Kotlin.defineInlineFunction("stdlib.org.khronos.webgl.WebGLContextEventInit_o0ij6q$", function(statusMessage, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["statusMessage"] = statusMessage; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })})}), w3c:Kotlin.definePackage(null, {dom:Kotlin.definePackage(null, {events:Kotlin.definePackage(null, {UIEventInit_vz9i9r$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.UIEventInit_vz9i9r$", function(view, detail, bubbles, cancelable) { - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), FocusEventInit_n9ip3s$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.FocusEventInit_n9ip3s$", function(relatedTarget, view, detail, bubbles, cancelable) { - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["relatedTarget"] = relatedTarget; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), MouseEventInit_h05so9$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.MouseEventInit_h05so9$", function(screenX, screenY, clientX, clientY, button, buttons, relatedTarget, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (screenX === void 0) { - screenX = 0; - } - if (screenY === void 0) { - screenY = 0; - } - if (clientX === void 0) { - clientX = 0; - } - if (clientY === void 0) { - clientY = 0; - } - if (button === void 0) { - button = 0; - } - if (buttons === void 0) { - buttons = 0; - } - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["screenX"] = screenX; - o["screenY"] = screenY; - o["clientX"] = clientX; - o["clientY"] = clientY; - o["button"] = button; - o["buttons"] = buttons; - o["relatedTarget"] = relatedTarget; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EventModifierInit_wnf6pc$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.EventModifierInit_wnf6pc$", function(ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), WheelEventInit_2knbe1$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.WheelEventInit_2knbe1$", function(deltaX, deltaY, deltaZ, deltaMode, screenX, screenY, clientX, clientY, button, buttons, relatedTarget, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (deltaX === void 0) { - deltaX = 0; - } - if (deltaY === void 0) { - deltaY = 0; - } - if (deltaZ === void 0) { - deltaZ = 0; - } - if (deltaMode === void 0) { - deltaMode = 0; - } - if (screenX === void 0) { - screenX = 0; - } - if (screenY === void 0) { - screenY = 0; - } - if (clientX === void 0) { - clientX = 0; - } - if (clientY === void 0) { - clientY = 0; - } - if (button === void 0) { - button = 0; - } - if (buttons === void 0) { - buttons = 0; - } - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["deltaX"] = deltaX; - o["deltaY"] = deltaY; - o["deltaZ"] = deltaZ; - o["deltaMode"] = deltaMode; - o["screenX"] = screenX; - o["screenY"] = screenY; - o["clientX"] = clientX; - o["clientY"] = clientY; - o["button"] = button; - o["buttons"] = buttons; - o["relatedTarget"] = relatedTarget; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), KeyboardEventInit_f73pgi$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.KeyboardEventInit_f73pgi$", function(key, code, location, repeat, isComposing, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (key === void 0) { - key = ""; - } - if (code === void 0) { - code = ""; - } - if (location === void 0) { - location = 0; - } - if (repeat === void 0) { - repeat = false; - } - if (isComposing === void 0) { - isComposing = false; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["key"] = key; - o["code"] = code; - o["location"] = location; - o["repeat"] = repeat; - o["isComposing"] = isComposing; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CompositionEventInit_v3o02b$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.events.CompositionEventInit_v3o02b$", function(data, view, detail, bubbles, cancelable) { - if (data === void 0) { - data = ""; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })}), TrackEventInit_u7e3y1$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.TrackEventInit_u7e3y1$", function(track, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["track"] = track; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), AutocompleteErrorEventInit_o0ij6q$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.AutocompleteErrorEventInit_o0ij6q$", function(reason, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["reason"] = reason; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), RelatedEventInit_w30gy5$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.RelatedEventInit_w30gy5$", function(relatedTarget, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["relatedTarget"] = relatedTarget; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CanvasRenderingContext2DSettings_6taknv$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.CanvasRenderingContext2DSettings_6taknv$", function(alpha) { - if (alpha === void 0) { - alpha = true; - } - var o = {}; - o["alpha"] = alpha; - return o; - }), HitRegionOptions_7peykz$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.HitRegionOptions_7peykz$", function(path, fillRule, id, parentID, cursor, control, label, role) { - if (path === void 0) { - path = null; - } - if (fillRule === void 0) { - fillRule = "nonzero"; - } - if (id === void 0) { - id = ""; - } - if (parentID === void 0) { - parentID = null; - } - if (cursor === void 0) { - cursor = "inherit"; - } - if (control === void 0) { - control = null; - } - if (label === void 0) { - label = null; - } - if (role === void 0) { - role = null; - } - var o = {}; - o["path"] = path; - o["fillRule"] = fillRule; - o["id"] = id; - o["parentID"] = parentID; - o["cursor"] = cursor; - o["control"] = control; - o["label"] = label; - o["role"] = role; - return o; - }), DragEventInit_mm3m7l$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.DragEventInit_mm3m7l$", function(dataTransfer, screenX, screenY, clientX, clientY, button, buttons, relatedTarget, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierHyper, modifierNumLock, modifierOS, modifierScrollLock, modifierSuper, modifierSymbol, modifierSymbolLock, view, detail, bubbles, cancelable) { - if (screenX === void 0) { - screenX = 0; - } - if (screenY === void 0) { - screenY = 0; - } - if (clientX === void 0) { - clientX = 0; - } - if (clientY === void 0) { - clientY = 0; - } - if (button === void 0) { - button = 0; - } - if (buttons === void 0) { - buttons = 0; - } - if (relatedTarget === void 0) { - relatedTarget = null; - } - if (ctrlKey === void 0) { - ctrlKey = false; - } - if (shiftKey === void 0) { - shiftKey = false; - } - if (altKey === void 0) { - altKey = false; - } - if (metaKey === void 0) { - metaKey = false; - } - if (modifierAltGraph === void 0) { - modifierAltGraph = false; - } - if (modifierCapsLock === void 0) { - modifierCapsLock = false; - } - if (modifierFn === void 0) { - modifierFn = false; - } - if (modifierFnLock === void 0) { - modifierFnLock = false; - } - if (modifierHyper === void 0) { - modifierHyper = false; - } - if (modifierNumLock === void 0) { - modifierNumLock = false; - } - if (modifierOS === void 0) { - modifierOS = false; - } - if (modifierScrollLock === void 0) { - modifierScrollLock = false; - } - if (modifierSuper === void 0) { - modifierSuper = false; - } - if (modifierSymbol === void 0) { - modifierSymbol = false; - } - if (modifierSymbolLock === void 0) { - modifierSymbolLock = false; - } - if (view === void 0) { - view = null; - } - if (detail === void 0) { - detail = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["dataTransfer"] = dataTransfer; - o["screenX"] = screenX; - o["screenY"] = screenY; - o["clientX"] = clientX; - o["clientY"] = clientY; - o["button"] = button; - o["buttons"] = buttons; - o["relatedTarget"] = relatedTarget; - o["ctrlKey"] = ctrlKey; - o["shiftKey"] = shiftKey; - o["altKey"] = altKey; - o["metaKey"] = metaKey; - o["modifierAltGraph"] = modifierAltGraph; - o["modifierCapsLock"] = modifierCapsLock; - o["modifierFn"] = modifierFn; - o["modifierFnLock"] = modifierFnLock; - o["modifierHyper"] = modifierHyper; - o["modifierNumLock"] = modifierNumLock; - o["modifierOS"] = modifierOS; - o["modifierScrollLock"] = modifierScrollLock; - o["modifierSuper"] = modifierSuper; - o["modifierSymbol"] = modifierSymbol; - o["modifierSymbolLock"] = modifierSymbolLock; - o["view"] = view; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), PopStateEventInit_xro667$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.PopStateEventInit_xro667$", function(state, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["state"] = state; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), HashChangeEventInit_9djc0g$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.HashChangeEventInit_9djc0g$", function(oldURL, newURL, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["oldURL"] = oldURL; - o["newURL"] = newURL; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), PageTransitionEventInit_ws0pad$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.PageTransitionEventInit_ws0pad$", function(persisted, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["persisted"] = persisted; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), ErrorEventInit_os3ye3$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ErrorEventInit_os3ye3$", function(message, filename, lineno, colno, error, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["message"] = message; - o["filename"] = filename; - o["lineno"] = lineno; - o["colno"] = colno; - o["error"] = error; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), MessageEventInit_b4x2sp$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.MessageEventInit_b4x2sp$", function(data, origin, lastEventId, source, ports, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["origin"] = origin; - o["lastEventId"] = lastEventId; - o["source"] = source; - o["ports"] = ports; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EventSourceInit_6taknv$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EventSourceInit_6taknv$", function(withCredentials) { - if (withCredentials === void 0) { - withCredentials = false; - } - var o = {}; - o["withCredentials"] = withCredentials; - return o; - }), CloseEventInit_kz92y6$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.CloseEventInit_kz92y6$", function(wasClean, code, reason, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["wasClean"] = wasClean; - o["code"] = code; - o["reason"] = reason; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), StorageEventInit_hhd9ie$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.StorageEventInit_hhd9ie$", function(key, oldValue, newValue, url, storageArea, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["key"] = key; - o["oldValue"] = oldValue; - o["newValue"] = newValue; - o["url"] = url; - o["storageArea"] = storageArea; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EventInit_dqye30$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EventInit_dqye30$", function(bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CustomEventInit_xro667$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.CustomEventInit_xro667$", function(detail, bubbles, cancelable) { - if (detail === void 0) { - detail = null; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["detail"] = detail; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), MutationObserverInit_aj2h80$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.MutationObserverInit_aj2h80$", function(childList, attributes, characterData, subtree, attributeOldValue, characterDataOldValue, attributeFilter) { - if (childList === void 0) { - childList = false; - } - if (subtree === void 0) { - subtree = false; - } - var o = {}; - o["childList"] = childList; - o["attributes"] = attributes; - o["characterData"] = characterData; - o["subtree"] = subtree; - o["attributeOldValue"] = attributeOldValue; - o["characterDataOldValue"] = characterDataOldValue; - o["attributeFilter"] = attributeFilter; - return o; - }), EditingBeforeInputEventInit_9djc0g$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EditingBeforeInputEventInit_9djc0g$", function(command, value, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["command"] = command; - o["value"] = value; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), EditingInputEventInit_9djc0g$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.EditingInputEventInit_9djc0g$", function(command, value, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["command"] = command; - o["value"] = value; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), DOMPointInit_6y0v78$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.DOMPointInit_6y0v78$", function(x, y, z, w) { - if (x === void 0) { - x = 0; - } - if (y === void 0) { - y = 0; - } - if (z === void 0) { - z = 0; - } - if (w === void 0) { - w = 1; - } - var o = {}; - o["x"] = x; - o["y"] = y; - o["z"] = z; - o["w"] = w; - return o; - }), DOMRectInit_6y0v78$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.DOMRectInit_6y0v78$", function(x, y, width, height) { - if (x === void 0) { - x = 0; - } - if (y === void 0) { - y = 0; - } - if (width === void 0) { - width = 0; - } - if (height === void 0) { - height = 0; - } - var o = {}; - o["x"] = x; - o["y"] = y; - o["width"] = width; - o["height"] = height; - return o; - }), ScrollOptions_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ScrollOptions_61zpoe$", function(behavior) { - if (behavior === void 0) { - behavior = "auto"; - } - var o = {}; - o["behavior"] = behavior; - return o; - }), ScrollOptionsHorizontal_t0es5s$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ScrollOptionsHorizontal_t0es5s$", function(x, behavior) { - if (behavior === void 0) { - behavior = "auto"; - } - var o = {}; - o["x"] = x; - o["behavior"] = behavior; - return o; - }), ScrollOptionsVertical_t0es5s$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ScrollOptionsVertical_t0es5s$", function(y, behavior) { - if (behavior === void 0) { - behavior = "auto"; - } - var o = {}; - o["y"] = y; - o["behavior"] = behavior; - return o; - }), BoxQuadOptions_axdi75$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.BoxQuadOptions_axdi75$", function(box, relativeTo) { - if (box === void 0) { - box = "border"; - } - var o = {}; - o["box"] = box; - o["relativeTo"] = relativeTo; - return o; - }), ConvertCoordinateOptions_puj7f4$:Kotlin.defineInlineFunction("stdlib.org.w3c.dom.ConvertCoordinateOptions_puj7f4$", function(fromBox, toBox) { - if (fromBox === void 0) { - fromBox = "border"; - } - if (toBox === void 0) { - toBox = "border"; - } - var o = {}; - o["fromBox"] = fromBox; - o["toBox"] = toBox; - return o; - })}), fetch:Kotlin.definePackage(null, {RequestInit_rz7b8m$:Kotlin.defineInlineFunction("stdlib.org.w3c.fetch.RequestInit_rz7b8m$", function(method, headers, body, mode, credentials, cache, redirect) { - var o = {}; - o["method"] = method; - o["headers"] = headers; - o["body"] = body; - o["mode"] = mode; - o["credentials"] = credentials; - o["cache"] = cache; - o["redirect"] = redirect; - return o; - }), ResponseInit_v2gkk6$:Kotlin.defineInlineFunction("stdlib.org.w3c.fetch.ResponseInit_v2gkk6$", function(status, statusText, headers) { - if (status === void 0) { - status = 200; - } - if (statusText === void 0) { - statusText = "OK"; - } - var o = {}; - o["status"] = status; - o["statusText"] = statusText; - o["headers"] = headers; - return o; - })}), files:Kotlin.definePackage(null, {BlobPropertyBag_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.files.BlobPropertyBag_61zpoe$", function(type) { - if (type === void 0) { - type = ""; - } - var o = {}; - o["type"] = type; - return o; - }), FilePropertyBag_bm4lxs$:Kotlin.defineInlineFunction("stdlib.org.w3c.files.FilePropertyBag_bm4lxs$", function(type, lastModified) { - if (type === void 0) { - type = ""; - } - var o = {}; - o["type"] = type; - o["lastModified"] = lastModified; - return o; - })}), notifications:Kotlin.definePackage(null, {NotificationOptions_kav9qg$:Kotlin.defineInlineFunction("stdlib.org.w3c.notifications.NotificationOptions_kav9qg$", function(dir, lang, body, tag, icon, sound, vibrate, renotify, silent, noscreen, sticky, data) { - if (dir === void 0) { - dir = "auto"; - } - if (lang === void 0) { - lang = ""; - } - if (body === void 0) { - body = ""; - } - if (tag === void 0) { - tag = ""; - } - if (renotify === void 0) { - renotify = false; - } - if (silent === void 0) { - silent = false; - } - if (noscreen === void 0) { - noscreen = false; - } - if (sticky === void 0) { - sticky = false; - } - if (data === void 0) { - data = null; - } - var o = {}; - o["dir"] = dir; - o["lang"] = lang; - o["body"] = body; - o["tag"] = tag; - o["icon"] = icon; - o["sound"] = sound; - o["vibrate"] = vibrate; - o["renotify"] = renotify; - o["silent"] = silent; - o["noscreen"] = noscreen; - o["sticky"] = sticky; - o["data"] = data; - return o; - }), GetNotificationOptions_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.notifications.GetNotificationOptions_61zpoe$", function(tag) { - if (tag === void 0) { - tag = ""; - } - var o = {}; - o["tag"] = tag; - return o; - }), NotificationEventInit_feq8qm$:Kotlin.defineInlineFunction("stdlib.org.w3c.notifications.NotificationEventInit_feq8qm$", function(notification, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["notification"] = notification; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })}), workers:Kotlin.definePackage(null, {RegistrationOptions_61zpoe$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.RegistrationOptions_61zpoe$", function(scope) { - var o = {}; - o["scope"] = scope; - return o; - }), ServiceWorkerMessageEventInit_sy6pe0$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ServiceWorkerMessageEventInit_sy6pe0$", function(data, origin, lastEventId, source, ports, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["origin"] = origin; - o["lastEventId"] = lastEventId; - o["source"] = source; - o["ports"] = ports; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), ClientQueryOptions_8kj6y5$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ClientQueryOptions_8kj6y5$", function(includeUncontrolled, type) { - if (includeUncontrolled === void 0) { - includeUncontrolled = false; - } - if (type === void 0) { - type = "window"; - } - var o = {}; - o["includeUncontrolled"] = includeUncontrolled; - o["type"] = type; - return o; - }), ExtendableEventInit_dqye30$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ExtendableEventInit_dqye30$", function(bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), FetchEventInit_b3bcq8$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.FetchEventInit_b3bcq8$", function(request, client, isReload, bubbles, cancelable) { - if (isReload === void 0) { - isReload = false; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["request"] = request; - o["client"] = client; - o["isReload"] = isReload; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), ExtendableMessageEventInit_9wcmnd$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.ExtendableMessageEventInit_9wcmnd$", function(data, origin, lastEventId, source, ports, bubbles, cancelable) { - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["data"] = data; - o["origin"] = origin; - o["lastEventId"] = lastEventId; - o["source"] = source; - o["ports"] = ports; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - }), CacheQueryOptions_qfoyx9$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.CacheQueryOptions_qfoyx9$", function(ignoreSearch, ignoreMethod, ignoreVary, cacheName) { - if (ignoreSearch === void 0) { - ignoreSearch = false; - } - if (ignoreMethod === void 0) { - ignoreMethod = false; - } - if (ignoreVary === void 0) { - ignoreVary = false; - } - var o = {}; - o["ignoreSearch"] = ignoreSearch; - o["ignoreMethod"] = ignoreMethod; - o["ignoreVary"] = ignoreVary; - o["cacheName"] = cacheName; - return o; - }), CacheBatchOperation_2un2y0$:Kotlin.defineInlineFunction("stdlib.org.w3c.workers.CacheBatchOperation_2un2y0$", function(type, request, response, options) { - var o = {}; - o["type"] = type; - o["request"] = request; - o["response"] = response; - o["options"] = options; - return o; - })}), xhr:Kotlin.definePackage(null, {ProgressEventInit_vo5a85$:Kotlin.defineInlineFunction("stdlib.org.w3c.xhr.ProgressEventInit_vo5a85$", function(lengthComputable, loaded, total, bubbles, cancelable) { - if (lengthComputable === void 0) { - lengthComputable = false; - } - if (loaded === void 0) { - loaded = 0; - } - if (total === void 0) { - total = 0; - } - if (bubbles === void 0) { - bubbles = false; - } - if (cancelable === void 0) { - cancelable = false; - } - var o = {}; - o["lengthComputable"] = lengthComputable; - o["loaded"] = loaded; - o["total"] = total; - o["bubbles"] = bubbles; - o["cancelable"] = cancelable; - return o; - })})})})}); - Kotlin.defineModule("stdlib", _); -})(Kotlin); -if (typeof module !== "undefined" && module.exports) { - module.exports = Kotlin; -} -; \ No newline at end of file diff --git a/web/js/kotlin/stdlib.meta.js b/web/js/kotlin/stdlib.meta.js deleted file mode 100644 index bf086ef..0000000 --- a/web/js/kotlin/stdlib.meta.js +++ /dev/null @@ -1 +0,0 @@ -// Kotlin.kotlin_module_metadata(3, "stdlib", "H4sIAAAAAAAAAKy9CXxkVZU/3lWp9Val8lJZOp1eaVpk7aTTDbaoSCWpJBWSqlBV6U4zaqaSvCRFV6piLd0JM/Mb1mYRFQERUBEBERAQ2URERUT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