[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\ntrim_trailing_whitespace = true\nend_of_line = lf\n\n[*.{kt,kts,md}]\nij_kotlin_code_style_defaults = KOTLIN_OFFICIAL\nij_kotlin_allow_trailing_comma = true\nij_kotlin_allow_trailing_comma_on_call_site = true\nij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^\nij_kotlin_packages_to_use_import_on_demand = kotlinx.android.synthetic.**\nij_kotlin_name_count_to_use_star_import = 100\nij_kotlin_name_count_to_use_star_import_for_members = 100\nindent_size = 4\nindent_style = space\ninsert_final_newline = true\nktlint_code_style = official\nktlint_function_signature_body_expression_wrapping = default\nktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = -1\nktlint_ignore_back_ticked_identifier = false\nktlint_no-wildcard-imports = disabled\nktlint_standard_no-wildcard-imports = disabled\nmax_line_length = 120\n\n[**/test/**.kt]\nktlint_ignore_back_ticked_identifier = true\n"
  },
  {
    "path": ".gitattributes",
    "content": "#\r\n# https://help.github.com/articles/dealing-with-line-endings/\r\n#\r\n# These are explicitly windows files and should use crlf\r\n/gradlew text eol=lf\r\n*.bat text eol=crlf\r\n*.jar binary\r\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "github: g0dkar\nko_fi: 'g0dkar'\n#custom: 'https://min.immo'\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: g0dkar\n\n---\n\n<!--\n[pt] Se você preferir, sinta-se livre para abrir bugs e/ou responder a quaisquer perguntas em Português!\n-->\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior. For example:\n\n1. Create a QRCode instance with `data = \"answer to life, universe and everything\"`\n2. Invoke `render(cellSize = 42)`\n3. ???\n4. See error\n\n**Expected behavior**\n<!-- A clear and concise description of what you expected to happen. For example: \"I expected a QRCode like this one I generated with <other tool/lib>\" -->\n\n**Screenshots or other QRCodes rendered with other tools**\n<!-- If applicable, add screenshots or QRCodes rendered with other tools to help explain your problem. -->\n\n**Additional context**\n<!-- Add any other context about the problem here. For example: Were you executing your code on a Server? If so, were you using a Framework? Which Java version were you on? -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n<!--\n[pt] Se você preferir, sinta-se livre para abrir sugestões e/ou responder a quaisquer perguntas em Português!\n-->\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. For example: I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/renovate.json",
    "content": "{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"extends\": [\n    \"config:best-practices\"\n  ],\n  \"automerge\": true,\n  \"automergeType\": \"pr\",\n  \"automergeStrategy\": \"squash\",\n  \"schedule\": [\"on the first day of the month\"]\n}\n"
  },
  {
    "path": ".github/workflows/dokka-update.yml",
    "content": "name: Dokka Update\n\non:\n  push:\n    branches: [ \"gh-page\" ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4\n        with:\n          repository: ${{ github.event.pull_request.head.repo.full_name }}\n          ref: ${{ github.event.pull_request.head.ref }}\n      - name: Set up JDK 17\n        uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4\n        with:\n          java-version: \"17\"\n          distribution: \"temurin\"\n          cache: gradle\n      - name: Give execute permission to ./gradlew\n        run: chmod +x ./gradlew\n      - name: Run Dokka Update\n        run: \"./gradlew dokkaGenerate\"\n      - name: Commit Changes\n        uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9\n        with:\n          message: \"[CI] Dokka Update\"\n          committer_name: \"GitHub Actions\"\n          committer_email: \"actions@github.com\"\n"
  },
  {
    "path": ".github/workflows/run-tests.yml",
    "content": "name: Run Tests\n\non:\n  push:\n    branches: [ \"main\" ]\n  pull_request:\n    branches: [ \"main\" ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4\n        with:\n          repository: ${{ github.event.pull_request.head.repo.full_name }}\n          ref: ${{ github.event.pull_request.head.ref }}\n      - name: Set up JDK 17\n        uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4\n        with:\n          java-version: \"17\"\n          distribution: \"temurin\"\n          cache: gradle\n      - name: Give execute permission to ./gradlew\n        run: chmod +x ./gradlew\n      - name: Build and Publish Locally\n        run: \"./gradlew clean :build :publishToMavenLocal -x :test -x :jvmTest -Pkotlin.incremental.useClasspathSnapshot=false\"\n      - name: Run Tests\n        run: \"./gradlew test -Pkotlin.incremental.useClasspathSnapshot=false\"\n"
  },
  {
    "path": ".gitignore",
    "content": "HELP.md\ntarget/\n!.mvn/wrapper/maven-wrapper.jar\n!**/src/main/**\n!**/src/test/**\n\n.gradle\n!**/src/main/**/build/\n!**/src/test/**/build/\n\n### STS ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n.sts4-cache\n\n### IntelliJ IDEA ###\n.idea\n*.iws\n*.iml\n*.ipr\nlocal.properties\n\n### NetBeans ###\n/nbproject/private/\n/nbbuild/\n/dist/\n/nbdist/\n/.nb-gradle/\nbuild/\n\n### VS Code ###\n.vscode/\n\n# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/**/node_modules\n/**/.jekyll-cache\n/**/_site\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/build\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n/examples/gradle*\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n/kotlin-js-store/\n.kotlin/\n#/package.json\n#/package-lock.json\n"
  },
  {
    "path": ".run/Build.run.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Build\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\">\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\":clean\" />\n          <option value=\":build\" />\n          <option value=\":copyToReleaseDir\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" />\n    </ExternalSystemSettings>\n    <ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>\n    <ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>\n    <DebugAllEnabled>false</DebugAllEnabled>\n    <RunAsTest>false</RunAsTest>\n    <method v=\"2\" />\n  </configuration>\n</component>"
  },
  {
    "path": ".run/Publish Distribution - Sonar.run.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Publish Distribution - Sonar\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\">\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"-x test\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\":clean\" />\n          <option value=\":publishToSonatype\" />\n          <option value=\":closeAndReleaseSonatypeStagingRepository\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" />\n    </ExternalSystemSettings>\n    <ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>\n    <ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>\n    <DebugAllEnabled>false</DebugAllEnabled>\n    <RunAsTest>false</RunAsTest>\n    <method v=\"2\" />\n  </configuration>\n</component>"
  },
  {
    "path": ".run/Publish to Local.run.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Publish to Local\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\">\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"-x :test\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\":clean\" />\n          <option value=\":build\" />\n          <option value=\":publishToMavenLocal\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" />\n    </ExternalSystemSettings>\n    <ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>\n    <ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>\n    <DebugAllEnabled>false</DebugAllEnabled>\n    <RunAsTest>false</RunAsTest>\n    <method v=\"2\" />\n  </configuration>\n</component>"
  },
  {
    "path": ".run/Run Tests.run.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"Run Tests\" type=\"GradleRunConfiguration\" factoryName=\"Gradle\">\n    <ExternalSystemSettings>\n      <option name=\"executionName\" />\n      <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n      <option name=\"externalSystemIdString\" value=\"GRADLE\" />\n      <option name=\"scriptParameters\" value=\"\" />\n      <option name=\"taskDescriptions\">\n        <list />\n      </option>\n      <option name=\"taskNames\">\n        <list>\n          <option value=\":jvmTest\" />\n        </list>\n      </option>\n      <option name=\"vmOptions\" />\n    </ExternalSystemSettings>\n    <ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>\n    <ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>\n    <DebugAllEnabled>false</DebugAllEnabled>\n    <RunAsTest>false</RunAsTest>\n    <method v=\"2\" />\n  </configuration>\n</component>"
  },
  {
    "path": "CHANGELOG.md",
    "content": "[![License](https://img.shields.io/github/license/g0dkar/qrcode-kotlin)](LICENSE)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.g0dkar/qrcode-kotlin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.g0dkar%22%20AND%20a:%22qrcode-kotlin%22)\n\n# Change Log\n\n> Mostly notable changes from version to version. Some stuff might go undocumented. If you find something that you think\n> should be documented, please open an [issue](https://github.com/g0dkar/qrcode-kotlin/issues) :)\n\n# 4.5.0 - Latest\n\n## ✨ New\n- Added (experimental) support for WASM targets (requested via Issues #140 and #167)\n    - Please do let us know if you run into any issues with it <3\n\n# 4.4.1\n\n> I'm trying to keep a better CHANGELOG from now on ^^\n\n## 🔧 Fixed\n- **Fixed an issue with rendering the Timing Pattern.** I have known it for a while, but now I finally figured what was the issue and fixed it.\n\n## ♻️ Changed\n- Changed default ECL from `VERY_HIGH` to `LOW` as to stay closer to what other tools seems to use as a default\n- Computing the `informationDensity` value now always goes for the **least possible value** _(down from a minimum of 6 set by `QRCodeBuilder`)_\n- Better documentation of methods - this is an ongoing initiative!\n\n## ✨ New\n- New `InsufficientInformationDensityException`: instead of an `IllegalArgumentException`, this new exception is thrown with a more helpful message\n- Added `drawQRCode()` extension function to a Android Compose `DrawScope` to draw QRCodes into modern Android.\n    - Idea/request from Issue #141 by @dgmltn (Thanks!)\n- Added examples demonstrating what the ECL does (same data, different ECLs)\n- Added examples demonstrating what a Mask Pattern does (same data, different masks)\n- Added example with Spring Boot\n- Moved example QRCode files to a folder within each language examples, just to reduce clutter :)\n\n## 🚫 Removed\n- `forceInformationDensity` was removed. Now the **QRCodeBuilder** class uses `infoDensity = 0` (default value) as a trigger to compute it automatically since it needs to be `>= 1`\n    - Default value calling `QRCode()` directly is still 6 as to keep a bit of backwards compatibility 😅\n\n## 👀 Internal\n- Renamed \"typeNum\" to \"informationDensity\"\n- Updated dokka and KMP\n- Fixed dokka always triggering building the whole `docs/dokka/` folder (that is only for GH Pages)\n\n--------------------\n\n## 4.3.0\n\n- Fixed an issue with `4.2.1` and iOS/macOS targets (thanks [Manuel149Br](https://github.com/Manuel149Br)!)\n- Added options to fine tune the Information Density parameter:\n    - `withMinimumInformationDensity()` is now `withInformationDensity()`: Manually setting the Information Density\n      parameter will **force the use of the Information Density specified**.\n    - **NEW** `forceInformationDensity()`: Force the use of the current Information Density value. Default is `false`.\n      If this is `false`, an adequate information density will be computed from the amount of data to be encoded and the\n      Error Correction Level to apply.\\\n      :warning: **Calling `withInformationDensity()` automatically sets this to `true`!** To replicate the old behaviour\n      of using the specified Information Density as the minimum density allowed, first call\n      `withInformationDensity(...)` followed by `forceInformationDensity(false)`.\n    - :sirene: **If the data is too large for the information density value you chose, an `IllegalArgumentException`\n      will be thrown.**\n- Moved `QRCodeShapesEnum` to be its own `enum` instead of being an inner element of `QRCodeBuilder`.\n\n--------------------\n\n## 4.2.1\n\n- Fixed issue with the Error Correction being ignored (thanks [slaha](https://github.com/slaha)!)\n- Updated libs versions\n- **Only for project devs:** fixed the pipeline issues with running tests for PRs.\n- **Investigating:** Issues with very large payloads being encoded\n\n--------------------\n\n## 4.1.0\n\n- Another round of improvements and fixes (special thanks to [ruicanas](https://github.com/ruicanas)\n  and [chphmh](https://github.com/chphmh)!)\n- Changed the minimal requirements for the library:\n    - Reduced the minSdk API Version of the Android implementation to `7` (down from `23`)\n        - In theory, it can go down to `1` but all API Versions below 7 are considered deprecated.\n    - Reduced the Java compilation target to `11` (down from `17`)\n\n--------------------\n\n## 4.0.7\n\n- A bunch of improvements and optimizations (minor changes from the rework)\n- MAJOR thanks to [ruicanas](https://github.com/ruicanas) for fixing and improving the iOS implementation!\n\n--------------------\n\n## 4.0.0\n\n- A major rework of the `QRCode` class to allow for easy creation of nice looking QRCodes\n- Added the first version of the iOS Support\n- Changed the base package of the classes from `io.github.g0dkar.qrcode` to `qrcode`\n    - This was done to better support JavaScript\n      ß- And because I don't really see much use in those Java-ish package names 😅\n\n--------------------\n\n## 3.3.0\n\n- Started doing the Changelog 🥲\n- Added plain release files to the [release](release) directory (only the latest version will be there)\n- Added JavaScript (Browser) into Multiplatform support\n    - Added Browser JS QRCode Generation example ([link](examples/js/qrcode-example.html))\n    - **Still needs some improvements** on how people use it, but it is a step in the right direction\n    - **Help in this regard is much appreciated!** If interested, this is in the domain of Developer Experience, aka\n      DevX/DX\n- Changed uses of `Collection`s to `Array`s instead to try and be more performant and have a smaller library as a result\n- **WIP:** Started work on Native targets (Windows, Linux, macOS, iOS)\n"
  },
  {
    "path": "CNAME",
    "content": "qrcodekotlin.com"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n> **TL;DR Don't be an asshole, don't call people names and don't fight. Be an adult.**\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n  overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n  advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n  address, without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\nrafael-at-lins-dot-net.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior,  harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2021 Rafael Madureira Lins de Araújo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# QRCode-Kotlin\n\n[![License](https://img.shields.io/github/license/g0dkar/qrcode-kotlin)](LICENSE)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.g0dkar/qrcode-kotlin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.g0dkar%22%20AND%20a:%22qrcode-kotlin%22)\n\n💚 [_**Disponível em Português (Brasil)**_](README.pt-br.md) 💛\n\n![QRCode Kotlin Logo](examples/kotlin/project-banner.png)\n\nCreating QRCodes in Kotlin (and Java) is harder than it should be. **QRCode-Kotlin aims to bring a simple,\nstraightforward and customizable way to create QRCodes**, especially in the backend.\n\nIt is with this mission in mind that we keep doing our best to learn how developers use this library and their goals so\nthat we can provide a better library/API for them. Please, feel free to share if and how you're using this project ^^\n\n* **Pure Kotlin:** Rewritten on pure Kotlin from a reference implementation of the QRCode spec\n  by [Kazuhiko Arase](https://github.com/kazuhikoarase/qrcode-generator)\n* **Lightweight:** No dependencies, `~115KB` and it does what it says on the tin.\n* **Easy to use:** Quickly and easily implement QRCodes with few lines of code.\n* **Good-looking:** Many developers don't have time and sometimes knowledge to implement the perfect QRCode,\n  so this library tries to generate good-looking QRCodes by default.\n* **Server friendly:** The JVM version is mainly focused on a personal use-case where I needed to generate QRCodes on\n  the backend, but all libraries I found were either complex or huge, usually both.\n* **Multiplatform:** This is a KMP library with support to Java, JavaScript, Android, iOS and tvOS.\n\n## Table of Contents\n\n<!-- TOC -->\n\n* [Installation](#installation)\n* [Usage](#usage)\n    * [Spring Framework and/or Spring Boot](#spring-framework-andor-spring-boot)\n* [License](#license)\n* [Thanks and Acknowledgements](#thanks-and-acknowledgements)\n* [Support and Links](#support-and-links)\n\n<!-- TOC -->\n\n## 1. Installation\n\nThe library is available\nfrom [Maven Central](https://search.maven.org/artifact/io.github.g0dkar/qrcode-kotlin/4.5.0/qrcode-kotlin)\nand [NPM JS](https://www.npmjs.com/package/qrcode-kotlin), so you can add it to your project as a dependency like any\nother:\n\n**Gradle:**\n\n```groovy\n// Use this for both Android and JVM\nimplementation(\"io.github.g0dkar:qrcode-kotlin:4.5.0\")\n```\n\n**Maven - JVM:**\n\n```xml\n<dependency>\n    <groupId>io.github.g0dkar</groupId>\n    <artifactId>qrcode-kotlin-jvm</artifactId>\n    <version>4.5.0</version>\n</dependency>\n```\n\n**Maven - Android:**\n\n```xml\n<dependency>\n    <groupId>io.github.g0dkar</groupId>\n    <artifactId>qrcode-kotlin-android</artifactId>\n    <version>4.5.0</version>\n</dependency>\n```\n\n**NodeJS:**\n\n```shell\nnpm install qrcode-kotlin@4.5.0\n```\n\n**Browser:**\n\n```html\n<script src=\"https://cdn.jsdelivr.net/gh/g0dkar/qrcode-kotlin@main/release/qrcode-kotlin.min.js\" type=\"application/javascript\"></script>\n```\n\n## Usage\n\nTo create QRCodes, the main class that should be used is the `qrcode.render.QRCode` class. It has static methods to help\nyou create a QRCode the way you want:\n\n```kotlin\n// Use one of these:\n\nval squares = QRCode.ofSquares()\n\nval circles = QRCode.ofCircles()\n\nval roundedSquares = QRCode.ofRoundedSquares()\n```\n\nWith that, you'll have a [QRCodeBuilder](src/commonMain/kotlin/qrcode/QRCodeBuilder.kt) instance. It has methods to\nadjust colors, size, spacing, add a logo and more! Also, make sure to check\nthe [Colors](src/commonMain/kotlin/qrcode/color/Colors.kt) class as well.\n\nHere's a code to get you started:\n\n```kotlin\nval helloWorld = QRCode.ofSquares()\n    .withColor(Colors.DEEP_SKY_BLUE) // Default is Colors.BLACK\n    .withSize(10) // Default is 25\n    .build(\"Hello world!\")\n\n// By default, QRCodes are rendered as PNGs.\nval pngBytes = helloWorld.render()\n\nFileOutputStream(\"hello-world.png\").use { it.write(pngBytes) }\n```\n\nWe highly recommend that you check out some examples:\n\n* [All sorts of shapes](examples/kotlin/src/main/kotlin/Example01-Shapes.kt): Squares, Circles, Rounded Squares and\n  Custom shapes\n* [All about colors](examples/kotlin/src/main/kotlin/Example02-Colors.kt): Foreground, Background, Transparent\n  backgrounds, Linear Gradient colors\n* [Adding a Logo](examples/kotlin/src/main/kotlin/Example03-Logo.kt): Add a logo and remove the cells behind it, or\n  don't :)\n* [SVG QRCodes](examples/kotlin/src/main/kotlin/Example04-SVG.kt): How to extend the renderer to render SVG (uses [JFree SVG](https://github.com/jfree/jfreesvg))\n* [The banner on the top of this README](examples/kotlin/src/main/kotlin/ProjectLogo.kt): Yup, all done with the\n  library ^^\n\nThe examples show pretty much all that can be done with the library! Even how to extend it so that it can create SVG\nQRCodes ;)\n\nYou can mix and match all those together. Try generating the library logo and banner with gradients and all in SVG ;)\n\n### Spring Framework and/or Spring Boot\n\nAs said earlier, one of the main reasons I developed this library was to use it on a backend application. So it is only\nnatural to show how to do that :)\n\nThis Spring Framework/Boot controller method can generate QRCodes of a given content:\n\n```kotlin\nimport org.springframework.core.io.ByteArrayResource\nimport org.springframework.http.HttpHeaders.CONTENT_DISPOSITION\nimport org.springframework.http.MediaType.IMAGE_PNG_VALUE\n\n@GetMapping(\"/qrcode\")\nfun generateQrCode(content: String): ResponseEntity<ByteArrayResource> {\n    val pngData = QRCode.ofSquares()\n        .build(content)\n        .render()\n    val resource = ByteArrayResource(pngData, IMAGE_PNG_VALUE)\n\n    return ResponseEntity.ok()\n        .header(CONTENT_DISPOSITION, \"attachment; filename=\\\"qrcode.png\\\"\")\n        .body(resource)\n}\n```\n\n## Changes from v3\n\nThe main changes coming from `v3.3.0` are:\n\n1. The main package of the classes was changed from `io.github.g0dkar.qrcode` to simply `qrcode`\n    * The old name doesn't help languages that don't have the \"package\" concept, and other Kotlin libraries already name\n      their main package this way.\n2. The old `QRCode` class was rewritten to be easier to create better looking QRCodes . The previous `QRCode` class was\n   renamed to [QRCodeProcessor](src/commonMain/kotlin/qrcode/raw/QRCodeProcessor.kt), with very minor API changes.\n    * **For most of the simple cases, the new `QRCode` class is compatible with the old one!**\n3. A bunch of optimizations on how the QRCode is drawn. Previously, we'd had a canvas for each square, which would then\n   be copied into the QRCode. This was changed to have just one large canvas where each square will be individually\n   drawn directly.\n4. iOS and tvOS Support: Starting from `v4.0.7` an initial implementation of the `QRCodeGraphics` so that iOS and tvOS\n   are now supported. **Any and all [feedback](https://github.com/g0dkar/qrcode-kotlin/issues/85) are very welcome!** -\n   Thanks a lot to [ruicanas](https://github.com/ruicanas) for all his contributions to this feature :D\n\n## License\n\nCopyright since 2021 Rafael M. Lins, Licensed under the [MIT License](https://rafaellins.mit-license.org/2021/).\n\nQR Code is trademarked by Denso Wave, Inc.\n\n## Thanks and Acknowledgements\n\n* [Kazuhiko Arase](https://github.com/kazuhikoarase): For his reference implementation!\n* [Paul Varry](https://github.com/pvarry): for opening the first few issues on the repo and helping to make the library\n  even better for everyone! :grin:\n* [Renan Lukas](https://github.com/RenanLukas): For his friendship, patience and help with Android, Gradle and a bunch\n  of other stuff during the development of v2.0.0 and v3.0.0!\n* [Doomsdayrs](https://github.com/Doomsdayrs): For pointing out how the library could be improved using Kotlin\n  Multiplatform, and helping out implementing it into the project.\n* An awesome, furry friend for all the support through all these years :)\n* [ruicanas](https://github.com/ruicanas): For not only pointing out some issues with the iOS implementation, but also\n  fixing them! Thank you so much ^^\n\n## Support and Links\n\n* If you found any bugs,\n  please [open an Issue](https://github.com/g0dkar/qrcode-kotlin/issues/new?assignees=g0dkar&labels=bug&template=bug_report.md&title=)\n  😁\n* Have any suggestions? You\n  can [make them](https://github.com/g0dkar/qrcode-kotlin/issues/new?assignees=&labels=&template=feature_request.md&title=)\n  as well!\n\nIf you enjoyed the library and want to get me some coffee, use the buttons below :love_you_gesture:\n\n[<img src=\"https://ko-fi.com/img/githubbutton_sm.svg\" alt=\"Buy me a coffee over at Ko-fi!\" width=\"200\"/>](https://ko-fi.com/g0dkar)\n\n[<img src=\"https://raw.githubusercontent.com/andreostrovsky/donate-with-paypal/master/blue.svg\" alt=\"Buy me a coffee over at PayPal!\" width=\"200\"/>](https://www.paypal.com/donate/?business=EFVC68BFJQWSC&no_recurring=0&item_name=Rafael+is+working+on+Open+Source+software+in+his+free+time.+This+helps+him+keep+this+up+for+longer%2C+and+with+higher+quality%21&currency_code=BRL)\n"
  },
  {
    "path": "README.pt-br.md",
    "content": "# QRCode-Kotlin\n\n[![License](https://img.shields.io/github/license/g0dkar/qrcode-kotlin)](LICENSE)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.g0dkar/qrcode-kotlin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.g0dkar%22%20AND%20a:%22qrcode-kotlin%22)\n\n:uk: [_**Also available in English**_](README.pt-br.md) :uk:\n\n![QRCode Kotlin Logo](examples/kotlin/project-banner.png)\n\nCriar QRCodes em Kotlin (e Java) é mais difícil do que deveria ser. **A QRCode-Kotlin tenta trazer uma forma\npersonalizável, simples e direta de se criar QRCodes**, especialmente no backend.\n\nÉ com esta missão em mente que continuamos a fazer o nosso melhor para aprender como pessoas desenvolvedoras utilizam\nessa biblioteca nos seus projetos e quais os seus objetivos, para podermos prover uma ferramenta/API melhor para todos.\nPor favor, sinta-se livre para compartilhar se e como você utiliza este projeto ^^\n\n* **Puro Kotlin:** Reescrita em puro Kotlin de uma implementação de referência da spec QRCode\n  por [Kazuhiko Arase](https://github.com/kazuhikoarase/qrcode-generator)\n* **Leve:** Sem dependencias, `~115KB` e faz o que promete no rótulo.\n* **Fácil de usar:** Rápida e facilmente tenha QRCodes com pouquíssimas linhas de código.\n* **Bonito:** Muitas pessoas desenvolvedoras não têm tempo e às vezes conhecimento para implementar o QRCode perfeito,\n  por isso esta biblioteca tenta gerar códigos bonitos por padrão.\n* **Amigável aos servidores:** A versão da JVM é fortemente focada em um caso de uso pessoal onde eu precisei criar\n  QRCodes no backend, mas todas as bibliotecas que encontrei eram complexas ou enormes, normalmente os dois.\n* **Multiplatforma:** Esta é uma bilioteca KMP com suporte a Java, JavaScript, Android, iOS e tvOS.\n\n## Sumário\n\n<!-- TOC -->\n* [Instalação](#instalação)\n* [Uso](#uso)\n  * [Spring Framework e/ou Spring Boot](#spring-framework-eou-spring-boot)\n* [Mudanças da v3](#mudanças-da-v3)\n* [Licença](#licença)\n* [Agradecimentos e Reconhecimentos](#agradecimentos-e-reconhecimentos)\n* [Suporte e Links](#suporte-e-links)\n<!-- TOC -->\n\n## Instalação\n\nA biblioteca está disponível através\nda [Maven Central](https://search.maven.org/artifact/io.github.g0dkar/qrcode-kotlin/4.5.0/qrcode-kotlin) e\ndo [NPM JS](https://www.npmjs.com/package/qrcode-kotlin), portanto basta adicioná-la a seu projeto como qualquer outra:\n\n**Gradle:**\n\n```groovy\n// Use esse tanto para Android quanto para a JVM\nimplementation(\"io.github.g0dkar:qrcode-kotlin:4.5.0\")\n```\n\n**Maven - JVM:**\n\n```xml\n<dependency>\n    <groupId>io.github.g0dkar</groupId>\n    <artifactId>qrcode-kotlin-jvm</artifactId>\n    <version>4.5.0</version>\n</dependency>\n```\n\n**Maven - Android:**\n\n```xml\n<dependency>\n    <groupId>io.github.g0dkar</groupId>\n    <artifactId>qrcode-kotlin-android</artifactId>\n    <version>4.5.0</version>\n</dependency>\n```\n\n**NodeJS:**\n\n```shell\nnpm install qrcode-kotlin@4.5.0\n```\n\n**Browser:**\n\n```html\n<script src=\"https://cdn.jsdelivr.net/gh/g0dkar/qrcode-kotlin@main/release/qrcode-kotlin.min.js\" type=\"application/javascript\"></script>\n```\n\n## Uso\n\nPara criar QRCodes, a principal classe que deve ser usada é a `qrcode.render.QRCode`. Ela tem métodos estáticos para\najudar na criação de um QRCode da forma que você quiser:\n\n```kotlin\n// Use qualquer um desses:\n\nval quadrados = QRCode.ofSquares()\n\nval circulos = QRCode.ofCircles()\n\nval quadradosArredondados = QRCode.ofRoundedSquares()\n```\n\nCom isso, você terá uma instância de [QRCodeBuilder](src/commonMain/kotlin/qrcode/QRCodeBuilder.kt). Esta classe tem\nmétodos para ajustar cores, tamanho, espaçamento, adicionar um logo e mais! Certifique-se de ver também a\nclasse [Colors](src/commonMain/kotlin/qrcode/color/Colors.kt).\n\nAqui tem um código para ajudar você a começar:\n\n```kotlin\nval helloWorld = QRCode.ofSquares()\n    .withColor(Colors.DEEP_SKY_BLUE) // Padrão é Colors.BLACK\n    .withSize(10) // Padrão é 25px\n    .build(\"Hello world!\")\n\n// Por padrão, os QRCodes serão gerados como PNG\nval pngBytes = helloWorld.render()\n\nFileOutputStream(\"hello-world.png\").use { it.write(pngBytes) }\n```\n\nRecomendamos fortemente que você veja os exemplos disponíveis:\n\n* [Todas as formas](examples/kotlin/src/main/kotlin/Example01-Shapes.kt): Quadrados, Círculos, Quadrados Arredondados e\n  formas personalizadas\n* [Tudo sobre cores](examples/kotlin/src/main/kotlin/Example02-Colors.kt): Frente, Fundo, Fundos transparentes, cores em\n  Gradiente Linear\n* [Adicionando um Logo](examples/kotlin/src/main/kotlin/Example03-Logo.kt): Adicione um logo e remova as células atrás\n  dele, ou não :)\n* [QRCodes em SVG](examples/kotlin/src/main/kotlin/Example04-SVG.kt): Como estender o renderizador para criar SVG (utilizando [JFree SVG](https://github.com/jfree/jfreesvg))\n* [O banner no topo deste README](examples/kotlin/src/main/kotlin/ProjectLogo.kt): Sim, feito com essa biblioteca ^^\n\nOs exemplos mostram praticamente tudo que pode ser feito com a biblioteca! Até mesmo como estender a mesma para criar\nQRCodes em SVG ;)\n\nVocê pode utilizar todas essas funcionalidades juntas e misturadas. Tente gerar o logo e banner com gradientes e tudo\nmais em SVG ;)\n\n### Spring Framework e/ou Spring Boot\n\nComo dito anteriormente, uma das razões principais para o desenvolvimento dessa biblioteca foi para ser usada em\naplicações backend. Portanto, é natural mostrar como fazer exatamente isso :)\n\nEste método de um controller do Spring Framework/Boot mostra como gerar QRCodes dado o conteúdo do mesmo:\n\n```kotlin\nimport org.springframework.core.io.ByteArrayResource\nimport org.springframework.http.HttpHeaders.CONTENT_DISPOSITION\nimport org.springframework.http.MediaType.IMAGE_PNG_VALUE\n\n@GetMapping(\"/qrcode\")\nfun generateQrCode(content: String): ResponseEntity<ByteArrayResource> {\n    val pngData = QRCode().ofSquares()\n        .build(content)\n        .render()\n    val resource = ByteArrayResource(pngData, IMAGE_PNG_VALUE)\n\n    return ResponseEntity.ok()\n        .header(CONTENT_DISPOSITION, \"attachment; filename=\\\"qrcode.png\\\"\")\n        .body(resource)\n}\n```\n\n## Mudanças da v3\n\nAs principais mudanças vindo da versão `v3.3.0` são:\n\n1. O pacote principal das classes foi mudado de `io.github.g0dkar.qrcode` para simplesmente `qrcode`\n    * O nome anterior não ajuda linguagens que não têm esse conceito de \"pacote\", e outras bibliotecas Kotlin já nomeiam\n      os seus pacotes principais dessa forma.\n2. A antiga classe `QRCode` foi reescrita para ser mais fácil de se criar QRCodes mais bonitos. A antiga classe `QRCode`\n   foi renomeada para [QRCodeProcessor](src/commonMain/kotlin/qrcode/raw/QRCodeProcessor.kt), com pouquíssimas mudanças na API.\n    * **Para a maioria dos casos de uso simples, a nova `QRCode` é compatível com a antiga!**\n3. Uma grande quantidade de otimizações em como o QRCode é desenhado. Anteriormente, tínhamos um canvas (ecrã) para cada\n   quadrado, o qual era copiado no canvas do QRCode principal. Isto foi mudado para termos apenas um grande canvas onde\n   cada quadrado individual será desenhado diretamente.\n4. Suporte a iOS e tvOS: A partir da versão `v4.0.7`, uma implementação experimental inicial da classe `QRCodeGraphics`\n   foi criada para que o iOS e tvOS sejam suportados. **Todo e\n   qualquer [feedback](https://github.com/g0dkar/qrcode-kotlin/issues/85) é muito bem-vindo!** (pode comentar em\n   português mesmo) - Um imenso agradecimento a [ruicanas](https://github.com/ruicanas) por suas contribuições a essa\n   feature :D\n\n## Licença\n\nCopyright desde 2021 Rafael M. Lins, Licenciado sob a [Licença MIT](https://rafaellins.mit-license.org/2021/).\n\nQR Code é marca registrada de Denso Wave, Inc.\n\n## Agradecimentos e Reconhecimentos\n\n* [Kazuhiko Arase](https://github.com/kazuhikoarase): Por sua implementação de referência!\n* [Paul Varry](https://github.com/pvarry): Por abrir as primeiras _issues_ do repositório e ajudar a fazer a biblioteca melhor para todo mundo! :grin:\n* [Renan Lukas](https://github.com/RenanLukas): Por sua amizade, paciência e ajuda com Android, Gradle e várias outras coisas mais durante o desenvolvimento das versões v2.0.0 e v3.0.0!\n* [Doomsdayrs](https://github.com/Doomsdayrs): Por apontar como a biblioteca podería melhorar se tornando um projeto KMP, entre outras contribuições.\n* Um incrível e peludo amigo por todo o suporte através dos anos :)\n* [ruicanas](https://github.com/ruicanas): Por não apenas apontar problemas com a implementação iOS, mas resolvê-los\n  também! Muito obrigado ^^\n\n## Suporte e Links\n\n* Se você encontrar algum bug, sinta-se livre\n  para [abrir uma Issue](https://github.com/g0dkar/qrcode-kotlin/issues/new?assignees=g0dkar&labels=bug&template=bug_report.md&title=)\n* Tem sugestões? Você\n  pode [fazê-las](https://github.com/g0dkar/qrcode-kotlin/issues/new?assignees=&labels=&template=feature_request.md&title=)\n  também!\n\nSe você gostou da biblioteca e quiser ajudar pagando um cafézinho, use os botões abaixo :love_you_gesture:\n\n[<img src=\"https://ko-fi.com/img/githubbutton_sm.svg\" alt=\"Me pague um cafézinho via Ko-fi!\" width=\"200\"/>](https://ko-fi.com/g0dkar)\n\n[<img src=\"https://raw.githubusercontent.com/andreostrovsky/donate-with-paypal/master/blue.svg\" alt=\"Me pague um cafézinho via PayPal!\" width=\"200\"/>](https://www.paypal.com/donate/?business=EFVC68BFJQWSC&no_recurring=0&item_name=Rafael+is+working+on+Open+Source+software+in+his+free+time.+This+helps+him+keep+this+up+for+longer%2C+and+with+higher+quality%21&currency_code=BRL)\n"
  },
  {
    "path": "_config.yml",
    "content": "theme: jekyll-theme-tactile"
  },
  {
    "path": "build.gradle.kts",
    "content": "@file:OptIn(ExperimentalWasmDsl::class)\n\nimport org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL\nimport org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED\nimport org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED\nimport org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier\nimport org.jetbrains.kotlin.gradle.ExperimentalWasmDsl\nimport org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig.Mode.PRODUCTION\nimport java.time.LocalDateTime\n\nbuildscript {\n    dependencies {\n        classpath(libs.kotlin.gradle.plugin)\n    }\n}\n\nplugins {\n    // Dev Plugins\n    id(\"idea\")\n\n    // Base Plugins\n    alias(libs.plugins.kotlin.multiplatform)\n    alias(libs.plugins.android.library)\n\n    // Kotest\n    alias(libs.plugins.kotest.multiplatform)\n\n    // Publishing Plugins\n    signing\n    `maven-publish`\n    alias(libs.plugins.nexus)\n    alias(libs.plugins.npmPublish)\n\n    // Docs Plugins\n    alias(libs.plugins.dokka)\n\n    // Here because of the Android Examples\n    alias(libs.plugins.android.application) apply false\n    alias(libs.plugins.kotlin.android) apply false\n}\n\nrepositories {\n    mavenCentral()\n    google()\n}\n\ngroup = \"io.github.g0dkar\"\nval javaVersion = JavaVersion.VERSION_1_8\nval javaVersionNumber = javaVersion.majorVersion.toInt()\n\nkotlin {\n    applyDefaultHierarchyTemplate()\n\n    jvmToolchain(javaVersionNumber)\n\n    compilerOptions {\n        freeCompilerArgs.add(\"-Xexpect-actual-classes\")\n    }\n\n    jvm()\n\n    androidTarget {\n        publishLibraryVariants(\"release\")\n    }\n\n    js {\n        browser {\n            commonWebpackConfig {\n                mode = PRODUCTION\n                sourceMaps = true\n            }\n\n            testTask {\n                enabled = false\n            }\n\n            binaries.library()\n            generateTypeScriptDefinitions()\n        }\n    }\n\n    wasmJs {\n        browser {\n            commonWebpackConfig {\n                mode = PRODUCTION\n                sourceMaps = true\n            }\n\n            testTask {\n                enabled = false\n            }\n\n            binaries.library()\n            generateTypeScriptDefinitions()\n        }\n    }\n\n    // This is in place just because my main development machine is NOT a macOS :)\n    // iOS Family of targets... since you can't just \"ios()\" anymore.\n    val currentPlatform = System.getProperty(\"os.name\")\n    if (currentPlatform.lowercase() == \"mac os x\") {\n        listOf(\n            iosX64(),\n            iosArm64(),\n            iosSimulatorArm64(),\n//          watchosX64() <- Still have to figure out how to do it for watchOS x_x\n//          watchosArm64()\n            tvosX64(),\n            tvosArm64(),\n            tvosSimulatorArm64(),\n        ).forEach {\n            it.binaries.framework {\n                baseName = \"qrcode_kotlin\"\n                isStatic = true\n            }\n        }\n    }\n\n    sourceSets {\n        commonTest {\n            dependencies {\n                implementation(kotlin(\"test\"))\n                implementation(libs.kotest.assertions.core)\n                implementation(libs.kotest.framework.engine)\n            }\n        }\n\n        jvmTest {\n            dependencies {\n                implementation(libs.kotest.runner.junit5)\n            }\n        }\n\n        androidTarget {\n            dependencies {\n                compileOnly(libs.androidx.compose.ui)\n            }\n        }\n\n        wasmJsMain {\n            dependencies {\n                implementation(libs.kotlinx.browser)\n            }\n        }\n    }\n}\n\nandroid {\n    namespace = \"io.github.g0dkar.qrcode\"\n    compileSdk = 7\n    sourceSets[\"main\"].manifest.srcFile(\"src/androidMain/AndroidManifest.xml\")\n\n    defaultConfig {\n        minSdk = 7\n    }\n\n    compileOptions {\n        sourceCompatibility = javaVersion\n        targetCompatibility = javaVersion\n    }\n}\n\n/**\n * Kotest Configuration\n */\ntasks {\n    named<Test>(\"jvmTest\") {\n        useJUnitPlatform()\n\n        filter {\n            isFailOnNoMatchingTests = false\n        }\n\n        testLogging {\n            showExceptions = true\n            showStandardStreams = true\n            events = setOf(FAILED, PASSED)\n            exceptionFormat = FULL\n        }\n    }\n}\n\n/* *********************** */\n/* After Build Publishing  */\n/* *********************** */\ntasks {\n    /** Copies release files into /release dir */\n    register<Copy>(\"copyToReleaseDir\") {\n        dependsOn(build)\n\n        doFirst {\n            layout.projectDirectory.dir(\"release\").asFile.deleteRecursively()\n        }\n\n        from(layout.buildDirectory.file(\"libs/qrcode-kotlin-jvm-$version.jar\"))\n        from(layout.buildDirectory.file(\"dist/js/productionLibrary/qrcode-kotlin.js\"))\n        from(layout.buildDirectory.file(\"dist/js/productionLibrary/qrcode-kotlin.js.map\"))\n        from(layout.buildDirectory.file(\"dist/js/productionLibrary/qrcode-kotlin.d.ts\"))\n        into(layout.projectDirectory.dir(\"release\"))\n    }\n}\n\n/* **************** */\n/* Dev Environment  */\n/* **************** */\nidea {\n    module {\n        isDownloadJavadoc = false\n        isDownloadSources = true\n    }\n}\n\n/* **************** */\n/* Docs             */\n/* **************** */\ndokka {\n    moduleName.set(\"QRCode-Kotlin\")\n    basePublicationsDirectory = layout.buildDirectory.dir(\"javadoc\")\n\n    dokkaSourceSets {\n        configureEach {\n            skipDeprecated = true\n            reportUndocumented = true\n            skipEmptyPackages = true\n            suppressGeneratedFiles = true\n\n            documentedVisibilities = setOf(VisibilityModifier.Public)\n\n            sourceLink {\n                remoteUrl(\"https://github.com/g0dkar/qrcode-kotlin/tree/main\")\n            }\n        }\n    }\n\n    pluginsConfiguration.html {\n        footerMessage.set(\"&copy; 2021-${LocalDateTime.now().year} Rafael M. Lins - MIT License\")\n    }\n}\n\nval dokkaJar by tasks.registering(Jar::class) {\n    group = JavaBasePlugin.DOCUMENTATION_GROUP\n    description = \"Assembles Kotlin docs with Dokka\"\n    archiveClassifier.set(\"javadoc\")\n    from(tasks.dokkaGenerate)\n}\n\nval dokkaCopyToFolder by tasks.registering(Copy::class) {\n    dependsOn(tasks.dokkaGenerate)\n    doFirst { layout.projectDirectory.dir(\"docs/dokka\").asFile.deleteRecursively() }\n\n    from(layout.buildDirectory.dir(\"javadoc/html\"))\n    into(layout.projectDirectory.dir(\"docs/dokka\"))\n}\n\n/* **************** */\n/* Publishing       */\n/* **************** */\nval ossrhUsername = properties.getOrDefault(\"ossrhUsername\", System.getenv(\"OSSRH_USER\"))?.toString()\nval ossrhPassword = properties.getOrDefault(\"ossrhPassword\", System.getenv(\"OSSRH_PASSWORD\"))?.toString()\nval npmAccessKey = properties.getOrDefault(\"npmAccessKey\", System.getenv(\"NPM_ACCESSKEY\"))?.toString()\n\nnexusPublishing {\n    repositories {\n        sonatype {\n            nexusUrl.set(uri(\"https://s01.oss.sonatype.org/service/local/\"))\n            snapshotRepositoryUrl.set(uri(\"https://s01.oss.sonatype.org/content/repositories/snapshots/\"))\n\n            username.set(ossrhUsername ?: return@sonatype)\n            password.set(ossrhPassword ?: return@sonatype)\n        }\n    }\n}\n\npublishing {\n    publications {\n        withType<MavenPublication> {\n            artifact(dokkaJar)\n\n            pom {\n                val projectGitUrl = \"github.com/g0dkar/qrcode-kotlin\"\n\n                name.set(rootProject.name)\n                description.set(\"A Kotlin Library to generate QR Codes without any other dependencies.\")\n                url.set(\"https://$projectGitUrl\")\n                inceptionYear.set(\"2021\")\n                licenses {\n                    license {\n                        name.set(\"MIT\")\n                        url.set(\"https://rafaellins.mit-license.org/2021/\")\n                    }\n                }\n                developers {\n                    developer {\n                        id.set(\"g0dkar\")\n                        name.set(\"Rafael Lins\")\n                        email.set(\"rafael@lins.net.br\")\n                        url.set(\"https://github.com/g0dkar\")\n                    }\n                }\n                issueManagement {\n                    system.set(\"GitHub\")\n                    url.set(\"https://$projectGitUrl/issues\")\n                }\n                scm {\n                    connection.set(\"scm:git://$projectGitUrl.git\")\n                    developerConnection.set(\"scm:git://$projectGitUrl.git\")\n                    url.set(\"https://$projectGitUrl\")\n                }\n            }\n        }\n    }\n\n    repositories {\n        maven {\n            name = \"sonatype\"\n            url = uri(\"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/\")\n            credentials {\n                username = ossrhUsername\n                password = ossrhPassword\n            }\n        }\n    }\n}\n\nsigning {\n    val key = properties.getOrDefault(\"signing.key\", System.getenv(\"SIGNING_KEY\"))?.toString() ?: return@signing\n    val password =\n        properties.getOrDefault(\"signing.password\", System.getenv(\"SIGNING_PASSWORD\"))?.toString() ?: return@signing\n\n    useInMemoryPgpKeys(key, password)\n    sign(publishing.publications)\n}\n\n// https://github.com/gradle/gradle/issues/26091\ntasks.withType<AbstractPublishToMaven>().configureEach {\n    val signingTasks = tasks.withType<Sign>()\n    mustRunAfter(signingTasks)\n}\n\nnpmPublish {\n    readme.set(rootDir.resolve(\"README.md\"))\n\n    registries {\n        register(\"npmjs\") {\n            uri.set(uri(\"https://registry.npmjs.org\"))\n            authToken.set(npmAccessKey)\n        }\n    }\n}\n"
  },
  {
    "path": "examples/android/build.gradle.kts",
    "content": "plugins {\n    alias(libs.plugins.android.application)\n    alias(libs.plugins.kotlin.android)\n    alias(libs.plugins.compose.compiler)\n}\n\nandroid {\n    namespace = \"io.github.g0dkar.qrcode\"\n    compileSdk = 35\n\n    defaultConfig {\n        applicationId = \"io.github.g0dkar.qrcodeKotlin\"\n        minSdk = 26\n        targetSdk = 34\n        versionCode = 403\n        versionName = \"4.2.0\"\n\n        testInstrumentationRunner = \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n\n    buildTypes {\n        release {\n            isMinifyEnabled = true\n            proguardFiles(getDefaultProguardFile(\"proguard-android-optimize.txt\"), \"proguard-rules.pro\")\n        }\n    }\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_17\n        targetCompatibility = JavaVersion.VERSION_17\n    }\n    kotlinOptions {\n        jvmTarget = \"17\"\n    }\n    buildFeatures {\n        viewBinding = true\n        compose = true\n    }\n}\n\ndependencies {\n    val composeBom = platform(\"androidx.compose:compose-bom:2025.02.00\")\n    implementation(composeBom)\n\n    implementation(\"io.github.g0dkar:qrcode-kotlin:4.5.0\")\n    implementation(libs.core.ktx)\n    implementation(libs.appcompat)\n    implementation(libs.material)\n    implementation(libs.constraintlayout)\n    implementation(libs.navigation.fragment.ktx)\n    implementation(libs.navigation.ui.ktx)\n    implementation(libs.androidx.annotation)\n    implementation(libs.androidx.lifecycle.livedata.ktx)\n    implementation(libs.androidx.lifecycle.viewmodel.ktx)\n    implementation(libs.androidx.foundation)\n}\n"
  },
  {
    "path": "examples/android/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile"
  },
  {
    "path": "examples/android/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:dataExtractionRules=\"@xml/data_extraction_rules\"\n        android:fullBackupContent=\"@xml/backup_rules\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/Theme.QRCodeKotlinExampleApp\"\n        tools:targetApi=\"31\">\n        <activity\n            android:exported=\"false\"\n            android:name=\".AboutActivity\" />\n        <activity\n            android:exported=\"false\"\n            android:name=\".QRCodeDetailActivity\" />\n        <activity\n            android:exported=\"false\"\n            android:label=\"@string/title_activity_new_qrcode\"\n            android:name=\".NewQRCodeActivity\" />\n        <activity\n            android:exported=\"true\"\n            android:label=\"@string/app_name\"\n            android:name=\".QRCodeListActivity\"\n            android:theme=\"@style/Theme.QRCodeKotlinExampleApp.NoActionBar\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "examples/android/src/main/java/io/github/g0dkar/qrcode/AboutActivity.kt",
    "content": "package io.github.g0dkar.qrcode\n\nimport android.os.Bundle\nimport androidx.appcompat.app.AppCompatActivity\n\nclass AboutActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_about)\n    }\n}\n"
  },
  {
    "path": "examples/android/src/main/java/io/github/g0dkar/qrcode/NewQRCodeActivity.kt",
    "content": "package io.github.g0dkar.qrcode\n\nimport android.content.Intent\nimport android.graphics.Bitmap\nimport android.os.Bundle\nimport android.os.Handler\nimport android.os.Looper\nimport android.view.View\nimport android.widget.AdapterView\nimport android.widget.AdapterView.OnItemSelectedListener\nimport android.widget.Button\nimport android.widget.EditText\nimport android.widget.ImageView\nimport android.widget.Spinner\nimport android.widget.Toast\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.core.os.postDelayed\nimport androidx.core.widget.doOnTextChanged\nimport io.github.g0dkar.qrcode.QRCodeData.Companion.STYLE_DEFAULT\nimport io.github.g0dkar.qrcode.QRCodeData.Companion.qrCodeForStyle\n\nclass NewQRCodeActivity : AppCompatActivity() {\n    private lateinit var qrCodeData: EditText\n    private lateinit var qrCodeImageView: ImageView\n    private lateinit var saveButton: Button\n    private lateinit var styleSelect: Spinner\n    private var qrCodeIsValid = false\n\n    private val handler = Handler(Looper.getMainLooper())\n\n    companion object {\n        const val QRCODE_DATA = \"qrCodeData\"\n        const val QRCODE_STYLE = \"qrCodeStyle\"\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_new_qrcode)\n\n        qrCodeData = findViewById(R.id.newQRCodeData)\n        qrCodeImageView = findViewById(R.id.newQRCodePreviewImage)\n        saveButton = findViewById(R.id.newQRCodeBtn)\n        styleSelect = findViewById(R.id.newQRCodeStyle)\n\n        qrCodeData.doOnTextChanged { text, _, _, _ ->\n            val string = text?.toString()?.trim()\n            val qrCodeStyle = styleSelect.selectedItemPosition\n            updateAction(string, qrCodeStyle)\n        }\n\n        styleSelect.onItemSelectedListener = ItemSelectAction(this)\n\n        saveButton.setOnClickListener {\n            save()\n        }\n    }\n\n    private fun updateAction(qrCodeData: String?, qrCodeStyle: Int) {\n        qrCodeIsValid = if (qrCodeData.isNullOrBlank()) {\n            qrCodeImageView.setImageBitmap(null)\n\n            false\n        } else {\n            try {\n                handler.removeCallbacksAndMessages(null)\n                handler.postDelayed(250) {\n                    val qrCodeBitmap = qrCodeForStyle(qrCodeStyle)\n                        .build(qrCodeData)\n                        .render()\n                        .nativeImage() as Bitmap\n\n                    qrCodeImageView.setImageBitmap(qrCodeBitmap)\n                }\n\n                true\n            } catch (t: Throwable) {\n                Toast.makeText(\n                    this@NewQRCodeActivity,\n                    R.string.new_qrcode_error_preview,\n                    Toast.LENGTH_LONG,\n                ).show()\n\n                qrCodeImageView.setImageBitmap(null)\n\n                false\n            }\n        }\n    }\n\n    private fun save() {\n        val resultIntent = Intent()\n        val qrCodeDataText = qrCodeData.text?.toString()?.trim()\n        val qrCodeDataStyle = styleSelect.selectedItemPosition\n\n        if (qrCodeDataText.isNullOrBlank() || !qrCodeIsValid) {\n            setResult(RESULT_CANCELED, resultIntent)\n        } else {\n            resultIntent.putExtra(QRCODE_DATA, qrCodeDataText)\n            resultIntent.putExtra(QRCODE_STYLE, qrCodeDataStyle)\n            setResult(RESULT_OK, resultIntent)\n        }\n\n        finish()\n    }\n\n    class ItemSelectAction(val codeActivity: NewQRCodeActivity) : OnItemSelectedListener {\n        override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {\n            val string = codeActivity.qrCodeData.text.toString().trim()\n            codeActivity.updateAction(string, position)\n        }\n\n        override fun onNothingSelected(parent: AdapterView<*>?) {\n            val string = codeActivity.qrCodeData.text.toString().trim()\n            codeActivity.updateAction(string, STYLE_DEFAULT)\n        }\n    }\n}\n"
  },
  {
    "path": "examples/android/src/main/java/io/github/g0dkar/qrcode/QRCodeData.kt",
    "content": "package io.github.g0dkar.qrcode\n\nimport android.content.SharedPreferences\nimport android.graphics.Bitmap\nimport qrcode.QRCode\nimport java.time.OffsetDateTime\nimport java.time.ZoneOffset\n\ndata class QRCodeData(\n    val data: String,\n    val style: Int = STYLE_DEFAULT,\n    val timestamp: OffsetDateTime = OffsetDateTime.now(ZoneOffset.UTC),\n    val bitmap: Bitmap = qrCodeForStyle(style).build(data).render().nativeImage() as Bitmap,\n) : Comparable<QRCodeData> {\n    companion object {\n        const val STYLE_DEFAULT = 0\n        const val STYLE_SQUARE = 1\n        const val STYLE_CIRCLE = 2\n        const val STYLE_ROUNDED_SQUARE = 3\n        const val SEPARATOR = \"___STYLE___\"\n\n        fun qrCodeForStyle(style: Int = STYLE_DEFAULT) =\n            when (style) {\n                STYLE_SQUARE -> QRCode.ofSquares().withInnerSpacing(0)\n                STYLE_CIRCLE -> QRCode.ofCircles()\n                STYLE_ROUNDED_SQUARE -> QRCode.ofRoundedSquares()\n                else -> QRCode.ofSquares()\n            }\n    }\n\n    fun persist(sharedPreferencesEditor: SharedPreferences.Editor) {\n        val key = timestamp.toEpochSecond().toString()\n        sharedPreferencesEditor.putString(key, \"$data$SEPARATOR$style\")\n    }\n\n    override fun compareTo(other: QRCodeData): Int = timestamp.compareTo(other.timestamp)\n}\n"
  },
  {
    "path": "examples/android/src/main/java/io/github/g0dkar/qrcode/QRCodeDetailActivity.kt",
    "content": "package io.github.g0dkar.qrcode\n\nimport android.os.Bundle\nimport android.view.View\nimport android.widget.ImageView\nimport android.widget.TextView\nimport androidx.appcompat.app.AppCompatActivity\nimport java.time.Instant\nimport java.time.OffsetDateTime\nimport java.time.ZoneOffset\n\nclass QRCodeDetailActivity : AppCompatActivity() {\n    companion object {\n        const val QRCODE_DATA = \"qrCodeData\"\n        const val QRCODE_STYLE = \"qrCodeStyle\"\n        const val QRCODE_TIMESTAMP = \"qrCodeTimestamp\"\n    }\n\n    private lateinit var qrCodeDetailText: TextView\n    private lateinit var qrCodeDetailImage: ImageView\n    private lateinit var qrCodeDetailFab: View\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_qrcode_detail)\n\n        qrCodeDetailText = findViewById(R.id.qrCodeDetailText)\n        qrCodeDetailImage = findViewById(R.id.qrCodeDetailImage)\n        qrCodeDetailFab = findViewById(R.id.qrCodeDetailFab)\n\n        setBrightness() // Needed for readability if using this app on an actual phone\n\n        val qrCodeData = intent.getStringExtra(QRCODE_DATA) ?: \"ERROR\"\n        val qrCodeStyle = intent.getIntExtra(QRCODE_STYLE, 0)\n        val qrCodeTimestamp = intent.getLongExtra(QRCODE_TIMESTAMP, Instant.now().epochSecond)\n        val qrCode = QRCodeData(qrCodeData, qrCodeStyle, OffsetDateTime.ofInstant(Instant.ofEpochSecond(qrCodeTimestamp), ZoneOffset.UTC))\n\n        qrCodeDetailText.text = qrCode.data\n        qrCodeDetailImage.setImageBitmap(qrCode.bitmap)\n    }\n\n    private fun setBrightness() {\n        try {\n            val layout = window.attributes\n            layout.screenBrightness = 1.0f\n            window.attributes = layout\n        } catch (_: Exception) {\n            // NOOP\n        }\n    }\n}\n"
  },
  {
    "path": "examples/android/src/main/java/io/github/g0dkar/qrcode/QRCodeListActivity.kt",
    "content": "package io.github.g0dkar.qrcode\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.view.View\nimport android.widget.Toast\nimport androidx.activity.result.ActivityResultLauncher\nimport androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.g0dkar.qrcode.NewQRCodeActivity.Companion.QRCODE_DATA\nimport io.github.g0dkar.qrcode.NewQRCodeActivity.Companion.QRCODE_STYLE\nimport io.github.g0dkar.qrcode.extra.QRCodeListAdapter\nimport io.github.g0dkar.qrcode.extra.QRCodeListDatasource\n\nclass QRCodeListActivity : AppCompatActivity() {\n    private val listAdapter = QRCodeListAdapter {\n        val intent = Intent(this@QRCodeListActivity, QRCodeDetailActivity::class.java)\n        intent.putExtra(QRCodeDetailActivity.QRCODE_DATA, it.data)\n        intent.putExtra(QRCodeDetailActivity.QRCODE_STYLE, it.style)\n        intent.putExtra(QRCodeDetailActivity.QRCODE_TIMESTAMP, it.timestamp.toEpochSecond())\n        startActivity(intent)\n    }\n\n    private lateinit var recyclerView: RecyclerView\n    private lateinit var fab: View\n    private lateinit var newQRCodeActivity: ActivityResultLauncher<Intent>\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        fab = findViewById(R.id.fab)\n        recyclerView = findViewById(R.id.recycler_view)\n\n        QRCodeListDatasource.fromContext(this)\n\n        recyclerView.adapter = listAdapter\n\n        fab.setOnClickListener {\n            startNewQRCodeActivity()\n        }\n\n        newQRCodeActivity = registerForActivityResult(StartActivityForResult()) {\n            if (it.data != null) {\n                val result = it.resultCode\n\n                if (result == RESULT_OK) {\n                    val qrCodeData = it.data?.getStringExtra(QRCODE_DATA)\n                    val qrCodeStyle = it.data?.getIntExtra(QRCODE_STYLE, 0)\n\n                    if (qrCodeData != null && qrCodeStyle != null) {\n                        QRCodeListDatasource.add(qrCodeData, qrCodeStyle)\n                    } else {\n                        Toast.makeText(\n                            this@QRCodeListActivity,\n                            R.string.new_qrcode_error,\n                            Toast.LENGTH_LONG\n                        ).show()\n                    }\n                } else {\n                    Toast.makeText(\n                        this@QRCodeListActivity,\n                        R.string.new_qrcode_error,\n                        Toast.LENGTH_LONG\n                    ).show()\n                }\n            }\n        }\n    }\n\n    override fun onResume() {\n        super.onResume()\n\n        QRCodeListDatasource.liveData.observe(this) {\n            if (it != null) {\n                listAdapter.submitList(it)\n            }\n        }\n    }\n\n    override fun onStop() {\n        super.onStop()\n\n        QRCodeListDatasource.liveData.removeObservers(this)\n    }\n\n    private fun startNewQRCodeActivity() {\n        val intent = Intent(this, NewQRCodeActivity::class.java)\n        newQRCodeActivity.launch(intent)\n    }\n}\n"
  },
  {
    "path": "examples/android/src/main/java/io/github/g0dkar/qrcode/extra/QRCodeListAdapter.kt",
    "content": "package io.github.g0dkar.qrcode.extra\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ImageView\nimport android.widget.TextView\nimport androidx.recyclerview.widget.DiffUtil\nimport androidx.recyclerview.widget.ListAdapter\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.g0dkar.qrcode.QRCodeData\nimport io.github.g0dkar.qrcode.R\n\nclass QRCodeListAdapter(\n    private val onClick: (QRCodeData) -> Unit\n) : ListAdapter<QRCodeData, QRCodeListViewHolder>(QRCodeListDiffCallback) {\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QRCodeListViewHolder {\n        val view = LayoutInflater.from(parent.context)\n            .inflate(R.layout.qrcode_list_item, parent, false)\n        return QRCodeListViewHolder(view, onClick)\n    }\n\n    override fun onBindViewHolder(holder: QRCodeListViewHolder, position: Int) {\n        val qrCodeData = getItem(position)\n        holder.bind(qrCodeData)\n    }\n\n}\n\nclass QRCodeListViewHolder(\n    itemView: View,\n    val onClick: (QRCodeData) -> Unit\n) : RecyclerView.ViewHolder(itemView) {\n    private val qrCodeListItemTextView: TextView = itemView.findViewById(R.id.qrcode_data)\n    private val qrCodeListItemImageView: ImageView = itemView.findViewById(R.id.qrcode_image)\n    private var currentQrCodeData: QRCodeData? = null\n\n    init {\n        itemView.setOnClickListener {\n            currentQrCodeData?.let {\n                onClick(it)\n            }\n        }\n    }\n\n    fun bind(qrCodeData: QRCodeData) {\n        currentQrCodeData = qrCodeData\n\n        qrCodeListItemTextView.text = qrCodeData.data\n        qrCodeListItemImageView.setImageBitmap(qrCodeData.bitmap)\n    }\n}\n\nobject QRCodeListDiffCallback : DiffUtil.ItemCallback<QRCodeData>() {\n    override fun areItemsTheSame(oldItem: QRCodeData, newItem: QRCodeData): Boolean {\n        return oldItem == newItem\n    }\n\n    override fun areContentsTheSame(oldItem: QRCodeData, newItem: QRCodeData): Boolean {\n        return oldItem.data == newItem.data\n    }\n}\n"
  },
  {
    "path": "examples/android/src/main/java/io/github/g0dkar/qrcode/extra/QRCodeListDatasource.kt",
    "content": "package io.github.g0dkar.qrcode.extra\n\nimport android.content.Context\nimport android.content.SharedPreferences\nimport androidx.appcompat.app.AppCompatActivity.MODE_PRIVATE\nimport androidx.lifecycle.MutableLiveData\nimport io.github.g0dkar.qrcode.QRCodeData\nimport io.github.g0dkar.qrcode.QRCodeData.Companion.SEPARATOR\nimport io.github.g0dkar.qrcode.QRCodeData.Companion.STYLE_DEFAULT\nimport java.time.Instant\nimport java.time.ZoneOffset\n\nobject QRCodeListDatasource {\n    private const val ERROR = \"ERROR\"\n    private const val PREFERENCE_FILE = \"qrCodeKotlinAndroidExample\"\n\n    private lateinit var sharedPreferences: SharedPreferences\n\n    val liveData: MutableLiveData<List<QRCodeData>> = MutableLiveData(mutableListOf())\n\n    fun fromContext(context: Context) {\n        val currentList = liveData.value ?: listOf()\n        sharedPreferences = context.getSharedPreferences(PREFERENCE_FILE, MODE_PRIVATE)\n\n        val newList = currentList.toMutableList().apply {\n            sharedPreferences.all\n                .filterValues { it != null && it.toString().isNotBlank() }\n                .mapTo(this) { (key, value) ->\n                    val dataParts = value?.toString()?.split(SEPARATOR)\n\n                    QRCodeData(\n                        dataParts?.getOrNull(0)?.toString() ?: ERROR,\n                        dataParts?.getOrNull(1)?.toIntOrNull() ?: 0,\n                        Instant.ofEpochSecond(key.toLong()).atOffset(ZoneOffset.UTC),\n                    )\n                }\n\n            if (isEmpty()) {\n                add(QRCodeData(\"QRCode Kotlin\", STYLE_DEFAULT))\n            }\n\n            sortDescending()\n        }\n\n        liveData.postValue(newList)\n    }\n\n    fun add(data: String, style: Int) {\n        val currentList = liveData.value ?: listOf()\n        val qrCodeData = QRCodeData(data, style)\n\n        val editor = sharedPreferences.edit()\n        qrCodeData.persist(editor)\n        editor.apply()\n\n        val newList = currentList.toMutableList()\n            .apply { add(0, qrCodeData) }\n        liveData.postValue(newList)\n    }\n\n    fun remove(timestamp: Long) {\n        val currentList = liveData.value ?: listOf()\n        val newList = currentList.toMutableList()\n\n        sharedPreferences.edit()\n            .remove(timestamp.toString())\n            .apply()\n\n        liveData.postValue(newList)\n    }\n}\n"
  },
  {
    "path": "examples/android/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:height=\"108dp\"\n  android:viewportHeight=\"108\"\n  android:viewportWidth=\"108\"\n  android:width=\"108dp\">\n  <path android:fillColor=\"#3DDC84\"\n    android:pathData=\"M0,0h108v108h-108z\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M9,0L9,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M19,0L19,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M29,0L29,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M39,0L39,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M49,0L49,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M59,0L59,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M69,0L69,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M79,0L79,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M89,0L89,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M99,0L99,108\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,9L108,9\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,19L108,19\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,29L108,29\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,39L108,39\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,49L108,49\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,59L108,59\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,69L108,69\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,79L108,79\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,89L108,89\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M0,99L108,99\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M19,29L89,29\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M19,39L89,39\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M19,49L89,49\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M19,59L89,59\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M19,69L89,69\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M19,79L89,79\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M29,19L29,89\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M39,19L39,89\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M49,19L49,89\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M59,19L59,89\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M69,19L69,89\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n  <path android:fillColor=\"#00000000\" android:pathData=\"M79,19L79,89\"\n    android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n</vector>\n"
  },
  {
    "path": "examples/android/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  xmlns:aapt=\"http://schemas.android.com/aapt\"\n  android:height=\"108dp\"\n  android:viewportHeight=\"108\"\n  android:viewportWidth=\"108\"\n  android:width=\"108dp\">\n  <path\n    android:pathData=\"M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z\">\n    <aapt:attr name=\"android:fillColor\">\n      <gradient\n        android:endX=\"85.84757\"\n        android:endY=\"92.4963\"\n        android:startX=\"42.9492\"\n        android:startY=\"49.59793\"\n        android:type=\"linear\">\n        <item\n          android:color=\"#44000000\"\n          android:offset=\"0.0\"/>\n        <item\n          android:color=\"#00000000\"\n          android:offset=\"1.0\"/>\n      </gradient>\n    </aapt:attr>\n  </path>\n  <path\n    android:fillColor=\"#FFFFFF\"\n    android:fillType=\"nonZero\"\n    android:pathData=\"M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z\"\n    android:strokeColor=\"#00000000\"\n    android:strokeWidth=\"1\"/>\n</vector>"
  },
  {
    "path": "examples/android/src/main/res/layout/activity_about.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\n    android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    tools:context=\".AboutActivity\">\n\n    <ImageView\n        android:id=\"@+id/imageView\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\"\n        tools:srcCompat=\"@tools:sample/avatars\" />\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "examples/android/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <com.google.android.material.appbar.MaterialToolbar\n        android:id=\"@+id/titleBar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?attr/colorPrimary\"\n        android:minHeight=\"?attr/actionBarSize\"\n        android:theme=\"?attr/actionBarTheme\"\n        android:contentDescription=\"@string/title\"\n        app:title=\"@string/title\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\"\n        app:menu=\"@menu/menu_main\" />\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/recycler_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        app:layoutManager=\"LinearLayoutManager\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/titleBar\" />\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n        android:id=\"@+id/fab\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_margin=\"16dp\"\n        android:contentDescription=\"@string/fab_content_description\"\n        android:src=\"@android:drawable/ic_input_add\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\" />\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "examples/android/src/main/res/layout/activity_new_qrcode.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\n    android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    tools:context=\".NewQRCodeActivity\">\n\n    <EditText\n        android:id=\"@+id/newQRCodeData\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:autofillHints=\"@string/new_qrcode_qrcode_data_label\"\n        android:hint=\"@string/new_qrcode_qrcode_data_label\"\n        android:inputType=\"textUri\"\n        android:minHeight=\"48dp\"\n        android:selectAllOnFocus=\"true\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\" />\n\n    <TextView\n        android:id=\"@+id/newQRCodeStyleLabel\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"16dp\"\n        android:text=\"@string/new_qrcode_style_label\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/newQRCodeData\" />\n\n    <Spinner\n        android:id=\"@+id/newQRCodeStyle\"\n        android:layout_width=\"0dp\"\n        android:layout_height=\"48dp\"\n        android:layout_marginTop=\"16dp\"\n        android:entries=\"@array/styles_array\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/newQRCodeStyleLabel\" />\n\n    <Button\n        android:id=\"@+id/newQRCodeBtn\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_gravity=\"start\"\n        android:contentDescription=\"@string/new_qrcode_btn\"\n        android:enabled=\"true\"\n        android:text=\"@string/new_qrcode_btn\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/newQRCodeStyle\" />\n\n    <ImageView\n        android:id=\"@+id/newQRCodePreviewImage\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"16dp\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/newQRCodeBtn\"\n        tools:srcCompat=\"@tools:sample/avatars\" />\n\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "examples/android/src/main/res/layout/activity_qrcode_detail.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#E0F7FA\"\n    android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\n    tools:context=\".QRCodeDetailActivity\">\n\n    <ImageView\n        android:id=\"@+id/qrCodeDetailImage\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        app:layout_constraintBottom_toTopOf=\"@+id/qrCodeDetailText\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\"\n        tools:srcCompat=\"@tools:sample/avatars\" />\n\n    <TextView\n        android:id=\"@+id/qrCodeDetailText\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:autoLink=\"all\"\n        android:autoSizeTextType=\"uniform\"\n        android:ellipsize=\"marquee\"\n        android:marqueeRepeatLimit=\"marquee_forever\"\n        android:textAppearance=\"@style/TextAppearance.AppCompat.Body1\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintStart_toStartOf=\"parent\" />\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n        android:id=\"@+id/qrCodeDetailFab\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:clickable=\"true\"\n        app:backgroundTint=\"@android:color/holo_red_light\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:srcCompat=\"@android:drawable/ic_menu_delete\" />\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "examples/android/src/main/res/layout/qrcode_list_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n     Copyright (C) 2020 The Android Open Source Project\n     Licensed under the Apache License, Version 2.0 (the \"License\");\n     you may not use this file except in compliance with the License.\n     You may obtain a copy of the License at\n          http://www.apache.org/licenses/LICENSE-2.0\n     Unless required by applicable law or agreed to in writing, software\n     distributed under the License is distributed on an \"AS IS\" BASIS,\n     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n     See the License for the specific language governing permissions and\n     limitations under the License.\n-->\n\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\">\n\n    <ImageView\n        android:id=\"@+id/qrcode_image\"\n        android:layout_width=\"48dp\"\n        android:layout_height=\"48dp\"\n        android:layout_margin=\"10dp\"\n        android:contentDescription=\"@string/qrcode_image_description\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintEnd_toStartOf=\"@+id/qrcode_data\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\" />\n\n    <TextView\n        android:id=\"@+id/qrcode_data\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_margin=\"10dp\"\n        android:autoSizeTextType=\"uniform\"\n        android:ellipsize=\"marquee\"\n        android:marqueeRepeatLimit=\"marquee_forever\"\n        android:text=\"@string/qrcode_data_title\"\n        android:textAppearance=\"@style/TextAppearance.AppCompat.Body1\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintStart_toEndOf=\"@+id/qrcode_image\"\n        app:layout_constraintTop_toTopOf=\"parent\" />\n\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "examples/android/src/main/res/menu/menu_main.xml",
    "content": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n  xmlns:tools=\"http://schemas.android.com/tools\"\n  tools:context=\"com.example.qrcodekotlinexampleapp.MainActivity\">\n  <item\n    android:id=\"@+id/action_settings\"\n    android:icon=\"@android:drawable/ic_menu_info_details\"\n    android:orderInCategory=\"100\"\n    android:title=\"@string/action_about\"\n    app:showAsAction=\"ifRoom\"/>\n</menu>"
  },
  {
    "path": "examples/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n  <background android:drawable=\"@drawable/ic_launcher_background\"/>\n  <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "examples/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n  <background android:drawable=\"@drawable/ic_launcher_background\"/>\n  <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "examples/android/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n  <color name=\"purple_200\">#FFBB86FC</color>\n  <color name=\"purple_500\">#FF6200EE</color>\n  <color name=\"purple_700\">#FF3700B3</color>\n  <color name=\"teal_200\">#FF03DAC5</color>\n  <color name=\"teal_700\">#FF018786</color>\n  <color name=\"black\">#FF000000</color>\n  <color name=\"white\">#FFFFFFFF</color>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values/dimens.xml",
    "content": "<resources>\n  <dimen name=\"fab_margin\">16dp</dimen>\n  <!-- Default screen margins, per the Android Design guidelines. -->\n  <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n  <dimen name=\"activity_vertical_margin\">16dp</dimen>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\" translatable=\"false\">QRCodeKotlinExampleApp</string>\n\n    <string name=\"action_about\">About</string>\n    <string name=\"title\">QRCode-Kotlin Lib Example App</string>\n    <string name=\"new_qrcode_error\">Error adding QRCode, please try again.</string>\n    <string name=\"new_qrcode_error_preview\">Error generating preview QRCode :(</string>\n\n    <string name=\"qrcode_data_title\">QRCode Data</string>\n    <string name=\"qrcode_image_description\">QRCode Image</string>\n    <string name=\"fab_content_description\">Create New QRCode</string>\n\n    <string name=\"title_activity_new_qrcode\">New QRCode</string>\n    <string name=\"new_qrcode_qrcode_data_label\">QRCode Data (Link, Text, anything)</string>\n    <string name=\"new_qrcode_btn\">Save QRCode</string>\n    <string name=\"new_qrcode_image_desc\">QRCode Preview</string>\n\n    <string name=\"title_activity_qrcode_detail\">QRCode Info</string>\n    <string name=\"qrcode_detail_fab\">Remove QRCode</string>\n\n    <string name=\"new_qrcode_style_label\">Style:</string>\n\n    <string-array name=\"styles_array\">\n        <item>Spaced Squares (default)</item>\n        <item>Squares</item>\n        <item>Circles</item>\n        <item>Rounded Squares</item>\n    </string-array>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values/themes.xml",
    "content": "<resources xmlns:tools=\"http://schemas.android.com/tools\">\n  <!-- Base application theme. -->\n  <style name=\"Theme.QRCodeKotlinExampleApp\"\n    parent=\"Theme.MaterialComponents.DayNight.DarkActionBar\">\n    <!-- Primary brand color. -->\n    <item name=\"colorPrimary\">@color/purple_500</item>\n    <item name=\"colorPrimaryVariant\">@color/purple_700</item>\n    <item name=\"colorOnPrimary\">@color/white</item>\n    <!-- Secondary brand color. -->\n    <item name=\"colorSecondary\">@color/teal_200</item>\n    <item name=\"colorSecondaryVariant\">@color/teal_700</item>\n    <item name=\"colorOnSecondary\">@color/black</item>\n    <!-- Status bar color. -->\n    <item name=\"android:statusBarColor\" tools:targetApi=\"l\">?attr/colorPrimaryVariant</item>\n    <!-- Customize your theme here. -->\n  </style>\n  <style name=\"Theme.QRCodeKotlinExampleApp.NoActionBar\">\n    <item name=\"windowActionBar\">false</item>\n    <item name=\"windowNoTitle\">true</item>\n  </style>\n  <style name=\"Theme.QRCodeKotlinExampleApp.AppBarOverlay\"\n    parent=\"ThemeOverlay.AppCompat.Dark.ActionBar\"/>\n  <style name=\"Theme.QRCodeKotlinExampleApp.PopupOverlay\" parent=\"ThemeOverlay.AppCompat.Light\"/>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values-land/dimens.xml",
    "content": "<resources>\n  <dimen name=\"fab_margin\">48dp</dimen>\n  <dimen name=\"activity_horizontal_margin\">48dp</dimen>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values-night/themes.xml",
    "content": "<resources xmlns:tools=\"http://schemas.android.com/tools\">\n  <!-- Base application theme. -->\n  <style name=\"Theme.QRCodeKotlinExampleApp\"\n    parent=\"Theme.MaterialComponents.DayNight.DarkActionBar\">\n    <!-- Primary brand color. -->\n    <item name=\"colorPrimary\">@color/purple_200</item>\n    <item name=\"colorPrimaryVariant\">@color/purple_700</item>\n    <item name=\"colorOnPrimary\">@color/black</item>\n    <!-- Secondary brand color. -->\n    <item name=\"colorSecondary\">@color/teal_200</item>\n    <item name=\"colorSecondaryVariant\">@color/teal_200</item>\n    <item name=\"colorOnSecondary\">@color/black</item>\n    <!-- Status bar color. -->\n    <item name=\"android:statusBarColor\" tools:targetApi=\"l\">?attr/colorPrimaryVariant</item>\n    <!-- Customize your theme here. -->\n  </style>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values-pt-rBR/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"action_about\">Sobre</string>\n    <string name=\"title\">QRCode-Kotlin App de Exemplo</string>\n    <string name=\"qrcode_data_title\">Dado do QRCode</string>\n    <string name=\"qrcode_image_description\">Imagem do QRCode</string>\n    <string name=\"fab_content_description\">Criar Novo QRCode</string>\n    <string name=\"new_qrcode_qrcode_data_label\">Dados do QRCode (Link, Texto, etc.)</string>\n    <string name=\"new_qrcode_btn\">Salvar QRCode</string>\n    <string name=\"new_qrcode_image_desc\">Previsão do QRCode</string>\n    <string name=\"new_qrcode_error\">Erro ao adicionar QRCode, por favor tente novamente.</string>\n    <string name=\"title_activity_new_qrcode\">Novo QRCode</string>\n    <string name=\"new_qrcode_error_preview\">Erro gerando previsão de QRCode :(</string>\n    <string name=\"title_activity_qrcode_detail\">Informações do QRCode</string>\n    <string name=\"qrcode_detail_fab\">Remover QRCode</string>\n    <string name=\"new_qrcode_style_label\">Estilo:</string>\n    <string-array name=\"styles_array\">\n        <item>Quadrados Espaçados (padrão)</item>\n        <item>Quadrados</item>\n        <item>Círculos</item>\n        <item>Quadrados arredondados</item>\n    </string-array>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values-w1240dp/dimens.xml",
    "content": "<resources>\n  <dimen name=\"fab_margin\">200dp</dimen>\n  <dimen name=\"activity_horizontal_margin\">200dp</dimen>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/values-w600dp/dimens.xml",
    "content": "<resources>\n  <dimen name=\"fab_margin\">48dp</dimen>\n  <dimen name=\"activity_horizontal_margin\">48dp</dimen>\n</resources>"
  },
  {
    "path": "examples/android/src/main/res/xml/backup_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n   Sample backup rules file; uncomment and customize as necessary.\n   See https://developer.android.com/guide/topics/data/autobackup\n   for details.\n   Note: This file is ignored for devices older that API 31\n   See https://developer.android.com/about/versions/12/backup-restore\n-->\n<full-backup-content>\n  <!--\n   <include domain=\"sharedpref\" path=\".\"/>\n   <exclude domain=\"sharedpref\" path=\"device.xml\"/>\n-->\n</full-backup-content>"
  },
  {
    "path": "examples/android/src/main/res/xml/data_extraction_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n   Sample data extraction rules file; uncomment and customize as necessary.\n   See https://developer.android.com/about/versions/12/backup-restore#xml-changes\n   for details.\n-->\n<data-extraction-rules>\n  <cloud-backup>\n    <!-- TODO: Use <include> and <exclude> to control what is backed up.\n        <include .../>\n        <exclude .../>\n        -->\n  </cloud-backup>\n  <!--\n    <device-transfer>\n        <include .../>\n        <exclude .../>\n    </device-transfer>\n    -->\n</data-extraction-rules>"
  },
  {
    "path": "examples/iosApp/.gitignore",
    "content": "# Xcode\n.DS_Store\nbuild/\n*.pbxuser\n*.mode1v3\n*.mode2v3\n*.perspectivev3\nxcuserdata/\n\n# Swift\n*.swiftpm\n\n# CocoaPods\nPods/\n*.xcworkspace\n\n# Carthage\nCarthage/\n\n# macOS\n*.DS_Store\n\n# iOS\n*.ipa\n*.xcarchive\n*.xcuserstate\nDerivedData/\n"
  },
  {
    "path": "examples/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json",
    "content": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "examples/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"platform\" : \"ios\",\n      \"size\" : \"1024x1024\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "examples/iosApp/iosApp/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "examples/iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "examples/iosApp/iosApp/presentation/ContentView.swift",
    "content": "//\n//  ContentView.swift\n//  iosApp\n//\n//  Created by Rui Canas on 26/11/2023.\n//\n\nimport SwiftUI\nimport qrcode_kotlin\n\nstruct ContentView: View {\n\n    let qrCode = QRCode\n        .companion\n        .ofSquares()\n        .withBackgroundColor(bgColor: Colors().TRANSPARENT)\n        .withColor(color: Colors().BLACK)\n        .withSize(size: 10)\n        .withInnerSpacing(innerSpacing: 0)\n        .build(data: Strings.data)\n        .renderToBytes(format: Strings.imageFormat)\n\n    var body: some View {\n        VStack(spacing: 30) {\n            Text(Strings.title)\n                .font(.title2)\n                .foregroundColor(.blue)\n                .bold()\n            \n            Image(\n                uiImage: UIImage(data: qrCode.toData) ?? .init()\n            )\n            .resizable()\n            .aspectRatio(contentMode: .fit)\n            .frame(width: 200, height: 200)\n            .background(Color.clear)\n        }\n    }\n}\n\n#Preview {\n    ContentView()\n}\n\nprivate enum Strings {\n    \n    static let title = \"QRCode-Kotlin\"\n    static let data = \"https://github.com/g0dkar/qrcode-kotlin\"\n    static let imageFormat = \"PNG\"\n}\n"
  },
  {
    "path": "examples/iosApp/iosApp/presentation/iosApp.swift",
    "content": "//\n//  iosAppApp.swift\n//  iosApp\n//\n//  Created by Rui Canas on 26/11/2023.\n//\n\nimport SwiftUI\n\n@main\nstruct iosApp: App {\n    var body: some Scene {\n        WindowGroup {\n            ContentView()\n        }\n    }\n}\n"
  },
  {
    "path": "examples/iosApp/iosApp/utils/NativeParser.swift",
    "content": "//  NativeParser.swift\n//  iosApp\n//\n//  Created by Rui Canas on 01/12/2023.\n//\n\nimport qrcode_kotlin\n\nextension KotlinByteArray {\n    \n    var toData: Data {\n\n        var byteArray = [Int8]()\n        for i in 0..<size {\n            byteArray.append(self.get(index: i))\n        }\n        \n        return Data(\n            bytes: byteArray,\n            count: byteArray.count\n        )\n    }\n}\n\nextension NSData {\n    \n    var toKotlinByteArray: KotlinByteArray {\n        \n        let byteCount = length\n        return KotlinByteArray(size: Int32(byteCount)) { [weak self] index in\n            var byte: Int8 = 0\n            self?.getBytes(&byte, range: NSRange(location: Int(truncating: index), length: 1))\n            return KotlinByte(value: byte)\n        }\n    }\n}\n\nextension Data {\n    \n    var toKotlinByteArary: KotlinByteArray { (self as NSData).toKotlinByteArray }\n}\n"
  },
  {
    "path": "examples/iosApp/iosApp.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t6308BABD2B1A672C00D02457 /* NativeParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6308BABC2B1A672C00D02457 /* NativeParser.swift */; };\n\t\t634F842B2B13E22000C7FC04 /* iosApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634F842A2B13E22000C7FC04 /* iosApp.swift */; };\n\t\t634F842D2B13E22000C7FC04 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634F842C2B13E22000C7FC04 /* ContentView.swift */; };\n\t\t634F842F2B13E22100C7FC04 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 634F842E2B13E22100C7FC04 /* Assets.xcassets */; };\n\t\t634F84322B13E22100C7FC04 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 634F84312B13E22100C7FC04 /* Preview Assets.xcassets */; };\n\t\t634F843C2B13E22100C7FC04 /* iosAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634F843B2B13E22100C7FC04 /* iosAppTests.swift */; };\n\t\t634F84462B13E22100C7FC04 /* iosAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634F84452B13E22100C7FC04 /* iosAppUITests.swift */; };\n\t\t634F84482B13E22100C7FC04 /* iosAppUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634F84472B13E22100C7FC04 /* iosAppUITestsLaunchTests.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t634F84382B13E22100C7FC04 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 634F841F2B13E22000C7FC04 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 634F84262B13E22000C7FC04;\n\t\t\tremoteInfo = iosApp;\n\t\t};\n\t\t634F84422B13E22100C7FC04 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 634F841F2B13E22000C7FC04 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 634F84262B13E22000C7FC04;\n\t\t\tremoteInfo = iosApp;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t6308BABC2B1A672C00D02457 /* NativeParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeParser.swift; sourceTree = \"<group>\"; };\n\t\t634F84272B13E22000C7FC04 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t634F842A2B13E22000C7FC04 /* iosApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosApp.swift; sourceTree = \"<group>\"; };\n\t\t634F842C2B13E22000C7FC04 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = \"<group>\"; };\n\t\t634F842E2B13E22100C7FC04 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t634F84312B13E22100C7FC04 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = \"Preview Assets.xcassets\"; sourceTree = \"<group>\"; };\n\t\t634F84372B13E22100C7FC04 /* iosAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iosAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t634F843B2B13E22100C7FC04 /* iosAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosAppTests.swift; sourceTree = \"<group>\"; };\n\t\t634F84412B13E22100C7FC04 /* iosAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iosAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t634F84452B13E22100C7FC04 /* iosAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosAppUITests.swift; sourceTree = \"<group>\"; };\n\t\t634F84472B13E22100C7FC04 /* iosAppUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosAppUITestsLaunchTests.swift; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t634F84242B13E22000C7FC04 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t634F84342B13E22100C7FC04 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t634F843E2B13E22100C7FC04 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t6308BABA2B1A66C900D02457 /* utils */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6308BABC2B1A672C00D02457 /* NativeParser.swift */,\n\t\t\t);\n\t\t\tpath = utils;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6308BABB2B1A66D800D02457 /* presentation */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t634F842A2B13E22000C7FC04 /* iosApp.swift */,\n\t\t\t\t634F842C2B13E22000C7FC04 /* ContentView.swift */,\n\t\t\t);\n\t\t\tpath = presentation;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t634F841E2B13E22000C7FC04 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t634F84292B13E22000C7FC04 /* iosApp */,\n\t\t\t\t634F843A2B13E22100C7FC04 /* iosAppTests */,\n\t\t\t\t634F84442B13E22100C7FC04 /* iosAppUITests */,\n\t\t\t\t634F84282B13E22000C7FC04 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t634F84282B13E22000C7FC04 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t634F84272B13E22000C7FC04 /* iosApp.app */,\n\t\t\t\t634F84372B13E22100C7FC04 /* iosAppTests.xctest */,\n\t\t\t\t634F84412B13E22100C7FC04 /* iosAppUITests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t634F84292B13E22000C7FC04 /* iosApp */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6308BABB2B1A66D800D02457 /* presentation */,\n\t\t\t\t6308BABA2B1A66C900D02457 /* utils */,\n\t\t\t\t634F842E2B13E22100C7FC04 /* Assets.xcassets */,\n\t\t\t\t634F84302B13E22100C7FC04 /* Preview Content */,\n\t\t\t);\n\t\t\tpath = iosApp;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t634F84302B13E22100C7FC04 /* Preview Content */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t634F84312B13E22100C7FC04 /* Preview Assets.xcassets */,\n\t\t\t);\n\t\t\tpath = \"Preview Content\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t634F843A2B13E22100C7FC04 /* iosAppTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t634F843B2B13E22100C7FC04 /* iosAppTests.swift */,\n\t\t\t);\n\t\t\tpath = iosAppTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t634F84442B13E22100C7FC04 /* iosAppUITests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t634F84452B13E22100C7FC04 /* iosAppUITests.swift */,\n\t\t\t\t634F84472B13E22100C7FC04 /* iosAppUITestsLaunchTests.swift */,\n\t\t\t);\n\t\t\tpath = iosAppUITests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t634F84262B13E22000C7FC04 /* iosApp */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 634F844B2B13E22100C7FC04 /* Build configuration list for PBXNativeTarget \"iosApp\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t634F84542B13F37A00C7FC04 /* ShellScript */,\n\t\t\t\t634F84232B13E22000C7FC04 /* Sources */,\n\t\t\t\t634F84242B13E22000C7FC04 /* Frameworks */,\n\t\t\t\t634F84252B13E22000C7FC04 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = iosApp;\n\t\t\tproductName = iosApp;\n\t\t\tproductReference = 634F84272B13E22000C7FC04 /* iosApp.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n\t\t634F84362B13E22100C7FC04 /* iosAppTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 634F844E2B13E22100C7FC04 /* Build configuration list for PBXNativeTarget \"iosAppTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t634F84332B13E22100C7FC04 /* Sources */,\n\t\t\t\t634F84342B13E22100C7FC04 /* Frameworks */,\n\t\t\t\t634F84352B13E22100C7FC04 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t634F84392B13E22100C7FC04 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = iosAppTests;\n\t\t\tproductName = iosAppTests;\n\t\t\tproductReference = 634F84372B13E22100C7FC04 /* iosAppTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n\t\t634F84402B13E22100C7FC04 /* iosAppUITests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 634F84512B13E22100C7FC04 /* Build configuration list for PBXNativeTarget \"iosAppUITests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t634F843D2B13E22100C7FC04 /* Sources */,\n\t\t\t\t634F843E2B13E22100C7FC04 /* Frameworks */,\n\t\t\t\t634F843F2B13E22100C7FC04 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t634F84432B13E22100C7FC04 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = iosAppUITests;\n\t\t\tproductName = iosAppUITests;\n\t\t\tproductReference = 634F84412B13E22100C7FC04 /* iosAppUITests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.ui-testing\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t634F841F2B13E22000C7FC04 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = 1;\n\t\t\t\tLastSwiftUpdateCheck = 1510;\n\t\t\t\tLastUpgradeCheck = 1510;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t634F84262B13E22000C7FC04 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 15.1;\n\t\t\t\t\t};\n\t\t\t\t\t634F84362B13E22100C7FC04 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 15.1;\n\t\t\t\t\t\tTestTargetID = 634F84262B13E22000C7FC04;\n\t\t\t\t\t};\n\t\t\t\t\t634F84402B13E22100C7FC04 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 15.1;\n\t\t\t\t\t\tTestTargetID = 634F84262B13E22000C7FC04;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 634F84222B13E22000C7FC04 /* Build configuration list for PBXProject \"iosApp\" */;\n\t\t\tcompatibilityVersion = \"Xcode 14.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 634F841E2B13E22000C7FC04;\n\t\t\tproductRefGroup = 634F84282B13E22000C7FC04 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t634F84262B13E22000C7FC04 /* iosApp */,\n\t\t\t\t634F84362B13E22100C7FC04 /* iosAppTests */,\n\t\t\t\t634F84402B13E22100C7FC04 /* iosAppUITests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t634F84252B13E22000C7FC04 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t634F84322B13E22100C7FC04 /* Preview Assets.xcassets in Resources */,\n\t\t\t\t634F842F2B13E22100C7FC04 /* Assets.xcassets in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t634F84352B13E22100C7FC04 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t634F843F2B13E22100C7FC04 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t634F84542B13F37A00C7FC04 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 12;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"cd \\\"$SRCROOT/../..\\\"\\n./gradlew :embedAndSignAppleFrameworkForXcode\\n\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t634F84232B13E22000C7FC04 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t634F842D2B13E22000C7FC04 /* ContentView.swift in Sources */,\n\t\t\t\t634F842B2B13E22000C7FC04 /* iosApp.swift in Sources */,\n\t\t\t\t6308BABD2B1A672C00D02457 /* NativeParser.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t634F84332B13E22100C7FC04 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t634F843C2B13E22100C7FC04 /* iosAppTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t634F843D2B13E22100C7FC04 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t634F84482B13E22100C7FC04 /* iosAppUITestsLaunchTests.swift in Sources */,\n\t\t\t\t634F84462B13E22100C7FC04 /* iosAppUITests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t634F84392B13E22100C7FC04 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 634F84262B13E22000C7FC04 /* iosApp */;\n\t\t\ttargetProxy = 634F84382B13E22100C7FC04 /* PBXContainerItemProxy */;\n\t\t};\n\t\t634F84432B13E22100C7FC04 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 634F84262B13E22000C7FC04 /* iosApp */;\n\t\t\ttargetProxy = 634F84422B13E22100C7FC04 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin XCBuildConfiguration section */\n\t\t634F84492B13E22100C7FC04 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu17;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 17.2;\n\t\t\t\tLOCALIZATION_PREFERS_STRING_CATALOGS = YES;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"DEBUG $(inherited)\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t634F844A2B13E22100C7FC04 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu17;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 17.2;\n\t\t\t\tLOCALIZATION_PREFERS_STRING_CATALOGS = YES;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t634F844C2B13E22100C7FC04 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"iosApp/Preview Content\\\"\";\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(SRCROOT)/../../build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\";\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;\n\t\t\t\tINFOPLIST_KEY_UILaunchScreen_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = \"UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight\";\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = \"UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-framework\",\n\t\t\t\t\tqrcode_kotlin,\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = g0dkar.iosApp;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t634F844D2B13E22100C7FC04 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"iosApp/Preview Content\\\"\";\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(SRCROOT)/../../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\";\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;\n\t\t\t\tINFOPLIST_KEY_UILaunchScreen_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = \"UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight\";\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = \"UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"-framework\",\n\t\t\t\t\tqrcode_kotlin,\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = g0dkar.iosApp;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t634F844F2B13E22100C7FC04 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 17.2;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = g0dkar.iosAppTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = NO;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/iosApp.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iosApp\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t634F84502B13E22100C7FC04 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 17.2;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = g0dkar.iosAppTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = NO;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/iosApp.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iosApp\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t634F84522B13E22100C7FC04 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = g0dkar.iosAppUITests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = NO;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_TARGET_NAME = iosApp;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t634F84532B13E22100C7FC04 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = g0dkar.iosAppUITests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = NO;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_TARGET_NAME = iosApp;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t634F84222B13E22000C7FC04 /* Build configuration list for PBXProject \"iosApp\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t634F84492B13E22100C7FC04 /* Debug */,\n\t\t\t\t634F844A2B13E22100C7FC04 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t634F844B2B13E22100C7FC04 /* Build configuration list for PBXNativeTarget \"iosApp\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t634F844C2B13E22100C7FC04 /* Debug */,\n\t\t\t\t634F844D2B13E22100C7FC04 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t634F844E2B13E22100C7FC04 /* Build configuration list for PBXNativeTarget \"iosAppTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t634F844F2B13E22100C7FC04 /* Debug */,\n\t\t\t\t634F84502B13E22100C7FC04 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t634F84512B13E22100C7FC04 /* Build configuration list for PBXNativeTarget \"iosAppUITests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t634F84522B13E22100C7FC04 /* Debug */,\n\t\t\t\t634F84532B13E22100C7FC04 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 634F841F2B13E22000C7FC04 /* Project object */;\n}\n"
  },
  {
    "path": "examples/iosApp/iosAppTests/iosAppTests.swift",
    "content": "//\n//  iosAppTests.swift\n//  iosAppTests\n//\n//  Created by Rui Canas on 26/11/2023.\n//\n\nimport XCTest\n@testable import iosApp\n\nfinal class iosAppTests: XCTestCase {\n\n    override func setUpWithError() throws {\n        // Put setup code here. This method is called before the invocation of each test method in the class.\n    }\n\n    override func tearDownWithError() throws {\n        // Put teardown code here. This method is called after the invocation of each test method in the class.\n    }\n\n    func testExample() throws {\n        // This is an example of a functional test case.\n        // Use XCTAssert and related functions to verify your tests produce the correct results.\n        // Any test you write for XCTest can be annotated as throws and async.\n        // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.\n        // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.\n    }\n\n    func testPerformanceExample() throws {\n        // This is an example of a performance test case.\n        self.measure {\n            // Put the code you want to measure the time of here.\n        }\n    }\n\n}\n"
  },
  {
    "path": "examples/iosApp/iosAppUITests/iosAppUITests.swift",
    "content": "//\n//  iosAppUITests.swift\n//  iosAppUITests\n//\n//  Created by Rui Canas on 26/11/2023.\n//\n\nimport XCTest\n\nfinal class iosAppUITests: XCTestCase {\n\n    override func setUpWithError() throws {\n        // Put setup code here. This method is called before the invocation of each test method in the class.\n\n        // In UI tests it is usually best to stop immediately when a failure occurs.\n        continueAfterFailure = false\n\n        // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.\n    }\n\n    override func tearDownWithError() throws {\n        // Put teardown code here. This method is called after the invocation of each test method in the class.\n    }\n\n    func testExample() throws {\n        // UI tests must launch the application that they test.\n        let app = XCUIApplication()\n        app.launch()\n\n        // Use XCTAssert and related functions to verify your tests produce the correct results.\n    }\n\n    func testLaunchPerformance() throws {\n        if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {\n            // This measures how long it takes to launch your application.\n            measure(metrics: [XCTApplicationLaunchMetric()]) {\n                XCUIApplication().launch()\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "examples/iosApp/iosAppUITests/iosAppUITestsLaunchTests.swift",
    "content": "//\n//  iosAppUITestsLaunchTests.swift\n//  iosAppUITests\n//\n//  Created by Rui Canas on 26/11/2023.\n//\n\nimport XCTest\n\nfinal class iosAppUITestsLaunchTests: XCTestCase {\n\n    override class var runsForEachTargetApplicationUIConfiguration: Bool {\n        true\n    }\n\n    override func setUpWithError() throws {\n        continueAfterFailure = false\n    }\n\n    func testLaunch() throws {\n        let app = XCUIApplication()\n        app.launch()\n\n        // Insert steps here to perform after app launch but before taking a screenshot,\n        // such as logging into a test account or navigating somewhere in the app\n\n        let attachment = XCTAttachment(screenshot: app.screenshot())\n        attachment.name = \"Launch Screen\"\n        attachment.lifetime = .keepAlways\n        add(attachment)\n    }\n}\n"
  },
  {
    "path": "examples/java/build.gradle.kts",
    "content": "plugins {\n    java\n}\n\nrepositories {\n    mavenCentral()\n    mavenLocal()\n}\n\ndependencies {\n    implementation(\"io.github.g0dkar:qrcode-kotlin:4.5.0\")\n    implementation(\"org.jfree:org.jfree.svg:5.0.5\")\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/Example01_Shapes.java",
    "content": "package examples;\n\nimport examples.customClasses.JVMTriangleShapeFunction;\nimport examples.customClasses.TriangleShapeFunction;\nimport qrcode.QRCode;\n\n/**\n * Examples written for Java 17+\n */\npublic class Example01_Shapes { // NOSONAR\n    public static void main(String[] args) {\n        // All supported platforms\n        // -----------------------\n        // Squares (default)\n        QRCode squareQRCode = QRCode.ofSquares() // <- See Here\n                .build(\"Hello, Squares!\");\n        byte[] squarePngData = squareQRCode.renderToBytes();\n\n        // Circles\n        QRCode circleQRCode = QRCode.ofCircles() // <- See Here\n                .build(\"Hello, Circles!\");\n        byte[] circlePngData = circleQRCode.renderToBytes();\n\n        // Rounded Squares\n        QRCode roundedSquareQRCode = QRCode.ofRoundedSquares() // <- See Here\n                .build(\"Hello, Rounded Squares!\");\n        byte[] roundedSquarePngData = roundedSquareQRCode.renderToBytes();\n\n        // Custom Shape\n        // WARNING: For demonstration purposes only. My phone camera couldn't read it.\n        QRCode customShapeQRCode = QRCode.ofCustomShape(new TriangleShapeFunction()) // <- See Here\n                .build(\"Hello, Triangles!\");\n        byte[] customShapePngData = customShapeQRCode.renderToBytes();\n\n        // Custom Shape - JVM-specific implementation\n        // WARNING: For demonstration purposes only. My phone camera couldn't read it.\n        QRCode customShapeQRCodeJVM = QRCode.ofCustomShape(new JVMTriangleShapeFunction()) // <- See Here\n                .build(\"Hello, Triangles... from the JVM!\");\n        byte[] customShapePngDataJVM = customShapeQRCodeJVM.renderToBytes();\n\n        // -----------------------\n        // JVM-only code (saves the PNG Bytes to a file)\n        Util.saveFile(\"examples/java/examples-results/example01-squares.png\", squarePngData);\n        Util.saveFile(\"examples/java/examples-results/example01-circles.png\", circlePngData);\n        Util.saveFile(\"examples/java/examples-results/example01-rounded-squares.png\", roundedSquarePngData);\n        Util.saveFile(\"examples/java/examples-results/example01-custom.png\", customShapePngData);\n        Util.saveFile(\"examples/java/examples-results/example01-custom-jvm.png\", customShapePngDataJVM);\n    }\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/Example02_Colors.java",
    "content": "package examples;\n\nimport qrcode.QRCode;\nimport qrcode.color.Colors;\n\n/**\n * Examples written for Java 17+\n */\npublic class Example02_Colors { // NOSONAR\n    public static void main(String[] args) {\n        // All supported platforms\n        // -----------------------\n        // Squares (default)\n        QRCode colorQRCode = QRCode.ofSquares()\n                .withColor(Colors.ORANGE) // <- See Here\n                .build(\"Orange\");\n        byte[] colorPngData = colorQRCode.renderToBytes();\n\n        // Circles\n        QRCode darkModeQRCode = QRCode.ofSquares()\n                .withColor(Colors.css(\"#43454a\"))           // <- See Here\n                .withBackgroundColor(Colors.css(\"#1e1f22\")) // <- See Here\n                .build(\"Dark Mode QRCode\");\n        byte[] darkModePngData = darkModeQRCode.renderToBytes();\n\n        // Rounded Squares\n        QRCode gradientQRCode = QRCode.ofSquares()\n                .withGradientColor(Colors.BISQUE, Colors.BLUE) // <- See Here\n                .build(\"Weird gradient colors, but I think it's nice\");\n        byte[] gradientPngData = gradientQRCode.renderToBytes();\n\n        // Custom Shape\n        // WARNING: For demonstration purposes only. My phone camera couldn't read it.\n        QRCode transparentQRCode = QRCode.ofSquares()\n                .withBackgroundColor(Colors.TRANSPARENT)\n                .build(\"You can put this on top of pretty much anything :)\");\n        byte[] transparentPngData = transparentQRCode.renderToBytes();\n\n        // -----------------------\n        // JVM-only code (saves the PNG Bytes to a file)\n        Util.saveFile(\"examples/java/examples-results/example02-color.png\", colorPngData);\n        Util.saveFile(\"examples/java/examples-results/example02-dark-mode.png\", darkModePngData);\n        Util.saveFile(\"examples/java/examples-results/example02-gradient.png\", gradientPngData);\n        Util.saveFile(\"examples/java/examples-results/example02-transparent.png\", transparentPngData);\n    }\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/Example03_SVG.java",
    "content": "package examples;\n\nimport examples.svg.SVGGraphicsFactory;\nimport qrcode.QRCode;\n\n/**\n * Examples written for Java 17+\n */\npublic class Example03_SVG { // NOSONAR\n    public static void main(String[] args) {\n        // All supported platforms\n        // -----------------------\n        // Squares (default)\n        QRCode squareQRCode = QRCode.ofSquares()\n                .withGraphicsFactory(new SVGGraphicsFactory()) // <- See Here\n                .build(\"Hello, Squares!\");\n        byte[] squarePngData = squareQRCode.renderToBytes();\n\n        // Circles\n        QRCode circleQRCode = QRCode.ofCircles()\n                .withGraphicsFactory(new SVGGraphicsFactory()) // <- See Here\n                .build(\"Hello, Circles!\");\n        byte[] circlePngData = circleQRCode.renderToBytes();\n\n        // Rounded Squares\n        QRCode roundedSquareQRCode = QRCode.ofRoundedSquares()\n                .withGraphicsFactory(new SVGGraphicsFactory()) // <- See Here\n                .build(\"Hello, Rounded Squares!\");\n        byte[] roundedSquarePngData = roundedSquareQRCode.renderToBytes();\n\n        // -----------------------\n        // JVM-only code (saves the SVG to a file)\n        Util.saveFile(\"examples/java/examples-results/example03-squares.svg\", squarePngData);\n        Util.saveFile(\"examples/java/examples-results/example03-circles.svg\", circlePngData);\n        Util.saveFile(\"examples/java/examples-results/example03-rounded-squares.svg\", roundedSquarePngData);\n    }\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/Util.java",
    "content": "package examples;\n\nimport java.io.FileOutputStream;\n\nfinal class Util {\n    private Util() {\n    }\n\n    public static void saveFile(String filename, byte[] data) {\n        try (FileOutputStream fileOut = new FileOutputStream(filename)) {\n            fileOut.write(data);\n        } catch (Exception e) {\n            throw new RuntimeException(\"Error while writing file\", e); // NOSONAR\n        }\n    }\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/customClasses/JVMTriangleShapeFunction.java",
    "content": "package examples.customClasses;\n\nimport qrcode.QRCode;\nimport qrcode.render.QRCodeGraphics;\nimport qrcode.shape.DefaultShapeFunction;\n\nimport java.awt.*;\n\npublic class JVMTriangleShapeFunction extends DefaultShapeFunction {\n    public JVMTriangleShapeFunction() {\n        super(QRCode.DEFAULT_SQUARE_SIZE, 1);\n    }\n\n    public void fillRect(int x, int y, int width, int height, int color, QRCodeGraphics canvas) {\n        int topCenterX = x + width / 2;\n        int topCenterY = y;\n        int bottomLeftX = x;\n        int bottomLeftY = y + height;\n        int bottomRightX = x + width;\n        int bottomRightY = y + height;\n\n        canvas.directDraw(it -> {\n            Polygon triangle = new Polygon();\n            triangle.addPoint(topCenterX, topCenterY);\n            triangle.addPoint(bottomLeftX, bottomLeftY);\n            triangle.addPoint(bottomRightX, bottomRightY);\n            triangle.addPoint(topCenterX, topCenterY);\n\n            int[] rgba = qrcode.color.Colors.getRGBA(color);\n\n            it.setPaint(new Color(rgba[0], rgba[1], rgba[2], rgba[3]));\n\n            it.fill(triangle);\n        });\n    }\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/customClasses/TriangleShapeFunction.java",
    "content": "package examples.customClasses;\n\nimport qrcode.QRCode;\nimport qrcode.render.QRCodeGraphics;\nimport qrcode.shape.DefaultShapeFunction;\n\npublic class TriangleShapeFunction extends DefaultShapeFunction {\n    public TriangleShapeFunction() {\n        super(QRCode.DEFAULT_SQUARE_SIZE, 1);\n    }\n\n    public void fillRect(int x, int y, int width, int height, int color, QRCodeGraphics canvas) {\n        int topCenterX = x + width / 2;\n        int topCenterY = y;\n        int bottomLeftX = x;\n        int bottomLeftY = y + height;\n        int bottomRightX = x + width;\n        int bottomRightY = y + height;\n\n        // Line from top-center to bottom-left\n        canvas.drawLine(topCenterX, topCenterY, bottomLeftX, bottomLeftY, color, 1.0);\n        // Line from top-center to bottom-right\n        canvas.drawLine(topCenterX, topCenterY, bottomRightX, bottomRightY, color, 1.0);\n        // Line from bottom-left to bottom-right\n        canvas.drawLine(bottomLeftX, bottomLeftY, bottomRightX, bottomRightY, color, 1.0);\n    }\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/svg/SVGGraphicsFactory.java",
    "content": "package examples.svg;\n\nimport org.jetbrains.annotations.NotNull;\nimport qrcode.render.QRCodeGraphics;\nimport qrcode.render.QRCodeGraphicsFactory;\n\npublic class SVGGraphicsFactory extends QRCodeGraphicsFactory {\n    /**\n     * IntelliJ might show an error on this method, but it can be ignored. Not sure what causes it.\n     */\n    @NotNull\n    @Override\n    public QRCodeGraphics newGraphics(int width, int height) {\n        return new SVGQRCodeGraphics(width, height);\n    }\n}\n"
  },
  {
    "path": "examples/java/src/main/java/examples/svg/SVGQRCodeGraphics.java",
    "content": "package examples.svg;\n\nimport org.jetbrains.annotations.NotNull;\nimport org.jfree.svg.SVGGraphics2D;\nimport qrcode.render.QRCodeGraphics;\n\nimport java.awt.*;\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.io.OutputStreamWriter;\nimport java.nio.charset.StandardCharsets;\n\npublic class SVGQRCodeGraphics extends QRCodeGraphics {\n    private final SVGGraphics2D graphics;\n\n    public SVGQRCodeGraphics(int width, int height) {\n        super(width, height);\n        graphics = new SVGGraphics2D(width, height);\n    }\n\n    @NotNull\n    @Override\n    protected Graphics2D createGraphics() {\n        return graphics;\n    }\n\n    @Override\n    public void writeImage(@NotNull OutputStream destination, @NotNull String format) {\n        try (OutputStreamWriter writer = new OutputStreamWriter(destination, StandardCharsets.UTF_8)) {\n            writer.write(graphics.getSVGDocument());\n        } catch (IOException e) {\n            throw new RuntimeException(e);\n        }\n    }\n}\n"
  },
  {
    "path": "examples/js/qrcode-example.html",
    "content": "<!doctype html>\n<html class=\"dark\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n    <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n    <link href=\"https://fonts.googleapis.com/css2?family=Inter&display=swap\" rel=\"stylesheet\">\n    <script src=\"https://cdn.tailwindcss.com?plugins=forms\"></script>\n    <script src=\"https://cdn.jsdelivr.net/gh/g0dkar/qrcode-kotlin@main/release/qrcode-kotlin.min.js\"></script>\n    <script>\n      tailwind.config = {\n        theme: {\n          fontFamily: {\n            display: ['Inter', 'system-ui', 'sans-serif'],\n            sans: ['Inter', 'system-ui', 'sans-serif'],\n          },\n        },\n      }\n    </script>\n</head>\n<body class=\"bg-slate-500\">\n<div class=\"container mx-auto p-4\">\n    <div class=\"md:grid md:grid-cols-3 md:gap-6\">\n        <div class=\"mt-5 md:col-span-2 md:mt-0\">\n            <div class=\"shadow sm:overflow-hidden sm:rounded-md\">\n                <div class=\"space-y-6 bg-white px-4 py-5 sm:p-6\">\n                    <div>\n                        <label for=\"qrcodeData\" class=\"block text-sm font-medium text-gray-700\">QRCode Content:</label>\n                        <div class=\"mt-1\">\n                            <textarea id=\"qrcodeData\" rows=\"3\"\n                                      class=\"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm\"\n                                      placeholder=\"Data to Encode into the QR Code\"\n                                      autofocus>https://qrcodekotlin.com</textarea>\n                        </div>\n                        <p class=\"mt-2 text-sm text-gray-500\">You can encode strings (general text), numbers, URLs,\n                            emails, pretty much anything. <span class=\"text-indigo-600\">The more data you encode, the slower it'll be!</span>\n                        </p>\n                    </div>\n\n                    <div>\n                        <label for=\"qrcodeCellSize\" class=\"block text-sm font-medium text-gray-700\">Cell Size:</label>\n                        <div class=\"mt-1\">\n                            <input type=\"number\" min=\"5\" max=\"250\" id=\"qrcodeCellSize\" name=\"qrcodeCellSize\" value=\"25\"\n                                   class=\"mt-1 block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm\"\n                                   placeholder=\"How big each square on the resulting QRCode will be\"/>\n                        </div>\n                        <p class=\"mt-2 text-sm text-gray-500\">How big each square in the QRCode will be, in pixels. Default is 25. The\n                            bigger this is, the larger the resulting QRCode will be. <span class=\"text-indigo-600\">Increasing this should not affect much how long it takes to generate the QRCode ;)</span>\n                        </p>\n                    </div>\n                </div>\n                <div class=\"bg-gray-50 px-4 py-3 text-right sm:px-6\">\n                    <a id=\"downloadBtn\" download=\"qrcode.png\"\n                            class=\"inline-flex justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2\">\n                        <span class=\"pr-2\">\n                            <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\"\n                                 class=\"w-5 h-5\">\n                                <path\n                                    d=\"M10.75 2.75a.75.75 0 00-1.5 0v8.614L6.295 8.235a.75.75 0 10-1.09 1.03l4.25 4.5a.75.75 0 001.09 0l4.25-4.5a.75.75 0 00-1.09-1.03l-2.955 3.129V2.75z\"/>\n                                <path\n                                    d=\"M3.5 12.75a.75.75 0 00-1.5 0v2.5A2.75 2.75 0 004.75 18h10.5A2.75 2.75 0 0018 15.25v-2.5a.75.75 0 00-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5z\"/>\n                            </svg>\n                        </span>\n\n                        Download QRCode\n                    </a>\n                </div>\n            </div>\n        </div>\n\n        <div class=\"md:col-span-1 sm:overflow-hidden\">\n            <div class=\"space-y-6 shadow bg-white px-4 py-5 sm:p-6 sm:rounded-md\">\n                <div class=\"px-4 sm:px-0\">\n                    <h3 class=\"text-lg font-medium leading-6 text-gray-900\">Generated QR Code</h3>\n                    <p class=\"mt-1 text-sm text-gray-600\">This QR Code is being generated via JavaScript, in your\n                        browser.\n                        With the power of Kotlin! Know more about this\n                        <a href=\"https://qrcodekotlin.com\"\n                           class=\"text-indigo-600 hover:text-indigo-900 after:content-['_↗']\" target=\"_blank\">\n                            <span\n                                class=\"underline decoration-indigo-600 decoration-2\">here</span>\n                        </a>\n                        :)</p>\n\n                    <div aria-hidden=\"true\">\n                        <div class=\"py-5\">\n                            <div class=\"border-t border-gray-200\"></div>\n                        </div>\n                    </div>\n\n                    <div class=\"mb-5\">\n                        <img id=\"qrcodeResult\" width=\"100%\" alt=\"QRCode Result\"/>\n                    </div>\n\n                    <div class=\"text-sm text-gray-600\">\n                        <p>Image size: <span id=\"imgSize\">...</span></p>\n                        <p>Generated in: <span id=\"generatedTime\">...</span></p>\n                        <p class=\"pt-1 text-xs\"><span class=\"italic\">Tip: Right-click the QRCode above and \"Save Image As...\"</span>\n                            😉</p>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<script>\n    /*\n  const QRCode = window['qrcode-kotlin'].io.github.g0dkar.qrcode.QRCode\n  const qrcodeData = document.getElementById(\"qrcodeData\")\n  const timeEl = document.getElementById(\"generatedTime\")\n  const imgSizeEl = document.getElementById(\"imgSize\")\n  const imgEl = document.getElementById(\"qrcodeResult\")\n  const sizeEl = document.getElementById(\"qrcodeCellSize\")\n  const downloadBtn = document.getElementById(\"downloadBtn\")\n\n  const doRender = (data) => {\n    const size = sizeEl.value\n\n    const start = Date.now()\n    const result = new QRCode(data).render(size)\n    const finish = Date.now()\n\n    const dataURL = result.toDataURL()\n    downloadBtn.href = dataURL\n    imgEl.src = dataURL\n    timeEl.textContent = `${finish - start}ms`\n    imgSizeEl.textContent = `${result.width}x${result.height}, each square is ${size}x${size}`\n  }\n\n  qrcodeData.onkeyup = (evt) => {\n    const data = evt.target.value\n    const prev = evt.target.$prev\n\n    if (data !== prev) {\n      if (evt.target.$timer) {\n        clearTimeout(evt.target.$timer)\n      }\n\n      evt.target.$prev = data\n\n      evt.target.$timer = setTimeout(() => {\n        doRender(data)\n      }, 500)\n    }\n  }\n\n  sizeEl.onchange = () => {\n    doRender(qrcodeData.value)\n  }\n\n  doRender(qrcodeData.value)\n     */\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "examples/js/qrcode-kotlin.js",
    "content": "//region block: polyfills\nif (typeof ArrayBuffer.isView === 'undefined') {\n  ArrayBuffer.isView = function (a) {\n    return a != null && a.__proto__ != null && a.__proto__.__proto__ === Int8Array.prototype.__proto__;\n  };\n}\nif (typeof Array.prototype.fill === 'undefined') {\n  // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill\n  Object.defineProperty(Array.prototype, 'fill', {value: function (value) {\n    // Steps 1-2.\n    if (this == null) {\n      throw new TypeError('this is null or not defined');\n    }\n    var O = Object(this); // Steps 3-5.\n    var len = O.length >>> 0; // Steps 6-7.\n    var start = arguments[1];\n    var relativeStart = start >> 0; // Step 8.\n    var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); // Steps 9-10.\n    var end = arguments[2];\n    var relativeEnd = end === undefined ? len : end >> 0; // Step 11.\n    var finalValue = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); // Step 12.\n    while (k < finalValue) {\n      O[k] = value;\n      k++;\n    }\n     // Step 13.\n    return O;\n  }});\n}\n[Int8Array, Int16Array, Uint16Array, Int32Array, Float32Array, Float64Array].forEach(function (TypedArray) {\n  if (typeof TypedArray.prototype.fill === 'undefined') {\n    Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill});\n  }\n});\nif (typeof Math.clz32 === 'undefined') {\n  Math.clz32 = function (log, LN2) {\n    return function (x) {\n      var asUint = x >>> 0;\n      if (asUint === 0) {\n        return 32;\n      }\n      return 31 - (log(asUint) / LN2 | 0) | 0; // the \"| 0\" acts like math.floor\n    };\n  }(Math.log, Math.LN2);\n}\nif (typeof Math.imul === 'undefined') {\n  Math.imul = function imul(a, b) {\n    return (a & 4.29490176E9) * (b & 65535) + (a & 65535) * (b | 0) | 0;\n  };\n}\n//endregion\n(function (root, factory) {\n  if (typeof define === 'function' && define.amd)\n    define(['exports'], factory);\n  else if (typeof exports === 'object')\n    factory(module.exports);\n  else\n    root['io.github.g0dkar:qrcode-kotlin'] = factory(typeof this['io.github.g0dkar:qrcode-kotlin'] === 'undefined' ? {} : this['io.github.g0dkar:qrcode-kotlin']);\n}(this, function (_) {\n  'use strict';\n  //region block: imports\n  var clz32 = Math.clz32;\n  var imul = Math.imul;\n  var isView = ArrayBuffer.isView;\n  //endregion\n  //region block: pre-declaration\n  setMetadataFor(CharSequence, 'CharSequence', interfaceMeta);\n  setMetadataFor(Number_0, 'Number', classMeta);\n  setMetadataFor(Unit, 'Unit', objectMeta);\n  setMetadataFor(IntCompanionObject, 'IntCompanionObject', objectMeta);\n  setMetadataFor(Collection, 'Collection', interfaceMeta);\n  setMetadataFor(AbstractCollection, 'AbstractCollection', classMeta, VOID, [Collection]);\n  setMetadataFor(AbstractMutableCollection, 'AbstractMutableCollection', classMeta, AbstractCollection, [AbstractCollection, Collection]);\n  setMetadataFor(Set, 'Set', interfaceMeta, VOID, [Collection]);\n  setMetadataFor(AbstractMutableSet, 'AbstractMutableSet', classMeta, AbstractMutableCollection, [AbstractMutableCollection, Set, Collection]);\n  setMetadataFor(HashSet, 'HashSet', classMeta, AbstractMutableSet, [AbstractMutableSet, Set, Collection], HashSet_init_$Create$);\n  setMetadataFor(Companion, 'Companion', objectMeta);\n  setMetadataFor(Itr, 'Itr', classMeta);\n  setMetadataFor(KeysItr, 'KeysItr', classMeta, Itr);\n  setMetadataFor(EntriesItr, 'EntriesItr', classMeta, Itr);\n  setMetadataFor(Entry, 'Entry', interfaceMeta);\n  setMetadataFor(EntryRef, 'EntryRef', classMeta, VOID, [Entry]);\n  function containsAllEntries(m) {\n    var tmp$ret$0;\n    $l$block_0: {\n      // Inline function 'kotlin.collections.all' call\n      var tmp;\n      if (isInterface(m, Collection)) {\n        tmp = m.l();\n      } else {\n        tmp = false;\n      }\n      if (tmp) {\n        tmp$ret$0 = true;\n        break $l$block_0;\n      }\n      var tmp0_iterator = m.i();\n      while (tmp0_iterator.q1()) {\n        var element = tmp0_iterator.w1();\n        // Inline function 'kotlin.collections.InternalMap.containsAllEntries.<anonymous>' call\n        // Inline function 'kotlin.js.unsafeCast' call\n        // Inline function 'kotlin.js.asDynamic' call\n        var entry = element;\n        var tmp_0;\n        if (!(entry == null) ? isInterface(entry, Entry) : false) {\n          tmp_0 = this.n2(entry);\n        } else {\n          tmp_0 = false;\n        }\n        if (!tmp_0) {\n          tmp$ret$0 = false;\n          break $l$block_0;\n        }\n      }\n      tmp$ret$0 = true;\n    }\n    return tmp$ret$0;\n  }\n  setMetadataFor(InternalMap, 'InternalMap', interfaceMeta);\n  setMetadataFor(InternalHashMap, 'InternalHashMap', classMeta, VOID, [InternalMap], InternalHashMap_init_$Create$);\n  setMetadataFor(LinkedHashSet, 'LinkedHashSet', classMeta, HashSet, [HashSet, Set, Collection], LinkedHashSet_init_$Create$);\n  setMetadataFor(KClass, 'KClass', interfaceMeta);\n  setMetadataFor(KClassImpl, 'KClassImpl', classMeta, VOID, [KClass]);\n  setMetadataFor(NothingKClassImpl, 'NothingKClassImpl', objectMeta, KClassImpl);\n  setMetadataFor(ErrorKClass, 'ErrorKClass', classMeta, VOID, [KClass], ErrorKClass);\n  setMetadataFor(PrimitiveKClassImpl, 'PrimitiveKClassImpl', classMeta, KClassImpl);\n  setMetadataFor(SimpleKClassImpl, 'SimpleKClassImpl', classMeta, KClassImpl);\n  setMetadataFor(PrimitiveClasses, 'PrimitiveClasses', objectMeta);\n  setMetadataFor(Exception, 'Exception', classMeta, Error, VOID, Exception_init_$Create$);\n  setMetadataFor(CharacterCodingException, 'CharacterCodingException', classMeta, Exception, VOID, CharacterCodingException_init_$Create$);\n  setMetadataFor(StringBuilder, 'StringBuilder', classMeta, VOID, [CharSequence], StringBuilder_init_$Create$_0);\n  setMetadataFor(Companion_0, 'Companion', objectMeta);\n  setMetadataFor(Regex, 'Regex', classMeta);\n  setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta);\n  setMetadataFor(Companion_1, 'Companion', objectMeta);\n  setMetadataFor(Char, 'Char', classMeta);\n  setMetadataFor(List, 'List', interfaceMeta, VOID, [Collection]);\n  setMetadataFor(Map_0, 'Map', interfaceMeta);\n  setMetadataFor(Companion_2, 'Companion', objectMeta);\n  setMetadataFor(Enum, 'Enum', classMeta);\n  setMetadataFor(Companion_3, 'Companion', objectMeta);\n  setMetadataFor(Long, 'Long', classMeta, Number_0);\n  setMetadataFor(Digit, 'Digit', objectMeta);\n  setMetadataFor(RuntimeException, 'RuntimeException', classMeta, Exception, VOID, RuntimeException_init_$Create$);\n  setMetadataFor(IllegalArgumentException, 'IllegalArgumentException', classMeta, RuntimeException, VOID, IllegalArgumentException_init_$Create$);\n  setMetadataFor(IndexOutOfBoundsException, 'IndexOutOfBoundsException', classMeta, RuntimeException, VOID, IndexOutOfBoundsException_init_$Create$);\n  setMetadataFor(IllegalStateException, 'IllegalStateException', classMeta, RuntimeException, VOID, IllegalStateException_init_$Create$);\n  setMetadataFor(UnsupportedOperationException, 'UnsupportedOperationException', classMeta, RuntimeException, VOID, UnsupportedOperationException_init_$Create$);\n  setMetadataFor(NoSuchElementException, 'NoSuchElementException', classMeta, RuntimeException, VOID, NoSuchElementException_init_$Create$);\n  setMetadataFor(Error_0, 'Error', classMeta, Error, VOID, Error_init_$Create$);\n  setMetadataFor(NumberFormatException, 'NumberFormatException', classMeta, IllegalArgumentException, VOID, NumberFormatException_init_$Create$);\n  setMetadataFor(ConcurrentModificationException, 'ConcurrentModificationException', classMeta, RuntimeException, VOID, ConcurrentModificationException_init_$Create$);\n  setMetadataFor(NullPointerException, 'NullPointerException', classMeta, RuntimeException, VOID, NullPointerException_init_$Create$);\n  setMetadataFor(NoWhenBranchMatchedException, 'NoWhenBranchMatchedException', classMeta, RuntimeException, VOID, NoWhenBranchMatchedException_init_$Create$);\n  setMetadataFor(ClassCastException, 'ClassCastException', classMeta, RuntimeException, VOID, ClassCastException_init_$Create$);\n  setMetadataFor(Companion_4, 'Companion', objectMeta);\n  setMetadataFor(Companion_5, 'Companion', objectMeta);\n  setMetadataFor(EmptyIterator, 'EmptyIterator', objectMeta);\n  setMetadataFor(IntIterator, 'IntIterator', classMeta);\n  setMetadataFor(EmptySet, 'EmptySet', objectMeta, VOID, [Set]);\n  setMetadataFor(Companion_6, 'Companion', objectMeta);\n  setMetadataFor(IntProgression, 'IntProgression', classMeta);\n  function isEmpty() {\n    return compareTo_0(this.m4(), this.l4()) > 0;\n  }\n  setMetadataFor(ClosedRange, 'ClosedRange', interfaceMeta);\n  setMetadataFor(IntRange, 'IntRange', classMeta, IntProgression, [IntProgression, ClosedRange]);\n  setMetadataFor(IntProgressionIterator, 'IntProgressionIterator', classMeta, IntIterator);\n  setMetadataFor(Companion_7, 'Companion', objectMeta);\n  function isEmpty_0() {\n    return !this.r4(this.m4(), this.l4());\n  }\n  setMetadataFor(ClosedFloatingPointRange, 'ClosedFloatingPointRange', interfaceMeta, VOID, [ClosedRange]);\n  setMetadataFor(Companion_8, 'Companion', objectMeta);\n  setMetadataFor(QRCode, 'QRCode', classMeta);\n  setMetadataFor(QRCodeShapesEnum, 'QRCodeShapesEnum', classMeta, Enum);\n  setMetadataFor(QRCodeBuilder, 'QRCodeBuilder', classMeta);\n  setMetadataFor(Colors, 'Colors', objectMeta);\n  function colorFn(square, qrCode, qrCodeGraphics) {\n    var tmp;\n    if (square.squareInfo.type.d5_1 === 4) {\n      tmp = this.margin(square.row, square.col, qrCode, qrCodeGraphics);\n    } else {\n      tmp = square.dark === true ? this.fg(square.row, square.col, qrCode, qrCodeGraphics) : this.bg(square.row, square.col, qrCode, qrCodeGraphics);\n    }\n    return tmp;\n  }\n  function beforeRender(qrCode, qrCodeGraphics) {\n  }\n  function margin(row, col, qrCode, qrCodeGraphics) {\n    return this.bg(row, col, qrCode, qrCodeGraphics);\n  }\n  setMetadataFor(QRCodeColorFunction, 'QRCodeColorFunction', interfaceMeta);\n  setMetadataFor(DefaultColorFunction, 'DefaultColorFunction', classMeta, VOID, [QRCodeColorFunction], DefaultColorFunction);\n  setMetadataFor(LinearGradientColorFunction, 'LinearGradientColorFunction', classMeta, VOID, [QRCodeColorFunction]);\n  setMetadataFor(BitBuffer, 'BitBuffer', classMeta, VOID, VOID, BitBuffer);\n  setMetadataFor(Polynomial, 'Polynomial', classMeta);\n  setMetadataFor(QRCodeSetup, 'QRCodeSetup', objectMeta);\n  setMetadataFor(QRCodeSquare, 'QRCodeSquare', classMeta);\n  setMetadataFor(Companion_9, 'Companion', objectMeta);\n  setMetadataFor(QRCodeSquareInfo, 'QRCodeSquareInfo', classMeta);\n  setMetadataFor(QRCodeSquareType, 'QRCodeSquareType', classMeta, Enum);\n  setMetadataFor(QRCodeRegion, 'QRCodeRegion', classMeta, Enum);\n  setMetadataFor(QRData, 'QRData', classMeta);\n  setMetadataFor(QR8BitByte, 'QR8BitByte', classMeta, QRData);\n  setMetadataFor(QRAlphaNum, 'QRAlphaNum', classMeta, QRData);\n  setMetadataFor(QRNumber, 'QRNumber', classMeta, QRData);\n  setMetadataFor(QRMath, 'QRMath', objectMeta);\n  setMetadataFor(QRUtil, 'QRUtil', objectMeta);\n  setMetadataFor(Companion_10, 'Companion', objectMeta);\n  setMetadataFor(RSBlock, 'RSBlock', classMeta);\n  setMetadataFor(ErrorCorrectionLevel, 'ErrorCorrectionLevel', classMeta, Enum);\n  setMetadataFor(MaskPattern, 'MaskPattern', classMeta, Enum);\n  setMetadataFor(QRCodeDataType, 'QRCodeDataType', classMeta, Enum);\n  setMetadataFor(Companion_11, 'Companion', objectMeta);\n  setMetadataFor(QRCodeProcessor, 'QRCodeProcessor', classMeta);\n  setMetadataFor(QRCodeGraphicsFactory, 'QRCodeGraphicsFactory', classMeta, VOID, VOID, QRCodeGraphicsFactory);\n  setMetadataFor(Companion_12, 'Companion', objectMeta);\n  function beforeRender_0(qrCode, qrCodeGraphics) {\n  }\n  setMetadataFor(QRCodeShapeFunction, 'QRCodeShapeFunction', interfaceMeta);\n  setMetadataFor(DefaultShapeFunction, 'DefaultShapeFunction', classMeta, VOID, [QRCodeShapeFunction], DefaultShapeFunction);\n  setMetadataFor(RoundSquaresShapeFunction, 'RoundSquaresShapeFunction', classMeta, DefaultShapeFunction, VOID, RoundSquaresShapeFunction);\n  setMetadataFor(CircleShapeFunction, 'CircleShapeFunction', classMeta, RoundSquaresShapeFunction, VOID, CircleShapeFunction);\n  setMetadataFor(Companion_13, 'Companion', objectMeta);\n  setMetadataFor(Companion_14, 'Companion', objectMeta);\n  setMetadataFor(QRCodeGraphics, 'QRCodeGraphics', classMeta);\n  //endregion\n  function CharSequence() {\n  }\n  function Number_0() {\n  }\n  function Unit() {\n  }\n  protoOf(Unit).toString = function () {\n    return 'kotlin.Unit';\n  };\n  var Unit_instance;\n  function Unit_getInstance() {\n    return Unit_instance;\n  }\n  function IntCompanionObject() {\n    this.MIN_VALUE = -2147483648;\n    this.MAX_VALUE = 2147483647;\n    this.SIZE_BYTES = 4;\n    this.SIZE_BITS = 32;\n  }\n  protoOf(IntCompanionObject).c = function () {\n    return this.MIN_VALUE;\n  };\n  protoOf(IntCompanionObject).d = function () {\n    return this.MAX_VALUE;\n  };\n  protoOf(IntCompanionObject).e = function () {\n    return this.SIZE_BYTES;\n  };\n  protoOf(IntCompanionObject).f = function () {\n    return this.SIZE_BITS;\n  };\n  var IntCompanionObject_instance;\n  function IntCompanionObject_getInstance() {\n    return IntCompanionObject_instance;\n  }\n  function isNaN_0(_this__u8e3s4) {\n    return !(_this__u8e3s4 === _this__u8e3s4);\n  }\n  function takeHighestOneBit(_this__u8e3s4) {\n    var tmp;\n    if (_this__u8e3s4 === 0) {\n      tmp = 0;\n    } else {\n      var tmp_0 = 32 - 1 | 0;\n      // Inline function 'kotlin.countLeadingZeroBits' call\n      tmp = 1 << (tmp_0 - clz32(_this__u8e3s4) | 0);\n    }\n    return tmp;\n  }\n  function collectionToArray(collection) {\n    return collectionToArrayCommonImpl(collection);\n  }\n  function setOf(element) {\n    return hashSetOf([element]);\n  }\n  function mapCapacity(expectedSize) {\n    return expectedSize;\n  }\n  function AbstractMutableCollection() {\n    AbstractCollection.call(this);\n  }\n  protoOf(AbstractMutableCollection).toJSON = function () {\n    return this.toArray();\n  };\n  function AbstractMutableSet() {\n    AbstractMutableCollection.call(this);\n  }\n  protoOf(AbstractMutableSet).equals = function (other) {\n    if (other === this)\n      return true;\n    if (!(!(other == null) ? isInterface(other, Set) : false))\n      return false;\n    return Companion_instance_5.m(this, other);\n  };\n  protoOf(AbstractMutableSet).hashCode = function () {\n    return Companion_instance_5.n(this);\n  };\n  function arrayOfUninitializedElements(capacity) {\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.contracts.contract' call\n    if (!(capacity >= 0)) {\n      // Inline function 'kotlin.collections.arrayOfUninitializedElements.<anonymous>' call\n      var message = 'capacity must be non-negative.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.arrayOfNulls' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return fillArrayVal(Array(capacity), null);\n  }\n  function resetRange(_this__u8e3s4, fromIndex, toIndex) {\n    // Inline function 'kotlin.js.nativeFill' call\n    // Inline function 'kotlin.js.asDynamic' call\n    _this__u8e3s4.fill(null, fromIndex, toIndex);\n  }\n  function copyOfUninitializedElements(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return copyOf_1(_this__u8e3s4, newSize);\n  }\n  function HashSet_init_$Init$(map, $this) {\n    AbstractMutableSet.call($this);\n    HashSet.call($this);\n    $this.o_1 = map;\n    return $this;\n  }\n  function HashSet_init_$Init$_0($this) {\n    HashSet_init_$Init$(InternalHashMap_init_$Create$(), $this);\n    return $this;\n  }\n  function HashSet_init_$Create$() {\n    return HashSet_init_$Init$_0(objectCreate(protoOf(HashSet)));\n  }\n  function HashSet_init_$Init$_1(initialCapacity, loadFactor, $this) {\n    HashSet_init_$Init$(InternalHashMap_init_$Create$_0(initialCapacity, loadFactor), $this);\n    return $this;\n  }\n  function HashSet_init_$Init$_2(initialCapacity, $this) {\n    HashSet_init_$Init$_1(initialCapacity, 1.0, $this);\n    return $this;\n  }\n  function HashSet_init_$Create$_0(initialCapacity) {\n    return HashSet_init_$Init$_2(initialCapacity, objectCreate(protoOf(HashSet)));\n  }\n  protoOf(HashSet).g = function (element) {\n    return this.o_1.p(element, true) == null;\n  };\n  protoOf(HashSet).j = function (element) {\n    return this.o_1.q(element);\n  };\n  protoOf(HashSet).l = function () {\n    return this.o_1.h() === 0;\n  };\n  protoOf(HashSet).i = function () {\n    return this.o_1.r();\n  };\n  protoOf(HashSet).h = function () {\n    return this.o_1.h();\n  };\n  function HashSet() {\n  }\n  function computeHashSize($this, capacity) {\n    return takeHighestOneBit(imul(coerceAtLeast(capacity, 1), 3));\n  }\n  function computeShift($this, hashSize) {\n    // Inline function 'kotlin.countLeadingZeroBits' call\n    return clz32(hashSize) + 1 | 0;\n  }\n  function InternalHashMap_init_$Init$($this) {\n    InternalHashMap_init_$Init$_0(8, $this);\n    return $this;\n  }\n  function InternalHashMap_init_$Create$() {\n    return InternalHashMap_init_$Init$(objectCreate(protoOf(InternalHashMap)));\n  }\n  function InternalHashMap_init_$Init$_0(initialCapacity, $this) {\n    InternalHashMap.call($this, arrayOfUninitializedElements(initialCapacity), null, new Int32Array(initialCapacity), new Int32Array(computeHashSize(Companion_instance, initialCapacity)), 2, 0);\n    return $this;\n  }\n  function InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, $this) {\n    InternalHashMap_init_$Init$_0(initialCapacity, $this);\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.contracts.contract' call\n    if (!(loadFactor > 0.0)) {\n      // Inline function 'kotlin.collections.InternalHashMap.<init>.<anonymous>' call\n      var message = 'Non-positive load factor: ' + loadFactor;\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return $this;\n  }\n  function InternalHashMap_init_$Create$_0(initialCapacity, loadFactor) {\n    return InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, objectCreate(protoOf(InternalHashMap)));\n  }\n  function _get_capacity__a9k9f3($this) {\n    return $this.s_1.length;\n  }\n  function _get_hashSize__tftcho($this) {\n    return $this.v_1.length;\n  }\n  function registerModification($this) {\n    $this.z_1 = $this.z_1 + 1 | 0;\n  }\n  function ensureExtraCapacity($this, n) {\n    if (shouldCompact($this, n)) {\n      rehash($this, _get_hashSize__tftcho($this));\n    } else {\n      ensureCapacity($this, $this.x_1 + n | 0);\n    }\n  }\n  function shouldCompact($this, extraCapacity) {\n    var spareCapacity = _get_capacity__a9k9f3($this) - $this.x_1 | 0;\n    var gaps = $this.x_1 - $this.h() | 0;\n    return (spareCapacity < extraCapacity ? (gaps + spareCapacity | 0) >= extraCapacity : false) ? gaps >= (_get_capacity__a9k9f3($this) / 4 | 0) : false;\n  }\n  function ensureCapacity($this, minCapacity) {\n    if (minCapacity < 0)\n      throw RuntimeException_init_$Create$_0('too many elements');\n    if (minCapacity > _get_capacity__a9k9f3($this)) {\n      var newSize = Companion_instance_4.d1(_get_capacity__a9k9f3($this), minCapacity);\n      $this.s_1 = copyOfUninitializedElements($this.s_1, newSize);\n      var tmp = $this;\n      var tmp0_safe_receiver = $this.t_1;\n      tmp.t_1 = tmp0_safe_receiver == null ? null : copyOfUninitializedElements(tmp0_safe_receiver, newSize);\n      $this.u_1 = copyOf($this.u_1, newSize);\n      var newHashSize = computeHashSize(Companion_instance, newSize);\n      if (newHashSize > _get_hashSize__tftcho($this)) {\n        rehash($this, newHashSize);\n      }\n    }\n  }\n  function allocateValuesArray($this) {\n    var curValuesArray = $this.t_1;\n    if (!(curValuesArray == null))\n      return curValuesArray;\n    var newValuesArray = arrayOfUninitializedElements(_get_capacity__a9k9f3($this));\n    $this.t_1 = newValuesArray;\n    return newValuesArray;\n  }\n  function hash($this, key) {\n    return key == null ? 0 : imul(hashCode(key), -1640531527) >>> $this.y_1 | 0;\n  }\n  function compact($this) {\n    var i = 0;\n    var j = 0;\n    var valuesArray = $this.t_1;\n    while (i < $this.x_1) {\n      if ($this.u_1[i] >= 0) {\n        $this.s_1[j] = $this.s_1[i];\n        if (!(valuesArray == null)) {\n          valuesArray[j] = valuesArray[i];\n        }\n        j = j + 1 | 0;\n      }\n      i = i + 1 | 0;\n    }\n    resetRange($this.s_1, j, $this.x_1);\n    if (valuesArray == null)\n      null;\n    else {\n      resetRange(valuesArray, j, $this.x_1);\n    }\n    $this.x_1 = j;\n  }\n  function rehash($this, newHashSize) {\n    registerModification($this);\n    if ($this.x_1 > $this.a1_1) {\n      compact($this);\n    }\n    if (!(newHashSize === _get_hashSize__tftcho($this))) {\n      $this.v_1 = new Int32Array(newHashSize);\n      $this.y_1 = computeShift(Companion_instance, newHashSize);\n    } else {\n      fill($this.v_1, 0, 0, _get_hashSize__tftcho($this));\n    }\n    var i = 0;\n    while (i < $this.x_1) {\n      var tmp0 = i;\n      i = tmp0 + 1 | 0;\n      if (!putRehash($this, tmp0)) {\n        throw IllegalStateException_init_$Create$_0('This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?');\n      }\n    }\n  }\n  function putRehash($this, i) {\n    var hash_0 = hash($this, $this.s_1[i]);\n    var probesLeft = $this.w_1;\n    while (true) {\n      var index = $this.v_1[hash_0];\n      if (index === 0) {\n        $this.v_1[hash_0] = i + 1 | 0;\n        $this.u_1[i] = hash_0;\n        return true;\n      }\n      probesLeft = probesLeft - 1 | 0;\n      if (probesLeft < 0)\n        return false;\n      var tmp0 = hash_0;\n      hash_0 = tmp0 - 1 | 0;\n      if (tmp0 === 0)\n        hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n    }\n  }\n  function findKey($this, key) {\n    var hash_0 = hash($this, key);\n    var probesLeft = $this.w_1;\n    while (true) {\n      var index = $this.v_1[hash_0];\n      if (index === 0)\n        return -1;\n      if (index > 0 ? equals($this.s_1[index - 1 | 0], key) : false)\n        return index - 1 | 0;\n      probesLeft = probesLeft - 1 | 0;\n      if (probesLeft < 0)\n        return -1;\n      var tmp0 = hash_0;\n      hash_0 = tmp0 - 1 | 0;\n      if (tmp0 === 0)\n        hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n    }\n  }\n  function addKey($this, key) {\n    $this.e1();\n    retry: while (true) {\n      var hash_0 = hash($this, key);\n      var tentativeMaxProbeDistance = coerceAtMost(imul($this.w_1, 2), _get_hashSize__tftcho($this) / 2 | 0);\n      var probeDistance = 0;\n      while (true) {\n        var index = $this.v_1[hash_0];\n        if (index <= 0) {\n          if ($this.x_1 >= _get_capacity__a9k9f3($this)) {\n            ensureExtraCapacity($this, 1);\n            continue retry;\n          }\n          var tmp1 = $this.x_1;\n          $this.x_1 = tmp1 + 1 | 0;\n          var putIndex = tmp1;\n          $this.s_1[putIndex] = key;\n          $this.u_1[putIndex] = hash_0;\n          $this.v_1[hash_0] = putIndex + 1 | 0;\n          $this.a1_1 = $this.a1_1 + 1 | 0;\n          registerModification($this);\n          if (probeDistance > $this.w_1)\n            $this.w_1 = probeDistance;\n          return putIndex;\n        }\n        if (equals($this.s_1[index - 1 | 0], key)) {\n          return -index | 0;\n        }\n        probeDistance = probeDistance + 1 | 0;\n        if (probeDistance > tentativeMaxProbeDistance) {\n          rehash($this, imul(_get_hashSize__tftcho($this), 2));\n          continue retry;\n        }\n        var tmp4 = hash_0;\n        hash_0 = tmp4 - 1 | 0;\n        if (tmp4 === 0)\n          hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n      }\n    }\n  }\n  function contentEquals($this, other) {\n    return $this.a1_1 === other.h() ? $this.g1(other.f1()) : false;\n  }\n  function Companion() {\n    this.h1_1 = -1640531527;\n    this.i1_1 = 8;\n    this.j1_1 = 2;\n    this.k1_1 = -1;\n  }\n  var Companion_instance;\n  function Companion_getInstance() {\n    return Companion_instance;\n  }\n  function Itr(map) {\n    this.l1_1 = map;\n    this.m1_1 = 0;\n    this.n1_1 = -1;\n    this.o1_1 = this.l1_1.z_1;\n    this.p1();\n  }\n  protoOf(Itr).p1 = function () {\n    while (this.m1_1 < this.l1_1.x_1 ? this.l1_1.u_1[this.m1_1] < 0 : false) {\n      this.m1_1 = this.m1_1 + 1 | 0;\n    }\n  };\n  protoOf(Itr).q1 = function () {\n    return this.m1_1 < this.l1_1.x_1;\n  };\n  protoOf(Itr).r1 = function () {\n    if (!(this.l1_1.z_1 === this.o1_1))\n      throw ConcurrentModificationException_init_$Create$();\n  };\n  function KeysItr(map) {\n    Itr.call(this, map);\n  }\n  protoOf(KeysItr).w1 = function () {\n    this.r1();\n    if (this.m1_1 >= this.l1_1.x_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var tmp1 = this.m1_1;\n    this.m1_1 = tmp1 + 1 | 0;\n    tmp.n1_1 = tmp1;\n    var result = this.l1_1.s_1[this.n1_1];\n    this.p1();\n    return result;\n  };\n  function EntriesItr(map) {\n    Itr.call(this, map);\n  }\n  protoOf(EntriesItr).w1 = function () {\n    this.r1();\n    if (this.m1_1 >= this.l1_1.x_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var tmp1 = this.m1_1;\n    this.m1_1 = tmp1 + 1 | 0;\n    tmp.n1_1 = tmp1;\n    var result = new EntryRef(this.l1_1, this.n1_1);\n    this.p1();\n    return result;\n  };\n  protoOf(EntriesItr).b2 = function () {\n    if (this.m1_1 >= this.l1_1.x_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var tmp1 = this.m1_1;\n    this.m1_1 = tmp1 + 1 | 0;\n    tmp.n1_1 = tmp1;\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver = this.l1_1.s_1[this.n1_1];\n    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n    var tmp_0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver_0 = ensureNotNull(this.l1_1.t_1)[this.n1_1];\n    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n    var result = tmp_0 ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n    this.p1();\n    return result;\n  };\n  protoOf(EntriesItr).c2 = function (sb) {\n    if (this.m1_1 >= this.l1_1.x_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var tmp1 = this.m1_1;\n    this.m1_1 = tmp1 + 1 | 0;\n    tmp.n1_1 = tmp1;\n    var key = this.l1_1.s_1[this.n1_1];\n    if (equals(key, this.l1_1)) {\n      sb.f2('(this Map)');\n    } else {\n      sb.e2(key);\n    }\n    sb.g2(_Char___init__impl__6a9atx(61));\n    var value = ensureNotNull(this.l1_1.t_1)[this.n1_1];\n    if (equals(value, this.l1_1)) {\n      sb.f2('(this Map)');\n    } else {\n      sb.e2(value);\n    }\n    this.p1();\n  };\n  function EntryRef(map, index) {\n    this.h2_1 = map;\n    this.i2_1 = index;\n  }\n  protoOf(EntryRef).j2 = function () {\n    return this.h2_1.s_1[this.i2_1];\n  };\n  protoOf(EntryRef).k2 = function () {\n    return ensureNotNull(this.h2_1.t_1)[this.i2_1];\n  };\n  protoOf(EntryRef).equals = function (other) {\n    var tmp;\n    var tmp_0;\n    if (!(other == null) ? isInterface(other, Entry) : false) {\n      tmp_0 = equals(other.j2(), this.j2());\n    } else {\n      tmp_0 = false;\n    }\n    if (tmp_0) {\n      tmp = equals(other.k2(), this.k2());\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(EntryRef).hashCode = function () {\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver = this.j2();\n    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n    var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver_0 = this.k2();\n    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n    return tmp ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n  };\n  protoOf(EntryRef).toString = function () {\n    return '' + this.j2() + '=' + this.k2();\n  };\n  function InternalHashMap(keysArray, valuesArray, presenceArray, hashArray, maxProbeDistance, length) {\n    this.s_1 = keysArray;\n    this.t_1 = valuesArray;\n    this.u_1 = presenceArray;\n    this.v_1 = hashArray;\n    this.w_1 = maxProbeDistance;\n    this.x_1 = length;\n    this.y_1 = computeShift(Companion_instance, _get_hashSize__tftcho(this));\n    this.z_1 = 0;\n    this.a1_1 = 0;\n    this.b1_1 = false;\n  }\n  protoOf(InternalHashMap).h = function () {\n    return this.a1_1;\n  };\n  protoOf(InternalHashMap).q = function (key) {\n    return findKey(this, key) >= 0;\n  };\n  protoOf(InternalHashMap).p = function (key, value) {\n    var index = addKey(this, key);\n    var valuesArray = allocateValuesArray(this);\n    if (index < 0) {\n      var oldValue = valuesArray[(-index | 0) - 1 | 0];\n      valuesArray[(-index | 0) - 1 | 0] = value;\n      return oldValue;\n    } else {\n      valuesArray[index] = value;\n      return null;\n    }\n  };\n  protoOf(InternalHashMap).equals = function (other) {\n    var tmp;\n    if (other === this) {\n      tmp = true;\n    } else {\n      var tmp_0;\n      if (!(other == null) ? isInterface(other, Map_0) : false) {\n        tmp_0 = contentEquals(this, other);\n      } else {\n        tmp_0 = false;\n      }\n      tmp = tmp_0;\n    }\n    return tmp;\n  };\n  protoOf(InternalHashMap).hashCode = function () {\n    var result = 0;\n    var it = this.l2();\n    while (it.q1()) {\n      result = result + it.b2() | 0;\n    }\n    return result;\n  };\n  protoOf(InternalHashMap).toString = function () {\n    var sb = StringBuilder_init_$Create$(2 + imul(this.a1_1, 3) | 0);\n    sb.f2('{');\n    var i = 0;\n    var it = this.l2();\n    while (it.q1()) {\n      if (i > 0) {\n        sb.f2(', ');\n      }\n      it.c2(sb);\n      i = i + 1 | 0;\n    }\n    sb.f2('}');\n    return sb.toString();\n  };\n  protoOf(InternalHashMap).e1 = function () {\n    if (this.b1_1)\n      throw UnsupportedOperationException_init_$Create$();\n  };\n  protoOf(InternalHashMap).m2 = function (entry) {\n    var index = findKey(this, entry.j2());\n    if (index < 0)\n      return false;\n    return equals(ensureNotNull(this.t_1)[index], entry.k2());\n  };\n  protoOf(InternalHashMap).n2 = function (entry) {\n    return this.m2(isInterface(entry, Entry) ? entry : THROW_CCE());\n  };\n  protoOf(InternalHashMap).r = function () {\n    return new KeysItr(this);\n  };\n  protoOf(InternalHashMap).l2 = function () {\n    return new EntriesItr(this);\n  };\n  function InternalMap() {\n  }\n  function LinkedHashSet_init_$Init$($this) {\n    HashSet_init_$Init$_0($this);\n    LinkedHashSet.call($this);\n    return $this;\n  }\n  function LinkedHashSet_init_$Create$() {\n    return LinkedHashSet_init_$Init$(objectCreate(protoOf(LinkedHashSet)));\n  }\n  function LinkedHashSet_init_$Init$_0(initialCapacity, loadFactor, $this) {\n    HashSet_init_$Init$_1(initialCapacity, loadFactor, $this);\n    LinkedHashSet.call($this);\n    return $this;\n  }\n  function LinkedHashSet_init_$Init$_1(initialCapacity, $this) {\n    LinkedHashSet_init_$Init$_0(initialCapacity, 1.0, $this);\n    return $this;\n  }\n  function LinkedHashSet_init_$Create$_0(initialCapacity) {\n    return LinkedHashSet_init_$Init$_1(initialCapacity, objectCreate(protoOf(LinkedHashSet)));\n  }\n  function LinkedHashSet() {\n  }\n  function roundToInt(_this__u8e3s4) {\n    var tmp;\n    if (isNaN_0(_this__u8e3s4)) {\n      throw IllegalArgumentException_init_$Create$_0('Cannot round NaN value.');\n    } else if (_this__u8e3s4 > IntCompanionObject_instance.MAX_VALUE) {\n      tmp = IntCompanionObject_instance.MAX_VALUE;\n    } else if (_this__u8e3s4 < IntCompanionObject_instance.MIN_VALUE) {\n      tmp = IntCompanionObject_instance.MIN_VALUE;\n    } else {\n      tmp = numberToInt(Math.round(_this__u8e3s4));\n    }\n    return tmp;\n  }\n  function KClass() {\n  }\n  function KClassImpl(jClass) {\n    this.p2_1 = jClass;\n  }\n  protoOf(KClassImpl).q2 = function () {\n    return this.p2_1;\n  };\n  protoOf(KClassImpl).equals = function (other) {\n    var tmp;\n    if (other instanceof NothingKClassImpl) {\n      tmp = false;\n    } else {\n      if (other instanceof ErrorKClass) {\n        tmp = false;\n      } else {\n        if (other instanceof KClassImpl) {\n          tmp = equals(this.q2(), other.q2());\n        } else {\n          tmp = false;\n        }\n      }\n    }\n    return tmp;\n  };\n  protoOf(KClassImpl).hashCode = function () {\n    var tmp0_safe_receiver = this.o2();\n    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);\n    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n  };\n  protoOf(KClassImpl).toString = function () {\n    return 'class ' + this.o2();\n  };\n  function NothingKClassImpl() {\n    NothingKClassImpl_instance = this;\n    KClassImpl.call(this, Object);\n    this.s2_1 = 'Nothing';\n  }\n  protoOf(NothingKClassImpl).o2 = function () {\n    return this.s2_1;\n  };\n  protoOf(NothingKClassImpl).q2 = function () {\n    throw UnsupportedOperationException_init_$Create$_0(\"There's no native JS class for Nothing type\");\n  };\n  protoOf(NothingKClassImpl).equals = function (other) {\n    return other === this;\n  };\n  protoOf(NothingKClassImpl).hashCode = function () {\n    return 0;\n  };\n  var NothingKClassImpl_instance;\n  function NothingKClassImpl_getInstance() {\n    if (NothingKClassImpl_instance == null)\n      new NothingKClassImpl();\n    return NothingKClassImpl_instance;\n  }\n  function ErrorKClass() {\n  }\n  protoOf(ErrorKClass).o2 = function () {\n    var message = 'Unknown simpleName for ErrorKClass';\n    throw IllegalStateException_init_$Create$_0(toString_1(message));\n  };\n  protoOf(ErrorKClass).equals = function (other) {\n    return other === this;\n  };\n  protoOf(ErrorKClass).hashCode = function () {\n    return 0;\n  };\n  function PrimitiveKClassImpl(jClass, givenSimpleName, isInstanceFunction) {\n    KClassImpl.call(this, jClass);\n    this.u2_1 = givenSimpleName;\n    this.v2_1 = isInstanceFunction;\n  }\n  protoOf(PrimitiveKClassImpl).equals = function (other) {\n    if (!(other instanceof PrimitiveKClassImpl))\n      return false;\n    return protoOf(KClassImpl).equals.call(this, other) ? this.u2_1 === other.u2_1 : false;\n  };\n  protoOf(PrimitiveKClassImpl).o2 = function () {\n    return this.u2_1;\n  };\n  function SimpleKClassImpl(jClass) {\n    KClassImpl.call(this, jClass);\n    var tmp = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp0_safe_receiver = jClass.$metadata$;\n    tmp.x2_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.simpleName;\n  }\n  protoOf(SimpleKClassImpl).o2 = function () {\n    return this.x2_1;\n  };\n  function get_functionClasses() {\n    _init_properties_primitives_kt__3fums4();\n    return functionClasses;\n  }\n  var functionClasses;\n  function PrimitiveClasses$anyClass$lambda(it) {\n    return !(it == null);\n  }\n  function PrimitiveClasses$numberClass$lambda(it) {\n    return isNumber(it);\n  }\n  function PrimitiveClasses$booleanClass$lambda(it) {\n    return !(it == null) ? typeof it === 'boolean' : false;\n  }\n  function PrimitiveClasses$byteClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$shortClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$intClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$floatClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$doubleClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$arrayClass$lambda(it) {\n    return !(it == null) ? isArray(it) : false;\n  }\n  function PrimitiveClasses$stringClass$lambda(it) {\n    return !(it == null) ? typeof it === 'string' : false;\n  }\n  function PrimitiveClasses$throwableClass$lambda(it) {\n    return it instanceof Error;\n  }\n  function PrimitiveClasses$booleanArrayClass$lambda(it) {\n    return !(it == null) ? isBooleanArray(it) : false;\n  }\n  function PrimitiveClasses$charArrayClass$lambda(it) {\n    return !(it == null) ? isCharArray(it) : false;\n  }\n  function PrimitiveClasses$byteArrayClass$lambda(it) {\n    return !(it == null) ? isByteArray(it) : false;\n  }\n  function PrimitiveClasses$shortArrayClass$lambda(it) {\n    return !(it == null) ? isShortArray(it) : false;\n  }\n  function PrimitiveClasses$intArrayClass$lambda(it) {\n    return !(it == null) ? isIntArray(it) : false;\n  }\n  function PrimitiveClasses$longArrayClass$lambda(it) {\n    return !(it == null) ? isLongArray(it) : false;\n  }\n  function PrimitiveClasses$floatArrayClass$lambda(it) {\n    return !(it == null) ? isFloatArray(it) : false;\n  }\n  function PrimitiveClasses$doubleArrayClass$lambda(it) {\n    return !(it == null) ? isDoubleArray(it) : false;\n  }\n  function PrimitiveClasses$functionClass$lambda($arity) {\n    return function (it) {\n      var tmp;\n      if (typeof it === 'function') {\n        // Inline function 'kotlin.js.asDynamic' call\n        tmp = it.length === $arity;\n      } else {\n        tmp = false;\n      }\n      return tmp;\n    };\n  }\n  function PrimitiveClasses() {\n    PrimitiveClasses_instance = this;\n    var tmp = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_0 = Object;\n    tmp.anyClass = new PrimitiveKClassImpl(tmp_0, 'Any', PrimitiveClasses$anyClass$lambda);\n    var tmp_1 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_2 = Number;\n    tmp_1.numberClass = new PrimitiveKClassImpl(tmp_2, 'Number', PrimitiveClasses$numberClass$lambda);\n    this.nothingClass = NothingKClassImpl_getInstance();\n    var tmp_3 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_4 = Boolean;\n    tmp_3.booleanClass = new PrimitiveKClassImpl(tmp_4, 'Boolean', PrimitiveClasses$booleanClass$lambda);\n    var tmp_5 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_6 = Number;\n    tmp_5.byteClass = new PrimitiveKClassImpl(tmp_6, 'Byte', PrimitiveClasses$byteClass$lambda);\n    var tmp_7 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_8 = Number;\n    tmp_7.shortClass = new PrimitiveKClassImpl(tmp_8, 'Short', PrimitiveClasses$shortClass$lambda);\n    var tmp_9 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_10 = Number;\n    tmp_9.intClass = new PrimitiveKClassImpl(tmp_10, 'Int', PrimitiveClasses$intClass$lambda);\n    var tmp_11 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_12 = Number;\n    tmp_11.floatClass = new PrimitiveKClassImpl(tmp_12, 'Float', PrimitiveClasses$floatClass$lambda);\n    var tmp_13 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_14 = Number;\n    tmp_13.doubleClass = new PrimitiveKClassImpl(tmp_14, 'Double', PrimitiveClasses$doubleClass$lambda);\n    var tmp_15 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_16 = Array;\n    tmp_15.arrayClass = new PrimitiveKClassImpl(tmp_16, 'Array', PrimitiveClasses$arrayClass$lambda);\n    var tmp_17 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_18 = String;\n    tmp_17.stringClass = new PrimitiveKClassImpl(tmp_18, 'String', PrimitiveClasses$stringClass$lambda);\n    var tmp_19 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_20 = Error;\n    tmp_19.throwableClass = new PrimitiveKClassImpl(tmp_20, 'Throwable', PrimitiveClasses$throwableClass$lambda);\n    var tmp_21 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_22 = Array;\n    tmp_21.booleanArrayClass = new PrimitiveKClassImpl(tmp_22, 'BooleanArray', PrimitiveClasses$booleanArrayClass$lambda);\n    var tmp_23 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_24 = Uint16Array;\n    tmp_23.charArrayClass = new PrimitiveKClassImpl(tmp_24, 'CharArray', PrimitiveClasses$charArrayClass$lambda);\n    var tmp_25 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_26 = Int8Array;\n    tmp_25.byteArrayClass = new PrimitiveKClassImpl(tmp_26, 'ByteArray', PrimitiveClasses$byteArrayClass$lambda);\n    var tmp_27 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_28 = Int16Array;\n    tmp_27.shortArrayClass = new PrimitiveKClassImpl(tmp_28, 'ShortArray', PrimitiveClasses$shortArrayClass$lambda);\n    var tmp_29 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_30 = Int32Array;\n    tmp_29.intArrayClass = new PrimitiveKClassImpl(tmp_30, 'IntArray', PrimitiveClasses$intArrayClass$lambda);\n    var tmp_31 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_32 = Array;\n    tmp_31.longArrayClass = new PrimitiveKClassImpl(tmp_32, 'LongArray', PrimitiveClasses$longArrayClass$lambda);\n    var tmp_33 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_34 = Float32Array;\n    tmp_33.floatArrayClass = new PrimitiveKClassImpl(tmp_34, 'FloatArray', PrimitiveClasses$floatArrayClass$lambda);\n    var tmp_35 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_36 = Float64Array;\n    tmp_35.doubleArrayClass = new PrimitiveKClassImpl(tmp_36, 'DoubleArray', PrimitiveClasses$doubleArrayClass$lambda);\n  }\n  protoOf(PrimitiveClasses).y2 = function () {\n    return this.anyClass;\n  };\n  protoOf(PrimitiveClasses).z2 = function () {\n    return this.numberClass;\n  };\n  protoOf(PrimitiveClasses).a3 = function () {\n    return this.nothingClass;\n  };\n  protoOf(PrimitiveClasses).b3 = function () {\n    return this.booleanClass;\n  };\n  protoOf(PrimitiveClasses).c3 = function () {\n    return this.byteClass;\n  };\n  protoOf(PrimitiveClasses).d3 = function () {\n    return this.shortClass;\n  };\n  protoOf(PrimitiveClasses).e3 = function () {\n    return this.intClass;\n  };\n  protoOf(PrimitiveClasses).f3 = function () {\n    return this.floatClass;\n  };\n  protoOf(PrimitiveClasses).g3 = function () {\n    return this.doubleClass;\n  };\n  protoOf(PrimitiveClasses).h3 = function () {\n    return this.arrayClass;\n  };\n  protoOf(PrimitiveClasses).i3 = function () {\n    return this.stringClass;\n  };\n  protoOf(PrimitiveClasses).j3 = function () {\n    return this.throwableClass;\n  };\n  protoOf(PrimitiveClasses).k3 = function () {\n    return this.booleanArrayClass;\n  };\n  protoOf(PrimitiveClasses).l3 = function () {\n    return this.charArrayClass;\n  };\n  protoOf(PrimitiveClasses).m3 = function () {\n    return this.byteArrayClass;\n  };\n  protoOf(PrimitiveClasses).n3 = function () {\n    return this.shortArrayClass;\n  };\n  protoOf(PrimitiveClasses).o3 = function () {\n    return this.intArrayClass;\n  };\n  protoOf(PrimitiveClasses).p3 = function () {\n    return this.longArrayClass;\n  };\n  protoOf(PrimitiveClasses).q3 = function () {\n    return this.floatArrayClass;\n  };\n  protoOf(PrimitiveClasses).r3 = function () {\n    return this.doubleArrayClass;\n  };\n  protoOf(PrimitiveClasses).functionClass = function (arity) {\n    var tmp0_elvis_lhs = get_functionClasses()[arity];\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      // Inline function 'kotlin.run' call\n      // Inline function 'kotlin.contracts.contract' call\n      // Inline function 'kotlin.reflect.js.internal.PrimitiveClasses.functionClass.<anonymous>' call\n      // Inline function 'kotlin.js.unsafeCast' call\n      var tmp_0 = Function;\n      var tmp_1 = 'Function' + arity;\n      var result = new PrimitiveKClassImpl(tmp_0, tmp_1, PrimitiveClasses$functionClass$lambda(arity));\n      // Inline function 'kotlin.js.asDynamic' call\n      get_functionClasses()[arity] = result;\n      tmp = result;\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    return tmp;\n  };\n  var PrimitiveClasses_instance;\n  function PrimitiveClasses_getInstance() {\n    if (PrimitiveClasses_instance == null)\n      new PrimitiveClasses();\n    return PrimitiveClasses_instance;\n  }\n  var properties_initialized_primitives_kt_jle18u;\n  function _init_properties_primitives_kt__3fums4() {\n    if (!properties_initialized_primitives_kt_jle18u) {\n      properties_initialized_primitives_kt_jle18u = true;\n      // Inline function 'kotlin.arrayOfNulls' call\n      functionClasses = fillArrayVal(Array(0), null);\n    }\n  }\n  function getKClass(jClass) {\n    var tmp;\n    if (Array.isArray(jClass)) {\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      tmp = getKClassM(jClass);\n    } else {\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      tmp = getKClass1(jClass);\n    }\n    return tmp;\n  }\n  function getKClassM(jClasses) {\n    var tmp;\n    switch (jClasses.length) {\n      case 1:\n        tmp = getKClass1(jClasses[0]);\n        break;\n      case 0:\n        // Inline function 'kotlin.js.unsafeCast' call\n\n        // Inline function 'kotlin.js.asDynamic' call\n\n        tmp = NothingKClassImpl_getInstance();\n        break;\n      default:\n        // Inline function 'kotlin.js.unsafeCast' call\n\n        // Inline function 'kotlin.js.asDynamic' call\n\n        tmp = new ErrorKClass();\n        break;\n    }\n    return tmp;\n  }\n  function getKClass1(jClass) {\n    if (jClass === String) {\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      return PrimitiveClasses_getInstance().stringClass;\n    }\n    // Inline function 'kotlin.js.asDynamic' call\n    var metadata = jClass.$metadata$;\n    var tmp;\n    if (metadata != null) {\n      var tmp_0;\n      if (metadata.$kClass$ == null) {\n        var kClass = new SimpleKClassImpl(jClass);\n        metadata.$kClass$ = kClass;\n        tmp_0 = kClass;\n      } else {\n        tmp_0 = metadata.$kClass$;\n      }\n      tmp = tmp_0;\n    } else {\n      tmp = new SimpleKClassImpl(jClass);\n    }\n    return tmp;\n  }\n  function getKClassFromExpression(e) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp;\n    switch (typeof e) {\n      case 'string':\n        tmp = PrimitiveClasses_getInstance().stringClass;\n        break;\n      case 'number':\n        var tmp_0;\n        // Inline function 'kotlin.js.asDynamic' call\n\n        // Inline function 'kotlin.js.jsBitwiseOr' call\n\n        if ((e | 0) === e) {\n          tmp_0 = PrimitiveClasses_getInstance().intClass;\n        } else {\n          tmp_0 = PrimitiveClasses_getInstance().doubleClass;\n        }\n\n        tmp = tmp_0;\n        break;\n      case 'boolean':\n        tmp = PrimitiveClasses_getInstance().booleanClass;\n        break;\n      case 'function':\n        var tmp_1 = PrimitiveClasses_getInstance();\n        // Inline function 'kotlin.js.asDynamic' call\n\n        tmp = tmp_1.functionClass(e.length);\n        break;\n      default:\n        var tmp_2;\n        if (isBooleanArray(e)) {\n          tmp_2 = PrimitiveClasses_getInstance().booleanArrayClass;\n        } else {\n          if (isCharArray(e)) {\n            tmp_2 = PrimitiveClasses_getInstance().charArrayClass;\n          } else {\n            if (isByteArray(e)) {\n              tmp_2 = PrimitiveClasses_getInstance().byteArrayClass;\n            } else {\n              if (isShortArray(e)) {\n                tmp_2 = PrimitiveClasses_getInstance().shortArrayClass;\n              } else {\n                if (isIntArray(e)) {\n                  tmp_2 = PrimitiveClasses_getInstance().intArrayClass;\n                } else {\n                  if (isLongArray(e)) {\n                    tmp_2 = PrimitiveClasses_getInstance().longArrayClass;\n                  } else {\n                    if (isFloatArray(e)) {\n                      tmp_2 = PrimitiveClasses_getInstance().floatArrayClass;\n                    } else {\n                      if (isDoubleArray(e)) {\n                        tmp_2 = PrimitiveClasses_getInstance().doubleArrayClass;\n                      } else {\n                        if (isInterface(e, KClass)) {\n                          tmp_2 = getKClass(KClass);\n                        } else {\n                          if (isArray(e)) {\n                            tmp_2 = PrimitiveClasses_getInstance().arrayClass;\n                          } else {\n                            var constructor = Object.getPrototypeOf(e).constructor;\n                            var tmp_3;\n                            if (constructor === Object) {\n                              tmp_3 = PrimitiveClasses_getInstance().anyClass;\n                            } else if (constructor === Error) {\n                              tmp_3 = PrimitiveClasses_getInstance().throwableClass;\n                            } else {\n                              var jsClass = constructor;\n                              tmp_3 = getKClass1(jsClass);\n                            }\n                            tmp_2 = tmp_3;\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n\n        tmp = tmp_2;\n        break;\n    }\n    // Inline function 'kotlin.js.asDynamic' call\n    return tmp;\n  }\n  function reset(_this__u8e3s4) {\n    _this__u8e3s4.lastIndex = 0;\n  }\n  function CharacterCodingException_init_$Init$($this) {\n    CharacterCodingException.call($this, null);\n    return $this;\n  }\n  function CharacterCodingException_init_$Create$() {\n    var tmp = CharacterCodingException_init_$Init$(objectCreate(protoOf(CharacterCodingException)));\n    captureStack(tmp, CharacterCodingException_init_$Create$);\n    return tmp;\n  }\n  function CharacterCodingException(message) {\n    Exception_init_$Init$_0(message, this);\n    captureStack(this, CharacterCodingException);\n  }\n  function StringBuilder_init_$Init$(capacity, $this) {\n    StringBuilder_init_$Init$_0($this);\n    return $this;\n  }\n  function StringBuilder_init_$Create$(capacity) {\n    return StringBuilder_init_$Init$(capacity, objectCreate(protoOf(StringBuilder)));\n  }\n  function StringBuilder_init_$Init$_0($this) {\n    StringBuilder.call($this, '');\n    return $this;\n  }\n  function StringBuilder_init_$Create$_0() {\n    return StringBuilder_init_$Init$_0(objectCreate(protoOf(StringBuilder)));\n  }\n  function StringBuilder(content) {\n    this.d2_1 = !(content === undefined) ? content : '';\n  }\n  protoOf(StringBuilder).a = function () {\n    // Inline function 'kotlin.js.asDynamic' call\n    return this.d2_1.length;\n  };\n  protoOf(StringBuilder).b = function (index) {\n    // Inline function 'kotlin.text.getOrElse' call\n    var this_0 = this.d2_1;\n    var tmp;\n    if (index >= 0 ? index <= get_lastIndex(this_0) : false) {\n      tmp = charSequenceGet(this_0, index);\n    } else {\n      throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', length: ' + this.a() + '}');\n    }\n    return tmp;\n  };\n  protoOf(StringBuilder).g2 = function (value) {\n    this.d2_1 = this.d2_1 + toString(value);\n    return this;\n  };\n  protoOf(StringBuilder).u3 = function (value) {\n    this.d2_1 = this.d2_1 + toString_0(value);\n    return this;\n  };\n  protoOf(StringBuilder).e2 = function (value) {\n    this.d2_1 = this.d2_1 + toString_0(value);\n    return this;\n  };\n  protoOf(StringBuilder).f2 = function (value) {\n    var tmp = this;\n    var tmp_0 = this.d2_1;\n    tmp.d2_1 = tmp_0 + (value == null ? 'null' : value);\n    return this;\n  };\n  protoOf(StringBuilder).toString = function () {\n    return this.d2_1;\n  };\n  function uppercaseChar(_this__u8e3s4) {\n    // Inline function 'kotlin.text.uppercase' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var uppercase = toString(_this__u8e3s4).toUpperCase();\n    return uppercase.length > 1 ? _this__u8e3s4 : charSequenceGet(uppercase, 0);\n  }\n  function checkRadix(radix) {\n    if (!(2 <= radix ? radix <= 36 : false)) {\n      throw IllegalArgumentException_init_$Create$_0('radix ' + radix + ' was not in valid range 2..36');\n    }\n    return radix;\n  }\n  function toInt(_this__u8e3s4, radix) {\n    var tmp0_elvis_lhs = toIntOrNull(_this__u8e3s4, radix);\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      numberFormatError(_this__u8e3s4);\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    return tmp;\n  }\n  function toInt_0(_this__u8e3s4) {\n    var tmp0_elvis_lhs = toIntOrNull_0(_this__u8e3s4);\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      numberFormatError(_this__u8e3s4);\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    return tmp;\n  }\n  function digitOf(char, radix) {\n    // Inline function 'kotlin.let' call\n    // Inline function 'kotlin.contracts.contract' call\n    // Inline function 'kotlin.text.digitOf.<anonymous>' call\n    var it = (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(48)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(57)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(48)) : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(90)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(97)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(122)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(97)) + 10 | 0 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(128)) < 0 ? -1 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65313)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65338)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65313)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65345)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65370)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65345)) + 10 | 0 : digitToIntImpl(char);\n    return it >= radix ? -1 : it;\n  }\n  function Regex_init_$Init$(pattern, $this) {\n    Regex.call($this, pattern, emptySet());\n    return $this;\n  }\n  function Regex_init_$Create$(pattern) {\n    return Regex_init_$Init$(pattern, objectCreate(protoOf(Regex)));\n  }\n  function Companion_0() {\n    Companion_instance_0 = this;\n    this.v3_1 = new RegExp('[\\\\\\\\^$*+?.()|[\\\\]{}]', 'g');\n    this.w3_1 = new RegExp('[\\\\\\\\$]', 'g');\n    this.x3_1 = new RegExp('\\\\$', 'g');\n  }\n  var Companion_instance_0;\n  function Companion_getInstance_0() {\n    if (Companion_instance_0 == null)\n      new Companion_0();\n    return Companion_instance_0;\n  }\n  function Regex(pattern, options) {\n    Companion_getInstance_0();\n    this.y3_1 = pattern;\n    this.z3_1 = toSet(options);\n    this.a4_1 = new RegExp(pattern, toFlags(options, 'gu'));\n    this.b4_1 = null;\n    this.c4_1 = null;\n  }\n  protoOf(Regex).d4 = function (input) {\n    reset(this.a4_1);\n    var match = this.a4_1.exec(toString_1(input));\n    return (!(match == null) ? match.index === 0 : false) ? this.a4_1.lastIndex === charSequenceLength(input) : false;\n  };\n  protoOf(Regex).toString = function () {\n    return this.a4_1.toString();\n  };\n  function toFlags(_this__u8e3s4, prepend) {\n    return joinToString(_this__u8e3s4, '', prepend, VOID, VOID, VOID, toFlags$lambda);\n  }\n  function toFlags$lambda(it) {\n    return it.g4_1;\n  }\n  var STRING_CASE_INSENSITIVE_ORDER;\n  function compareTo(_this__u8e3s4, other, ignoreCase) {\n    ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n    _init_properties_stringJs_kt__bg7zye();\n    if (ignoreCase) {\n      var n1 = _this__u8e3s4.length;\n      var n2 = other.length;\n      // Inline function 'kotlin.comparisons.minOf' call\n      var min = Math.min(n1, n2);\n      if (min === 0)\n        return n1 - n2 | 0;\n      var inductionVariable = 0;\n      if (inductionVariable < min)\n        do {\n          var index = inductionVariable;\n          inductionVariable = inductionVariable + 1 | 0;\n          var thisChar = charSequenceGet(_this__u8e3s4, index);\n          var otherChar = charSequenceGet(other, index);\n          if (!(thisChar === otherChar)) {\n            thisChar = uppercaseChar(thisChar);\n            otherChar = uppercaseChar(otherChar);\n            if (!(thisChar === otherChar)) {\n              // Inline function 'kotlin.text.lowercaseChar' call\n              // Inline function 'kotlin.text.lowercase' call\n              var this_0 = thisChar;\n              // Inline function 'kotlin.js.unsafeCast' call\n              // Inline function 'kotlin.js.asDynamic' call\n              var tmp$ret$3 = toString(this_0).toLowerCase();\n              thisChar = charSequenceGet(tmp$ret$3, 0);\n              // Inline function 'kotlin.text.lowercaseChar' call\n              // Inline function 'kotlin.text.lowercase' call\n              var this_1 = otherChar;\n              // Inline function 'kotlin.js.unsafeCast' call\n              // Inline function 'kotlin.js.asDynamic' call\n              var tmp$ret$7 = toString(this_1).toLowerCase();\n              otherChar = charSequenceGet(tmp$ret$7, 0);\n              if (!(thisChar === otherChar)) {\n                return Char__compareTo_impl_ypi4mb(thisChar, otherChar);\n              }\n            }\n          }\n        }\n         while (inductionVariable < min);\n      return n1 - n2 | 0;\n    } else {\n      return compareTo_0(_this__u8e3s4, other);\n    }\n  }\n  function encodeToByteArray(_this__u8e3s4) {\n    _init_properties_stringJs_kt__bg7zye();\n    return encodeUtf8(_this__u8e3s4, 0, _this__u8e3s4.length, false);\n  }\n  function sam$kotlin_Comparator$0(function_0) {\n    this.h4_1 = function_0;\n  }\n  protoOf(sam$kotlin_Comparator$0).i4 = function (a, b) {\n    return this.h4_1(a, b);\n  };\n  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n    return this.i4(a, b);\n  };\n  function STRING_CASE_INSENSITIVE_ORDER$lambda(a, b) {\n    _init_properties_stringJs_kt__bg7zye();\n    return compareTo(a, b, true);\n  }\n  var properties_initialized_stringJs_kt_nta8o4;\n  function _init_properties_stringJs_kt__bg7zye() {\n    if (!properties_initialized_stringJs_kt_nta8o4) {\n      properties_initialized_stringJs_kt_nta8o4 = true;\n      var tmp = STRING_CASE_INSENSITIVE_ORDER$lambda;\n      STRING_CASE_INSENSITIVE_ORDER = new sam$kotlin_Comparator$0(tmp);\n    }\n  }\n  function get_REPLACEMENT_BYTE_SEQUENCE() {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    return REPLACEMENT_BYTE_SEQUENCE;\n  }\n  var REPLACEMENT_BYTE_SEQUENCE;\n  function encodeUtf8(string, startIndex, endIndex, throwOnMalformed) {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.contracts.contract' call\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.contracts.contract' call\n    if (!((startIndex >= 0 ? endIndex <= string.length : false) ? startIndex <= endIndex : false)) {\n      // Inline function 'kotlin.require.<anonymous>' call\n      var message = 'Failed requirement.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    var bytes = new Int8Array(imul(endIndex - startIndex | 0, 3));\n    var byteIndex = 0;\n    var charIndex = startIndex;\n    while (charIndex < endIndex) {\n      // Inline function 'kotlin.code' call\n      var tmp0 = charIndex;\n      charIndex = tmp0 + 1 | 0;\n      var this_0 = charSequenceGet(string, tmp0);\n      var code = Char__toInt_impl_vasixd(this_0);\n      if (code < 128) {\n        var tmp1 = byteIndex;\n        byteIndex = tmp1 + 1 | 0;\n        bytes[tmp1] = toByte(code);\n      } else if (code < 2048) {\n        var tmp2 = byteIndex;\n        byteIndex = tmp2 + 1 | 0;\n        bytes[tmp2] = toByte(code >> 6 | 192);\n        var tmp3 = byteIndex;\n        byteIndex = tmp3 + 1 | 0;\n        bytes[tmp3] = toByte(code & 63 | 128);\n      } else if (code < 55296 ? true : code >= 57344) {\n        var tmp4 = byteIndex;\n        byteIndex = tmp4 + 1 | 0;\n        bytes[tmp4] = toByte(code >> 12 | 224);\n        var tmp5 = byteIndex;\n        byteIndex = tmp5 + 1 | 0;\n        bytes[tmp5] = toByte(code >> 6 & 63 | 128);\n        var tmp6 = byteIndex;\n        byteIndex = tmp6 + 1 | 0;\n        bytes[tmp6] = toByte(code & 63 | 128);\n      } else {\n        var codePoint = codePointFromSurrogate(string, code, charIndex, endIndex, throwOnMalformed);\n        if (codePoint <= 0) {\n          var tmp7 = byteIndex;\n          byteIndex = tmp7 + 1 | 0;\n          bytes[tmp7] = get_REPLACEMENT_BYTE_SEQUENCE()[0];\n          var tmp8 = byteIndex;\n          byteIndex = tmp8 + 1 | 0;\n          bytes[tmp8] = get_REPLACEMENT_BYTE_SEQUENCE()[1];\n          var tmp9 = byteIndex;\n          byteIndex = tmp9 + 1 | 0;\n          bytes[tmp9] = get_REPLACEMENT_BYTE_SEQUENCE()[2];\n        } else {\n          var tmp10 = byteIndex;\n          byteIndex = tmp10 + 1 | 0;\n          bytes[tmp10] = toByte(codePoint >> 18 | 240);\n          var tmp11 = byteIndex;\n          byteIndex = tmp11 + 1 | 0;\n          bytes[tmp11] = toByte(codePoint >> 12 & 63 | 128);\n          var tmp12 = byteIndex;\n          byteIndex = tmp12 + 1 | 0;\n          bytes[tmp12] = toByte(codePoint >> 6 & 63 | 128);\n          var tmp13 = byteIndex;\n          byteIndex = tmp13 + 1 | 0;\n          bytes[tmp13] = toByte(codePoint & 63 | 128);\n          charIndex = charIndex + 1 | 0;\n        }\n      }\n    }\n    return bytes.length === byteIndex ? bytes : copyOf_0(bytes, byteIndex);\n  }\n  function codePointFromSurrogate(string, high, index, endIndex, throwOnMalformed) {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    if (!(55296 <= high ? high <= 56319 : false) ? true : index >= endIndex) {\n      return malformed(0, index, throwOnMalformed);\n    }\n    // Inline function 'kotlin.code' call\n    var this_0 = charSequenceGet(string, index);\n    var low = Char__toInt_impl_vasixd(this_0);\n    if (!(56320 <= low ? low <= 57343 : false)) {\n      return malformed(0, index, throwOnMalformed);\n    }\n    return 65536 + ((high & 1023) << 10) | 0 | low & 1023;\n  }\n  function malformed(size, index, throwOnMalformed) {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    if (throwOnMalformed)\n      throw new CharacterCodingException('Malformed sequence starting at ' + (index - 1 | 0));\n    return -size | 0;\n  }\n  var properties_initialized_utf8Encoding_kt_eee1vq;\n  function _init_properties_utf8Encoding_kt__9thjs4() {\n    if (!properties_initialized_utf8Encoding_kt_eee1vq) {\n      properties_initialized_utf8Encoding_kt_eee1vq = true;\n      // Inline function 'kotlin.byteArrayOf' call\n      REPLACEMENT_BYTE_SEQUENCE = new Int8Array([-17, -65, -67]);\n    }\n  }\n  function toCollection(_this__u8e3s4, destination) {\n    var inductionVariable = 0;\n    var last = _this__u8e3s4.length;\n    while (inductionVariable < last) {\n      var item = _this__u8e3s4[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      destination.g(item);\n    }\n    return destination;\n  }\n  function joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n    separator = separator === VOID ? ', ' : separator;\n    prefix = prefix === VOID ? '' : prefix;\n    postfix = postfix === VOID ? '' : postfix;\n    limit = limit === VOID ? -1 : limit;\n    truncated = truncated === VOID ? '...' : truncated;\n    transform = transform === VOID ? null : transform;\n    return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n  }\n  function joinTo(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n    separator = separator === VOID ? ', ' : separator;\n    prefix = prefix === VOID ? '' : prefix;\n    postfix = postfix === VOID ? '' : postfix;\n    limit = limit === VOID ? -1 : limit;\n    truncated = truncated === VOID ? '...' : truncated;\n    transform = transform === VOID ? null : transform;\n    buffer.u3(prefix);\n    var count = 0;\n    var tmp0_iterator = _this__u8e3s4.i();\n    $l$loop: while (tmp0_iterator.q1()) {\n      var element = tmp0_iterator.w1();\n      count = count + 1 | 0;\n      if (count > 1) {\n        buffer.u3(separator);\n      }\n      if (limit < 0 ? true : count <= limit) {\n        appendElement(buffer, element, transform);\n      } else\n        break;\n    }\n    if (limit >= 0 ? count > limit : false) {\n      buffer.u3(truncated);\n    }\n    buffer.u3(postfix);\n    return buffer;\n  }\n  function toSet(_this__u8e3s4) {\n    if (isInterface(_this__u8e3s4, Collection)) {\n      var tmp;\n      switch (_this__u8e3s4.h()) {\n        case 0:\n          tmp = emptySet();\n          break;\n        case 1:\n          var tmp_0;\n          if (isInterface(_this__u8e3s4, List)) {\n            tmp_0 = _this__u8e3s4.j4(0);\n          } else {\n            tmp_0 = _this__u8e3s4.i().w1();\n          }\n\n          tmp = setOf(tmp_0);\n          break;\n        default:\n          tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_0(mapCapacity(_this__u8e3s4.h())));\n          break;\n      }\n      return tmp;\n    }\n    return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$()));\n  }\n  function toCollection_0(_this__u8e3s4, destination) {\n    var tmp0_iterator = _this__u8e3s4.i();\n    while (tmp0_iterator.q1()) {\n      var item = tmp0_iterator.w1();\n      destination.g(item);\n    }\n    return destination;\n  }\n  function until(_this__u8e3s4, to) {\n    if (to <= IntCompanionObject_instance.MIN_VALUE)\n      return Companion_getInstance_6().k4_1;\n    return numberRangeToNumber(_this__u8e3s4, to - 1 | 0);\n  }\n  function coerceAtLeast(_this__u8e3s4, minimumValue) {\n    return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4;\n  }\n  function coerceIn(_this__u8e3s4, range) {\n    if (isInterface(range, ClosedFloatingPointRange)) {\n      return coerceIn_0(_this__u8e3s4, range);\n    }\n    if (range.l())\n      throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: ' + range + '.');\n    return _this__u8e3s4 < range.m4() ? range.m4() : _this__u8e3s4 > range.l4() ? range.l4() : _this__u8e3s4;\n  }\n  function step(_this__u8e3s4, step) {\n    checkStepIsPositive(step > 0, step);\n    return Companion_instance_7.q4(_this__u8e3s4.n4_1, _this__u8e3s4.o4_1, _this__u8e3s4.p4_1 > 0 ? step : -step | 0);\n  }\n  function coerceIn_0(_this__u8e3s4, range) {\n    if (range.l())\n      throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: ' + range + '.');\n    return (range.r4(_this__u8e3s4, range.m4()) ? !range.r4(range.m4(), _this__u8e3s4) : false) ? range.m4() : (range.r4(range.l4(), _this__u8e3s4) ? !range.r4(_this__u8e3s4, range.l4()) : false) ? range.l4() : _this__u8e3s4;\n  }\n  function coerceAtMost(_this__u8e3s4, maximumValue) {\n    return _this__u8e3s4 > maximumValue ? maximumValue : _this__u8e3s4;\n  }\n  function _Char___init__impl__6a9atx(value) {\n    return value;\n  }\n  function _get_value__a43j40($this) {\n    return $this;\n  }\n  function _Char___init__impl__6a9atx_0(code) {\n    // Inline function 'kotlin.UShort.toInt' call\n    var tmp$ret$0 = _UShort___get_data__impl__g0245(code) & 65535;\n    return _Char___init__impl__6a9atx(tmp$ret$0);\n  }\n  function Char__compareTo_impl_ypi4mb($this, other) {\n    return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n  }\n  function Char__minus_impl_a2frrh($this, other) {\n    return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n  }\n  function Char__toInt_impl_vasixd($this) {\n    return _get_value__a43j40($this);\n  }\n  function toString($this) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return String.fromCharCode(_get_value__a43j40($this));\n  }\n  function Companion_1() {\n    Companion_instance_1 = this;\n    this.s4_1 = _Char___init__impl__6a9atx(0);\n    this.t4_1 = _Char___init__impl__6a9atx(65535);\n    this.u4_1 = _Char___init__impl__6a9atx(55296);\n    this.v4_1 = _Char___init__impl__6a9atx(56319);\n    this.w4_1 = _Char___init__impl__6a9atx(56320);\n    this.x4_1 = _Char___init__impl__6a9atx(57343);\n    this.y4_1 = _Char___init__impl__6a9atx(55296);\n    this.z4_1 = _Char___init__impl__6a9atx(57343);\n    this.a5_1 = 2;\n    this.b5_1 = 16;\n  }\n  var Companion_instance_1;\n  function Companion_getInstance_1() {\n    if (Companion_instance_1 == null)\n      new Companion_1();\n    return Companion_instance_1;\n  }\n  function Char() {\n  }\n  function List() {\n  }\n  function Collection() {\n  }\n  function Set() {\n  }\n  function Entry() {\n  }\n  function Map_0() {\n  }\n  function Companion_2() {\n  }\n  var Companion_instance_2;\n  function Companion_getInstance_2() {\n    return Companion_instance_2;\n  }\n  function Enum(name, ordinal) {\n    this.c5_1 = name;\n    this.d5_1 = ordinal;\n  }\n  protoOf(Enum).e5 = function () {\n    return this.c5_1;\n  };\n  protoOf(Enum).f5 = function () {\n    return this.d5_1;\n  };\n  protoOf(Enum).g5 = function (other) {\n    return compareTo_0(this.d5_1, other.d5_1);\n  };\n  protoOf(Enum).h5 = function (other) {\n    return this.g5(other instanceof Enum ? other : THROW_CCE());\n  };\n  protoOf(Enum).equals = function (other) {\n    return this === other;\n  };\n  protoOf(Enum).hashCode = function () {\n    return identityHashCode(this);\n  };\n  protoOf(Enum).toString = function () {\n    return this.c5_1;\n  };\n  function toString_0(_this__u8e3s4) {\n    var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : toString_1(_this__u8e3s4);\n    return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs;\n  }\n  function implement(interfaces) {\n    var maxSize = 1;\n    var masks = [];\n    var inductionVariable = 0;\n    var last = interfaces.length;\n    while (inductionVariable < last) {\n      var i = interfaces[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      var currentSize = maxSize;\n      var tmp1_elvis_lhs = i.prototype.$imask$;\n      var imask = tmp1_elvis_lhs == null ? i.$imask$ : tmp1_elvis_lhs;\n      if (!(imask == null)) {\n        masks.push(imask);\n        currentSize = imask.length;\n      }\n      var iid = i.$metadata$.iid;\n      var tmp;\n      if (iid == null) {\n        tmp = null;\n      } else {\n        // Inline function 'kotlin.let' call\n        // Inline function 'kotlin.contracts.contract' call\n        // Inline function 'kotlin.js.implement.<anonymous>' call\n        tmp = bitMaskWith(iid);\n      }\n      var iidImask = tmp;\n      if (!(iidImask == null)) {\n        masks.push(iidImask);\n        currentSize = Math.max(currentSize, iidImask.length);\n      }\n      if (currentSize > maxSize) {\n        maxSize = currentSize;\n      }\n    }\n    return compositeBitMask(maxSize, masks);\n  }\n  function bitMaskWith(activeBit) {\n    var numberIndex = activeBit >> 5;\n    var intArray = new Int32Array(numberIndex + 1 | 0);\n    var positionInNumber = activeBit & 31;\n    var numberWithSettledBit = 1 << positionInNumber;\n    intArray[numberIndex] = intArray[numberIndex] | numberWithSettledBit;\n    return intArray;\n  }\n  function compositeBitMask(capacity, masks) {\n    var tmp = 0;\n    var tmp_0 = new Int32Array(capacity);\n    while (tmp < capacity) {\n      var tmp_1 = tmp;\n      var result = 0;\n      var inductionVariable = 0;\n      var last = masks.length;\n      while (inductionVariable < last) {\n        var mask = masks[inductionVariable];\n        inductionVariable = inductionVariable + 1 | 0;\n        if (tmp_1 < mask.length) {\n          result = result | mask[tmp_1];\n        }\n      }\n      tmp_0[tmp_1] = result;\n      tmp = tmp + 1 | 0;\n    }\n    return tmp_0;\n  }\n  function isBitSet(_this__u8e3s4, possibleActiveBit) {\n    var numberIndex = possibleActiveBit >> 5;\n    if (numberIndex > _this__u8e3s4.length)\n      return false;\n    var positionInNumber = possibleActiveBit & 31;\n    var numberWithSettledBit = 1 << positionInNumber;\n    return !((_this__u8e3s4[numberIndex] & numberWithSettledBit) === 0);\n  }\n  function fillArrayVal(array, initValue) {\n    var inductionVariable = 0;\n    var last = array.length - 1 | 0;\n    if (inductionVariable <= last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        array[i] = initValue;\n      }\n       while (!(i === last));\n    return array;\n  }\n  function get_buf() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return buf;\n  }\n  var buf;\n  function get_bufFloat64() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return bufFloat64;\n  }\n  var bufFloat64;\n  var bufFloat32;\n  function get_bufInt32() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return bufInt32;\n  }\n  var bufInt32;\n  function get_lowIndex() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return lowIndex;\n  }\n  var lowIndex;\n  function get_highIndex() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return highIndex;\n  }\n  var highIndex;\n  function getNumberHashCode(obj) {\n    _init_properties_bitUtils_kt__nfcg4k();\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.jsBitwiseOr' call\n    // Inline function 'kotlin.js.asDynamic' call\n    if ((obj | 0) === obj) {\n      return numberToInt(obj);\n    }\n    get_bufFloat64()[0] = obj;\n    return imul(get_bufInt32()[get_highIndex()], 31) + get_bufInt32()[get_lowIndex()] | 0;\n  }\n  var properties_initialized_bitUtils_kt_i2bo3e;\n  function _init_properties_bitUtils_kt__nfcg4k() {\n    if (!properties_initialized_bitUtils_kt_i2bo3e) {\n      properties_initialized_bitUtils_kt_i2bo3e = true;\n      buf = new ArrayBuffer(8);\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      bufFloat64 = new Float64Array(get_buf());\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      bufFloat32 = new Float32Array(get_buf());\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      bufInt32 = new Int32Array(get_buf());\n      // Inline function 'kotlin.run' call\n      // Inline function 'kotlin.contracts.contract' call\n      // Inline function 'kotlin.js.lowIndex.<anonymous>' call\n      get_bufFloat64()[0] = -1.0;\n      lowIndex = !(get_bufInt32()[0] === 0) ? 1 : 0;\n      highIndex = 1 - get_lowIndex() | 0;\n    }\n  }\n  function charSequenceGet(a, index) {\n    var tmp;\n    if (isString(a)) {\n      // Inline function 'kotlin.Char' call\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      var code = a.charCodeAt(index);\n      var tmp_0;\n      // Inline function 'kotlin.code' call\n      Companion_getInstance_1();\n      var this_0 = _Char___init__impl__6a9atx(0);\n      if (code < Char__toInt_impl_vasixd(this_0)) {\n        tmp_0 = true;\n      } else {\n        // Inline function 'kotlin.code' call\n        Companion_getInstance_1();\n        var this_1 = _Char___init__impl__6a9atx(65535);\n        tmp_0 = code > Char__toInt_impl_vasixd(this_1);\n      }\n      if (tmp_0) {\n        throw IllegalArgumentException_init_$Create$_0('Invalid Char code: ' + code);\n      }\n      tmp = numberToChar(code);\n    } else {\n      tmp = a.b(index);\n    }\n    return tmp;\n  }\n  function isString(a) {\n    return typeof a === 'string';\n  }\n  function charSequenceLength(a) {\n    var tmp;\n    if (isString(a)) {\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      tmp = a.length;\n    } else {\n      tmp = a.a();\n    }\n    return tmp;\n  }\n  function compareTo_0(a, b) {\n    var tmp;\n    switch (typeof a) {\n      case 'number':\n        var tmp_0;\n        if (typeof b === 'number') {\n          tmp_0 = doubleCompareTo(a, b);\n        } else {\n          if (b instanceof Long) {\n            tmp_0 = doubleCompareTo(a, b.k5());\n          } else {\n            tmp_0 = primitiveCompareTo(a, b);\n          }\n        }\n\n        tmp = tmp_0;\n        break;\n      case 'string':\n      case 'boolean':\n        tmp = primitiveCompareTo(a, b);\n        break;\n      default:\n        tmp = compareToDoNotIntrinsicify(a, b);\n        break;\n    }\n    return tmp;\n  }\n  function doubleCompareTo(a, b) {\n    var tmp;\n    if (a < b) {\n      tmp = -1;\n    } else if (a > b) {\n      tmp = 1;\n    } else if (a === b) {\n      var tmp_0;\n      if (a !== 0) {\n        tmp_0 = 0;\n      } else {\n        // Inline function 'kotlin.js.asDynamic' call\n        var ia = 1 / a;\n        var tmp_1;\n        // Inline function 'kotlin.js.asDynamic' call\n        if (ia === 1 / b) {\n          tmp_1 = 0;\n        } else {\n          if (ia < 0) {\n            tmp_1 = -1;\n          } else {\n            tmp_1 = 1;\n          }\n        }\n        tmp_0 = tmp_1;\n      }\n      tmp = tmp_0;\n    } else if (a !== a) {\n      tmp = b !== b ? 0 : 1;\n    } else {\n      tmp = -1;\n    }\n    return tmp;\n  }\n  function primitiveCompareTo(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n  }\n  function compareToDoNotIntrinsicify(a, b) {\n    return a.h5(b);\n  }\n  function identityHashCode(obj) {\n    return getObjectHashCode(obj);\n  }\n  function getObjectHashCode(obj) {\n    // Inline function 'kotlin.js.jsIn' call\n    if (!('kotlinHashCodeValue$' in obj)) {\n      var hash = calculateRandomHash();\n      var descriptor = new Object();\n      descriptor.value = hash;\n      descriptor.enumerable = false;\n      Object.defineProperty(obj, 'kotlinHashCodeValue$', descriptor);\n    }\n    // Inline function 'kotlin.js.unsafeCast' call\n    return obj['kotlinHashCodeValue$'];\n  }\n  function calculateRandomHash() {\n    // Inline function 'kotlin.js.jsBitwiseOr' call\n    return Math.random() * 4.294967296E9 | 0;\n  }\n  function toString_1(o) {\n    var tmp;\n    if (o == null) {\n      tmp = 'null';\n    } else if (isArrayish(o)) {\n      tmp = '[...]';\n    } else if (!(typeof o.toString === 'function')) {\n      tmp = anyToString(o);\n    } else {\n      // Inline function 'kotlin.js.unsafeCast' call\n      tmp = o.toString();\n    }\n    return tmp;\n  }\n  function anyToString(o) {\n    return Object.prototype.toString.call(o);\n  }\n  function hashCode(obj) {\n    if (obj == null)\n      return 0;\n    var typeOf = typeof obj;\n    var tmp;\n    switch (typeOf) {\n      case 'object':\n        tmp = 'function' === typeof obj.hashCode ? obj.hashCode() : getObjectHashCode(obj);\n        break;\n      case 'function':\n        tmp = getObjectHashCode(obj);\n        break;\n      case 'number':\n        tmp = getNumberHashCode(obj);\n        break;\n      case 'boolean':\n        // Inline function 'kotlin.js.unsafeCast' call\n\n        tmp = getBooleanHashCode(obj);\n        break;\n      case 'string':\n        tmp = getStringHashCode(String(obj));\n        break;\n      case 'bigint':\n        tmp = getBigIntHashCode(obj);\n        break;\n      case 'symbol':\n        tmp = getSymbolHashCode(obj);\n        break;\n      default:\n        tmp = function () {\n          throw new Error('Unexpected typeof `' + typeOf + '`');\n        }();\n        break;\n    }\n    return tmp;\n  }\n  function getBooleanHashCode(value) {\n    return value ? 1231 : 1237;\n  }\n  function getStringHashCode(str) {\n    var hash = 0;\n    var length = str.length;\n    var inductionVariable = 0;\n    var last = length - 1 | 0;\n    if (inductionVariable <= last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        // Inline function 'kotlin.js.asDynamic' call\n        var code = str.charCodeAt(i);\n        hash = imul(hash, 31) + code | 0;\n      }\n       while (!(i === last));\n    return hash;\n  }\n  function getBigIntHashCode(value) {\n    var shiftNumber = BigInt(32);\n    var MASK = BigInt(4.294967295E9);\n    var bigNumber = value < 0 ? -value : value;\n    var hashCode = 0;\n    var signum = value < 0 ? -1 : 1;\n    while (bigNumber != 0) {\n      // Inline function 'kotlin.js.unsafeCast' call\n      var chunk = Number(bigNumber & MASK);\n      hashCode = imul(31, hashCode) + chunk | 0;\n      bigNumber = bigNumber >> shiftNumber;\n    }\n    return imul(hashCode, signum);\n  }\n  function getSymbolHashCode(value) {\n    var hashCodeMap = symbolIsSharable(value) ? getSymbolMap() : getSymbolWeakMap();\n    var cachedHashCode = hashCodeMap.get(value);\n    if (cachedHashCode !== VOID)\n      return cachedHashCode;\n    var hash = calculateRandomHash();\n    hashCodeMap.set(value, hash);\n    return hash;\n  }\n  function symbolIsSharable(symbol) {\n    return Symbol.keyFor(symbol) != VOID;\n  }\n  function getSymbolMap() {\n    if (symbolMap === VOID) {\n      symbolMap = new Map();\n    }\n    return symbolMap;\n  }\n  function getSymbolWeakMap() {\n    if (symbolWeakMap === VOID) {\n      symbolWeakMap = new WeakMap();\n    }\n    return symbolWeakMap;\n  }\n  var symbolMap;\n  var symbolWeakMap;\n  function equals(obj1, obj2) {\n    if (obj1 == null) {\n      return obj2 == null;\n    }\n    if (obj2 == null) {\n      return false;\n    }\n    if (typeof obj1 === 'object' ? typeof obj1.equals === 'function' : false) {\n      return obj1.equals(obj2);\n    }\n    if (obj1 !== obj1) {\n      return obj2 !== obj2;\n    }\n    if (typeof obj1 === 'number' ? typeof obj2 === 'number' : false) {\n      var tmp;\n      if (obj1 === obj2) {\n        var tmp_0;\n        if (obj1 !== 0) {\n          tmp_0 = true;\n        } else {\n          // Inline function 'kotlin.js.asDynamic' call\n          var tmp_1 = 1 / obj1;\n          // Inline function 'kotlin.js.asDynamic' call\n          tmp_0 = tmp_1 === 1 / obj2;\n        }\n        tmp = tmp_0;\n      } else {\n        tmp = false;\n      }\n      return tmp;\n    }\n    return obj1 === obj2;\n  }\n  function unboxIntrinsic(x) {\n    var message = 'Should be lowered';\n    throw IllegalStateException_init_$Create$_0(toString_1(message));\n  }\n  function captureStack(instance, constructorFunction) {\n    if (Error.captureStackTrace != null) {\n      Error.captureStackTrace(instance, constructorFunction);\n    } else {\n      // Inline function 'kotlin.js.asDynamic' call\n      instance.stack = (new Error()).stack;\n    }\n  }\n  function protoOf(constructor) {\n    return constructor.prototype;\n  }\n  function defineProp(obj, name, getter, setter) {\n    return Object.defineProperty(obj, name, {configurable: true, get: getter, set: setter});\n  }\n  function objectCreate(proto) {\n    return Object.create(proto);\n  }\n  function extendThrowable(this_, message, cause) {\n    Error.call(this_);\n    setPropertiesToThrowableInstance(this_, message, cause);\n  }\n  function setPropertiesToThrowableInstance(this_, message, cause) {\n    var errorInfo = calculateErrorInfo(Object.getPrototypeOf(this_));\n    if ((errorInfo & 1) === 0) {\n      var tmp;\n      if (message == null) {\n        var tmp_0;\n        if (!(message === null)) {\n          var tmp1_elvis_lhs = cause == null ? null : cause.toString();\n          tmp_0 = tmp1_elvis_lhs == null ? VOID : tmp1_elvis_lhs;\n        } else {\n          tmp_0 = VOID;\n        }\n        tmp = tmp_0;\n      } else {\n        tmp = message;\n      }\n      this_.message = tmp;\n    }\n    if ((errorInfo & 2) === 0) {\n      this_.cause = cause;\n    }\n    this_.name = Object.getPrototypeOf(this_).constructor.name;\n  }\n  function ensureNotNull(v) {\n    var tmp;\n    if (v == null) {\n      THROW_NPE();\n    } else {\n      tmp = v;\n    }\n    return tmp;\n  }\n  function THROW_NPE() {\n    throw NullPointerException_init_$Create$();\n  }\n  function noWhenBranchMatchedException() {\n    throw NoWhenBranchMatchedException_init_$Create$();\n  }\n  function THROW_CCE() {\n    throw ClassCastException_init_$Create$();\n  }\n  function THROW_IAE(msg) {\n    throw IllegalArgumentException_init_$Create$_0(msg);\n  }\n  function fillFrom(src, dst) {\n    var srcLen = src.length;\n    var dstLen = dst.length;\n    var index = 0;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var arr = dst;\n    while (index < srcLen ? index < dstLen : false) {\n      var tmp = index;\n      var tmp0 = index;\n      index = tmp0 + 1 | 0;\n      arr[tmp] = src[tmp0];\n    }\n    return dst;\n  }\n  function arrayCopyResize(source, newSize, defaultValue) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    var result = source.slice(0, newSize);\n    // Inline function 'kotlin.copyArrayType' call\n    if (source.$type$ !== undefined) {\n      result.$type$ = source.$type$;\n    }\n    var index = source.length;\n    if (newSize > index) {\n      // Inline function 'kotlin.js.asDynamic' call\n      result.length = newSize;\n      while (index < newSize) {\n        var tmp0 = index;\n        index = tmp0 + 1 | 0;\n        result[tmp0] = defaultValue;\n      }\n    }\n    return result;\n  }\n  function Companion_3() {\n    Companion_instance_3 = this;\n    this.l5_1 = new Long(0, -2147483648);\n    this.m5_1 = new Long(-1, 2147483647);\n    this.n5_1 = 8;\n    this.o5_1 = 64;\n  }\n  var Companion_instance_3;\n  function Companion_getInstance_3() {\n    if (Companion_instance_3 == null)\n      new Companion_3();\n    return Companion_instance_3;\n  }\n  function Long(low, high) {\n    Companion_getInstance_3();\n    Number_0.call(this);\n    this.i5_1 = low;\n    this.j5_1 = high;\n  }\n  protoOf(Long).p5 = function (other) {\n    return compare(this, other);\n  };\n  protoOf(Long).h5 = function (other) {\n    return this.p5(other instanceof Long ? other : THROW_CCE());\n  };\n  protoOf(Long).q5 = function (other) {\n    return add(this, other);\n  };\n  protoOf(Long).r5 = function (other) {\n    return divide(this, other);\n  };\n  protoOf(Long).s5 = function () {\n    return this.t5().q5(new Long(1, 0));\n  };\n  protoOf(Long).t5 = function () {\n    return new Long(~this.i5_1, ~this.j5_1);\n  };\n  protoOf(Long).u5 = function () {\n    return this.i5_1;\n  };\n  protoOf(Long).k5 = function () {\n    return toNumber(this);\n  };\n  protoOf(Long).valueOf = function () {\n    return this.k5();\n  };\n  protoOf(Long).equals = function (other) {\n    var tmp;\n    if (other instanceof Long) {\n      tmp = equalsLong(this, other);\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(Long).hashCode = function () {\n    return hashCode_0(this);\n  };\n  protoOf(Long).toString = function () {\n    return toStringImpl(this, 10);\n  };\n  function get_ZERO() {\n    _init_properties_longjs_kt__tqrzid();\n    return ZERO;\n  }\n  var ZERO;\n  function get_ONE() {\n    _init_properties_longjs_kt__tqrzid();\n    return ONE;\n  }\n  var ONE;\n  function get_NEG_ONE() {\n    _init_properties_longjs_kt__tqrzid();\n    return NEG_ONE;\n  }\n  var NEG_ONE;\n  function get_MAX_VALUE() {\n    _init_properties_longjs_kt__tqrzid();\n    return MAX_VALUE;\n  }\n  var MAX_VALUE;\n  function get_MIN_VALUE() {\n    _init_properties_longjs_kt__tqrzid();\n    return MIN_VALUE;\n  }\n  var MIN_VALUE;\n  function get_TWO_PWR_24_() {\n    _init_properties_longjs_kt__tqrzid();\n    return TWO_PWR_24_;\n  }\n  var TWO_PWR_24_;\n  function compare(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    if (equalsLong(_this__u8e3s4, other)) {\n      return 0;\n    }\n    var thisNeg = isNegative(_this__u8e3s4);\n    var otherNeg = isNegative(other);\n    return (thisNeg ? !otherNeg : false) ? -1 : (!thisNeg ? otherNeg : false) ? 1 : isNegative(subtract(_this__u8e3s4, other)) ? -1 : 1;\n  }\n  function add(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    var a48 = _this__u8e3s4.j5_1 >>> 16 | 0;\n    var a32 = _this__u8e3s4.j5_1 & 65535;\n    var a16 = _this__u8e3s4.i5_1 >>> 16 | 0;\n    var a00 = _this__u8e3s4.i5_1 & 65535;\n    var b48 = other.j5_1 >>> 16 | 0;\n    var b32 = other.j5_1 & 65535;\n    var b16 = other.i5_1 >>> 16 | 0;\n    var b00 = other.i5_1 & 65535;\n    var c48 = 0;\n    var c32 = 0;\n    var c16 = 0;\n    var c00 = 0;\n    c00 = c00 + (a00 + b00 | 0) | 0;\n    c16 = c16 + (c00 >>> 16 | 0) | 0;\n    c00 = c00 & 65535;\n    c16 = c16 + (a16 + b16 | 0) | 0;\n    c32 = c32 + (c16 >>> 16 | 0) | 0;\n    c16 = c16 & 65535;\n    c32 = c32 + (a32 + b32 | 0) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c48 = c48 + (a48 + b48 | 0) | 0;\n    c48 = c48 & 65535;\n    return new Long(c16 << 16 | c00, c48 << 16 | c32);\n  }\n  function subtract(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    return add(_this__u8e3s4, other.s5());\n  }\n  function multiply(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    if (isZero(_this__u8e3s4)) {\n      return get_ZERO();\n    } else if (isZero(other)) {\n      return get_ZERO();\n    }\n    if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n      return isOdd(other) ? get_MIN_VALUE() : get_ZERO();\n    } else if (equalsLong(other, get_MIN_VALUE())) {\n      return isOdd(_this__u8e3s4) ? get_MIN_VALUE() : get_ZERO();\n    }\n    if (isNegative(_this__u8e3s4)) {\n      var tmp;\n      if (isNegative(other)) {\n        tmp = multiply(negate(_this__u8e3s4), negate(other));\n      } else {\n        tmp = negate(multiply(negate(_this__u8e3s4), other));\n      }\n      return tmp;\n    } else if (isNegative(other)) {\n      return negate(multiply(_this__u8e3s4, negate(other)));\n    }\n    if (lessThan(_this__u8e3s4, get_TWO_PWR_24_()) ? lessThan(other, get_TWO_PWR_24_()) : false) {\n      return fromNumber(toNumber(_this__u8e3s4) * toNumber(other));\n    }\n    var a48 = _this__u8e3s4.j5_1 >>> 16 | 0;\n    var a32 = _this__u8e3s4.j5_1 & 65535;\n    var a16 = _this__u8e3s4.i5_1 >>> 16 | 0;\n    var a00 = _this__u8e3s4.i5_1 & 65535;\n    var b48 = other.j5_1 >>> 16 | 0;\n    var b32 = other.j5_1 & 65535;\n    var b16 = other.i5_1 >>> 16 | 0;\n    var b00 = other.i5_1 & 65535;\n    var c48 = 0;\n    var c32 = 0;\n    var c16 = 0;\n    var c00 = 0;\n    c00 = c00 + imul(a00, b00) | 0;\n    c16 = c16 + (c00 >>> 16 | 0) | 0;\n    c00 = c00 & 65535;\n    c16 = c16 + imul(a16, b00) | 0;\n    c32 = c32 + (c16 >>> 16 | 0) | 0;\n    c16 = c16 & 65535;\n    c16 = c16 + imul(a00, b16) | 0;\n    c32 = c32 + (c16 >>> 16 | 0) | 0;\n    c16 = c16 & 65535;\n    c32 = c32 + imul(a32, b00) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c32 = c32 + imul(a16, b16) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c32 = c32 + imul(a00, b32) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c48 = c48 + (((imul(a48, b00) + imul(a32, b16) | 0) + imul(a16, b32) | 0) + imul(a00, b48) | 0) | 0;\n    c48 = c48 & 65535;\n    return new Long(c16 << 16 | c00, c48 << 16 | c32);\n  }\n  function divide(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    if (isZero(other)) {\n      throw Exception_init_$Create$_0('division by zero');\n    } else if (isZero(_this__u8e3s4)) {\n      return get_ZERO();\n    }\n    if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n      if (equalsLong(other, get_ONE()) ? true : equalsLong(other, get_NEG_ONE())) {\n        return get_MIN_VALUE();\n      } else if (equalsLong(other, get_MIN_VALUE())) {\n        return get_ONE();\n      } else {\n        var halfThis = shiftRight(_this__u8e3s4, 1);\n        var approx = shiftLeft(halfThis.r5(other), 1);\n        if (equalsLong(approx, get_ZERO())) {\n          return isNegative(other) ? get_ONE() : get_NEG_ONE();\n        } else {\n          var rem = subtract(_this__u8e3s4, multiply(other, approx));\n          return add(approx, rem.r5(other));\n        }\n      }\n    } else if (equalsLong(other, get_MIN_VALUE())) {\n      return get_ZERO();\n    }\n    if (isNegative(_this__u8e3s4)) {\n      var tmp;\n      if (isNegative(other)) {\n        tmp = negate(_this__u8e3s4).r5(negate(other));\n      } else {\n        tmp = negate(negate(_this__u8e3s4).r5(other));\n      }\n      return tmp;\n    } else if (isNegative(other)) {\n      return negate(_this__u8e3s4.r5(negate(other)));\n    }\n    var res = get_ZERO();\n    var rem_0 = _this__u8e3s4;\n    while (greaterThanOrEqual(rem_0, other)) {\n      var approxDouble = toNumber(rem_0) / toNumber(other);\n      var approx2 = Math.max(1.0, Math.floor(approxDouble));\n      var log2 = Math.ceil(Math.log(approx2) / Math.LN2);\n      var delta = log2 <= 48.0 ? 1.0 : Math.pow(2.0, log2 - 48);\n      var approxRes = fromNumber(approx2);\n      var approxRem = multiply(approxRes, other);\n      while (isNegative(approxRem) ? true : greaterThan(approxRem, rem_0)) {\n        approx2 = approx2 - delta;\n        approxRes = fromNumber(approx2);\n        approxRem = multiply(approxRes, other);\n      }\n      if (isZero(approxRes)) {\n        approxRes = get_ONE();\n      }\n      res = add(res, approxRes);\n      rem_0 = subtract(rem_0, approxRem);\n    }\n    return res;\n  }\n  function shiftLeft(_this__u8e3s4, numBits) {\n    _init_properties_longjs_kt__tqrzid();\n    var numBits_0 = numBits & 63;\n    if (numBits_0 === 0) {\n      return _this__u8e3s4;\n    } else {\n      if (numBits_0 < 32) {\n        return new Long(_this__u8e3s4.i5_1 << numBits_0, _this__u8e3s4.j5_1 << numBits_0 | (_this__u8e3s4.i5_1 >>> (32 - numBits_0 | 0) | 0));\n      } else {\n        return new Long(0, _this__u8e3s4.i5_1 << (numBits_0 - 32 | 0));\n      }\n    }\n  }\n  function shiftRight(_this__u8e3s4, numBits) {\n    _init_properties_longjs_kt__tqrzid();\n    var numBits_0 = numBits & 63;\n    if (numBits_0 === 0) {\n      return _this__u8e3s4;\n    } else {\n      if (numBits_0 < 32) {\n        return new Long(_this__u8e3s4.i5_1 >>> numBits_0 | 0 | _this__u8e3s4.j5_1 << (32 - numBits_0 | 0), _this__u8e3s4.j5_1 >> numBits_0);\n      } else {\n        return new Long(_this__u8e3s4.j5_1 >> (numBits_0 - 32 | 0), _this__u8e3s4.j5_1 >= 0 ? 0 : -1);\n      }\n    }\n  }\n  function toNumber(_this__u8e3s4) {\n    _init_properties_longjs_kt__tqrzid();\n    return _this__u8e3s4.j5_1 * 4.294967296E9 + getLowBitsUnsigned(_this__u8e3s4);\n  }\n  function equalsLong(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    return _this__u8e3s4.j5_1 === other.j5_1 ? _this__u8e3s4.i5_1 === other.i5_1 : false;\n  }\n  function hashCode_0(l) {\n    _init_properties_longjs_kt__tqrzid();\n    return l.i5_1 ^ l.j5_1;\n  }\n  function toStringImpl(_this__u8e3s4, radix) {\n    _init_properties_longjs_kt__tqrzid();\n    if (radix < 2 ? true : 36 < radix) {\n      throw Exception_init_$Create$_0('radix out of range: ' + radix);\n    }\n    if (isZero(_this__u8e3s4)) {\n      return '0';\n    }\n    if (isNegative(_this__u8e3s4)) {\n      if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n        var radixLong = fromInt(radix);\n        var div = _this__u8e3s4.r5(radixLong);\n        var rem = subtract(multiply(div, radixLong), _this__u8e3s4).u5();\n        var tmp = toStringImpl(div, radix);\n        // Inline function 'kotlin.js.unsafeCast' call\n        // Inline function 'kotlin.js.asDynamic' call\n        return tmp + rem.toString(radix);\n      } else {\n        return '-' + toStringImpl(negate(_this__u8e3s4), radix);\n      }\n    }\n    var digitsPerTime = radix === 2 ? 31 : radix <= 10 ? 9 : radix <= 21 ? 7 : radix <= 35 ? 6 : 5;\n    var radixToPower = fromNumber(Math.pow(radix, digitsPerTime));\n    var rem_0 = _this__u8e3s4;\n    var result = '';\n    while (true) {\n      var remDiv = rem_0.r5(radixToPower);\n      var intval = subtract(rem_0, multiply(remDiv, radixToPower)).u5();\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      var digits = intval.toString(radix);\n      rem_0 = remDiv;\n      if (isZero(rem_0)) {\n        return digits + result;\n      } else {\n        while (digits.length < digitsPerTime) {\n          digits = '0' + digits;\n        }\n        result = digits + result;\n      }\n    }\n  }\n  function fromInt(value) {\n    _init_properties_longjs_kt__tqrzid();\n    return new Long(value, value < 0 ? -1 : 0);\n  }\n  function isNegative(_this__u8e3s4) {\n    _init_properties_longjs_kt__tqrzid();\n    return _this__u8e3s4.j5_1 < 0;\n  }\n  function isZero(_this__u8e3s4) {\n    _init_properties_longjs_kt__tqrzid();\n    return _this__u8e3s4.j5_1 === 0 ? _this__u8e3s4.i5_1 === 0 : false;\n  }\n  function isOdd(_this__u8e3s4) {\n    _init_properties_longjs_kt__tqrzid();\n    return (_this__u8e3s4.i5_1 & 1) === 1;\n  }\n  function negate(_this__u8e3s4) {\n    _init_properties_longjs_kt__tqrzid();\n    return _this__u8e3s4.s5();\n  }\n  function lessThan(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    return compare(_this__u8e3s4, other) < 0;\n  }\n  function fromNumber(value) {\n    _init_properties_longjs_kt__tqrzid();\n    if (isNaN_0(value)) {\n      return get_ZERO();\n    } else if (value <= -9.223372036854776E18) {\n      return get_MIN_VALUE();\n    } else if (value + 1 >= 9.223372036854776E18) {\n      return get_MAX_VALUE();\n    } else if (value < 0.0) {\n      return negate(fromNumber(-value));\n    } else {\n      var twoPwr32 = 4.294967296E9;\n      // Inline function 'kotlin.js.jsBitwiseOr' call\n      var tmp = value % twoPwr32 | 0;\n      // Inline function 'kotlin.js.jsBitwiseOr' call\n      var tmp$ret$1 = value / twoPwr32 | 0;\n      return new Long(tmp, tmp$ret$1);\n    }\n  }\n  function greaterThan(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    return compare(_this__u8e3s4, other) > 0;\n  }\n  function greaterThanOrEqual(_this__u8e3s4, other) {\n    _init_properties_longjs_kt__tqrzid();\n    return compare(_this__u8e3s4, other) >= 0;\n  }\n  function getLowBitsUnsigned(_this__u8e3s4) {\n    _init_properties_longjs_kt__tqrzid();\n    return _this__u8e3s4.i5_1 >= 0 ? _this__u8e3s4.i5_1 : 4.294967296E9 + _this__u8e3s4.i5_1;\n  }\n  var properties_initialized_longjs_kt_5aju7t;\n  function _init_properties_longjs_kt__tqrzid() {\n    if (!properties_initialized_longjs_kt_5aju7t) {\n      properties_initialized_longjs_kt_5aju7t = true;\n      ZERO = fromInt(0);\n      ONE = fromInt(1);\n      NEG_ONE = fromInt(-1);\n      MAX_VALUE = new Long(-1, 2147483647);\n      MIN_VALUE = new Long(0, -2147483648);\n      TWO_PWR_24_ = fromInt(16777216);\n    }\n  }\n  function classMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n    return createMetadata('class', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n  }\n  function createMetadata(kind, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, iid) {\n    var undef = VOID;\n    return {kind: kind, simpleName: name, associatedObjectKey: associatedObjectKey, associatedObjects: associatedObjects, suspendArity: suspendArity, $kClass$: undef, defaultConstructor: defaultConstructor, iid: iid};\n  }\n  function setMetadataFor(ctor, name, metadataConstructor, parent, interfaces, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n    if (!(parent == null)) {\n      ctor.prototype = Object.create(parent.prototype);\n      ctor.prototype.constructor = ctor;\n    }\n    var metadata = metadataConstructor(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity == null ? [] : suspendArity);\n    ctor.$metadata$ = metadata;\n    if (!(interfaces == null)) {\n      var receiver = !(metadata.iid == null) ? ctor : ctor.prototype;\n      receiver.$imask$ = implement(interfaces);\n    }\n  }\n  function interfaceMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n    return createMetadata('interface', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, generateInterfaceId());\n  }\n  function generateInterfaceId() {\n    if (iid === VOID) {\n      iid = 0;\n    }\n    // Inline function 'kotlin.js.unsafeCast' call\n    iid = iid + 1 | 0;\n    // Inline function 'kotlin.js.unsafeCast' call\n    return iid;\n  }\n  var iid;\n  function objectMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n    return createMetadata('object', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n  }\n  function toByte(a) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return a << 24 >> 24;\n  }\n  function numberToInt(a) {\n    var tmp;\n    if (a instanceof Long) {\n      tmp = a.u5();\n    } else {\n      tmp = doubleToInt(a);\n    }\n    return tmp;\n  }\n  function doubleToInt(a) {\n    var tmp;\n    if (a > 2.147483647E9) {\n      tmp = 2147483647;\n    } else if (a < -2.147483648E9) {\n      tmp = -2147483648;\n    } else {\n      // Inline function 'kotlin.js.jsBitwiseOr' call\n      tmp = a | 0;\n    }\n    return tmp;\n  }\n  function toShort(a) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return a << 16 >> 16;\n  }\n  function numberToChar(a) {\n    // Inline function 'kotlin.toUShort' call\n    var this_0 = numberToInt(a);\n    var tmp$ret$0 = _UShort___init__impl__jigrne(toShort(this_0));\n    return _Char___init__impl__6a9atx_0(tmp$ret$0);\n  }\n  function numberRangeToNumber(start, endInclusive) {\n    return new IntRange(start, endInclusive);\n  }\n  function isArrayish(o) {\n    return isJsArray(o) ? true : isView(o);\n  }\n  function isJsArray(obj) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return Array.isArray(obj);\n  }\n  function isInterface(obj, iface) {\n    return isInterfaceImpl(obj, iface.$metadata$.iid);\n  }\n  function isInterfaceImpl(obj, iface) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp0_elvis_lhs = obj.$imask$;\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      return false;\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    var mask = tmp;\n    return isBitSet(mask, iface);\n  }\n  function isArray(obj) {\n    var tmp;\n    if (isJsArray(obj)) {\n      // Inline function 'kotlin.js.asDynamic' call\n      tmp = !obj.$type$;\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  }\n  function isNumber(a) {\n    var tmp;\n    if (typeof a === 'number') {\n      tmp = true;\n    } else {\n      tmp = a instanceof Long;\n    }\n    return tmp;\n  }\n  function isCharSequence(value) {\n    return typeof value === 'string' ? true : isInterface(value, CharSequence);\n  }\n  function isBooleanArray(a) {\n    return isJsArray(a) ? a.$type$ === 'BooleanArray' : false;\n  }\n  function isByteArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Int8Array;\n  }\n  function isShortArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Int16Array;\n  }\n  function isCharArray(a) {\n    var tmp;\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    if (a instanceof Uint16Array) {\n      tmp = a.$type$ === 'CharArray';\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  }\n  function isIntArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Int32Array;\n  }\n  function isFloatArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Float32Array;\n  }\n  function isLongArray(a) {\n    return isJsArray(a) ? a.$type$ === 'LongArray' : false;\n  }\n  function isDoubleArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Float64Array;\n  }\n  function calculateErrorInfo(proto) {\n    var tmp0_safe_receiver = proto.constructor;\n    var metadata = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.$metadata$;\n    var tmp2_safe_receiver = metadata == null ? null : metadata.errorInfo;\n    if (tmp2_safe_receiver == null)\n      null;\n    else {\n      // Inline function 'kotlin.let' call\n      // Inline function 'kotlin.contracts.contract' call\n      return tmp2_safe_receiver;\n    }\n    var result = 0;\n    if (hasProp(proto, 'message'))\n      result = result | 1;\n    if (hasProp(proto, 'cause'))\n      result = result | 2;\n    if (!(result === 3)) {\n      var parentProto = getPrototypeOf(proto);\n      if (parentProto != Error.prototype) {\n        result = result | calculateErrorInfo(parentProto);\n      }\n    }\n    if (!(metadata == null)) {\n      metadata.errorInfo = result;\n    }\n    return result;\n  }\n  function hasProp(proto, propName) {\n    return proto.hasOwnProperty(propName);\n  }\n  function getPrototypeOf(obj) {\n    return Object.getPrototypeOf(obj);\n  }\n  function get_VOID() {\n    _init_properties_void_kt__3zg9as();\n    return VOID;\n  }\n  var VOID;\n  var properties_initialized_void_kt_e4ret2;\n  function _init_properties_void_kt__3zg9as() {\n    if (!properties_initialized_void_kt_e4ret2) {\n      properties_initialized_void_kt_e4ret2 = true;\n      VOID = void 0;\n    }\n  }\n  function fill(_this__u8e3s4, element, fromIndex, toIndex) {\n    fromIndex = fromIndex === VOID ? 0 : fromIndex;\n    toIndex = toIndex === VOID ? _this__u8e3s4.length : toIndex;\n    Companion_instance_4.v5(fromIndex, toIndex, _this__u8e3s4.length);\n    // Inline function 'kotlin.js.nativeFill' call\n    // Inline function 'kotlin.js.asDynamic' call\n    _this__u8e3s4.fill(element, fromIndex, toIndex);\n  }\n  function copyOf(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.contracts.contract' call\n    if (!(newSize >= 0)) {\n      // Inline function 'kotlin.collections.copyOf.<anonymous>' call\n      var message = 'Invalid new array size: ' + newSize + '.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return fillFrom(_this__u8e3s4, new Int32Array(newSize));\n  }\n  function toTypedArray(_this__u8e3s4) {\n    return [].slice.call(_this__u8e3s4);\n  }\n  function copyOf_0(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.contracts.contract' call\n    if (!(newSize >= 0)) {\n      // Inline function 'kotlin.collections.copyOf.<anonymous>' call\n      var message = 'Invalid new array size: ' + newSize + '.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return fillFrom(_this__u8e3s4, new Int8Array(newSize));\n  }\n  function copyOf_1(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.contracts.contract' call\n    if (!(newSize >= 0)) {\n      // Inline function 'kotlin.collections.copyOf.<anonymous>' call\n      var message = 'Invalid new array size: ' + newSize + '.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return arrayCopyResize(_this__u8e3s4, newSize, null);\n  }\n  function digitToIntImpl(_this__u8e3s4) {\n    // Inline function 'kotlin.code' call\n    var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n    var index = binarySearchRange(Digit_getInstance().w5_1, ch);\n    var diff = ch - Digit_getInstance().w5_1[index] | 0;\n    return diff < 10 ? diff : -1;\n  }\n  function binarySearchRange(array, needle) {\n    var bottom = 0;\n    var top = array.length - 1 | 0;\n    var middle = -1;\n    var value = 0;\n    while (bottom <= top) {\n      middle = (bottom + top | 0) / 2 | 0;\n      value = array[middle];\n      if (needle > value)\n        bottom = middle + 1 | 0;\n      else if (needle === value)\n        return middle;\n      else\n        top = middle - 1 | 0;\n    }\n    return middle - (needle < value ? 1 : 0) | 0;\n  }\n  function Digit() {\n    Digit_instance = this;\n    var tmp = this;\n    // Inline function 'kotlin.intArrayOf' call\n    tmp.w5_1 = new Int32Array([48, 1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3558, 3664, 3792, 3872, 4160, 4240, 6112, 6160, 6470, 6608, 6784, 6800, 6992, 7088, 7232, 7248, 42528, 43216, 43264, 43472, 43504, 43600, 44016, 65296]);\n  }\n  var Digit_instance;\n  function Digit_getInstance() {\n    if (Digit_instance == null)\n      new Digit();\n    return Digit_instance;\n  }\n  function Exception_init_$Init$($this) {\n    extendThrowable($this);\n    Exception.call($this);\n    return $this;\n  }\n  function Exception_init_$Create$() {\n    var tmp = Exception_init_$Init$(objectCreate(protoOf(Exception)));\n    captureStack(tmp, Exception_init_$Create$);\n    return tmp;\n  }\n  function Exception_init_$Init$_0(message, $this) {\n    extendThrowable($this, message);\n    Exception.call($this);\n    return $this;\n  }\n  function Exception_init_$Create$_0(message) {\n    var tmp = Exception_init_$Init$_0(message, objectCreate(protoOf(Exception)));\n    captureStack(tmp, Exception_init_$Create$_0);\n    return tmp;\n  }\n  function Exception() {\n    captureStack(this, Exception);\n  }\n  function IllegalArgumentException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    IllegalArgumentException.call($this);\n    return $this;\n  }\n  function IllegalArgumentException_init_$Create$() {\n    var tmp = IllegalArgumentException_init_$Init$(objectCreate(protoOf(IllegalArgumentException)));\n    captureStack(tmp, IllegalArgumentException_init_$Create$);\n    return tmp;\n  }\n  function IllegalArgumentException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    IllegalArgumentException.call($this);\n    return $this;\n  }\n  function IllegalArgumentException_init_$Create$_0(message) {\n    var tmp = IllegalArgumentException_init_$Init$_0(message, objectCreate(protoOf(IllegalArgumentException)));\n    captureStack(tmp, IllegalArgumentException_init_$Create$_0);\n    return tmp;\n  }\n  function IllegalArgumentException() {\n    captureStack(this, IllegalArgumentException);\n  }\n  function IndexOutOfBoundsException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    IndexOutOfBoundsException.call($this);\n    return $this;\n  }\n  function IndexOutOfBoundsException_init_$Create$() {\n    var tmp = IndexOutOfBoundsException_init_$Init$(objectCreate(protoOf(IndexOutOfBoundsException)));\n    captureStack(tmp, IndexOutOfBoundsException_init_$Create$);\n    return tmp;\n  }\n  function IndexOutOfBoundsException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    IndexOutOfBoundsException.call($this);\n    return $this;\n  }\n  function IndexOutOfBoundsException_init_$Create$_0(message) {\n    var tmp = IndexOutOfBoundsException_init_$Init$_0(message, objectCreate(protoOf(IndexOutOfBoundsException)));\n    captureStack(tmp, IndexOutOfBoundsException_init_$Create$_0);\n    return tmp;\n  }\n  function IndexOutOfBoundsException() {\n    captureStack(this, IndexOutOfBoundsException);\n  }\n  function IllegalStateException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    IllegalStateException.call($this);\n    return $this;\n  }\n  function IllegalStateException_init_$Create$() {\n    var tmp = IllegalStateException_init_$Init$(objectCreate(protoOf(IllegalStateException)));\n    captureStack(tmp, IllegalStateException_init_$Create$);\n    return tmp;\n  }\n  function IllegalStateException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    IllegalStateException.call($this);\n    return $this;\n  }\n  function IllegalStateException_init_$Create$_0(message) {\n    var tmp = IllegalStateException_init_$Init$_0(message, objectCreate(protoOf(IllegalStateException)));\n    captureStack(tmp, IllegalStateException_init_$Create$_0);\n    return tmp;\n  }\n  function IllegalStateException() {\n    captureStack(this, IllegalStateException);\n  }\n  function UnsupportedOperationException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    UnsupportedOperationException.call($this);\n    return $this;\n  }\n  function UnsupportedOperationException_init_$Create$() {\n    var tmp = UnsupportedOperationException_init_$Init$(objectCreate(protoOf(UnsupportedOperationException)));\n    captureStack(tmp, UnsupportedOperationException_init_$Create$);\n    return tmp;\n  }\n  function UnsupportedOperationException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    UnsupportedOperationException.call($this);\n    return $this;\n  }\n  function UnsupportedOperationException_init_$Create$_0(message) {\n    var tmp = UnsupportedOperationException_init_$Init$_0(message, objectCreate(protoOf(UnsupportedOperationException)));\n    captureStack(tmp, UnsupportedOperationException_init_$Create$_0);\n    return tmp;\n  }\n  function UnsupportedOperationException() {\n    captureStack(this, UnsupportedOperationException);\n  }\n  function RuntimeException_init_$Init$($this) {\n    Exception_init_$Init$($this);\n    RuntimeException.call($this);\n    return $this;\n  }\n  function RuntimeException_init_$Create$() {\n    var tmp = RuntimeException_init_$Init$(objectCreate(protoOf(RuntimeException)));\n    captureStack(tmp, RuntimeException_init_$Create$);\n    return tmp;\n  }\n  function RuntimeException_init_$Init$_0(message, $this) {\n    Exception_init_$Init$_0(message, $this);\n    RuntimeException.call($this);\n    return $this;\n  }\n  function RuntimeException_init_$Create$_0(message) {\n    var tmp = RuntimeException_init_$Init$_0(message, objectCreate(protoOf(RuntimeException)));\n    captureStack(tmp, RuntimeException_init_$Create$_0);\n    return tmp;\n  }\n  function RuntimeException() {\n    captureStack(this, RuntimeException);\n  }\n  function NoSuchElementException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    NoSuchElementException.call($this);\n    return $this;\n  }\n  function NoSuchElementException_init_$Create$() {\n    var tmp = NoSuchElementException_init_$Init$(objectCreate(protoOf(NoSuchElementException)));\n    captureStack(tmp, NoSuchElementException_init_$Create$);\n    return tmp;\n  }\n  function NoSuchElementException() {\n    captureStack(this, NoSuchElementException);\n  }\n  function Error_init_$Init$($this) {\n    extendThrowable($this);\n    Error_0.call($this);\n    return $this;\n  }\n  function Error_init_$Create$() {\n    var tmp = Error_init_$Init$(objectCreate(protoOf(Error_0)));\n    captureStack(tmp, Error_init_$Create$);\n    return tmp;\n  }\n  function Error_init_$Init$_0(message, cause, $this) {\n    extendThrowable($this, message, cause);\n    Error_0.call($this);\n    return $this;\n  }\n  function Error_init_$Create$_0(message, cause) {\n    var tmp = Error_init_$Init$_0(message, cause, objectCreate(protoOf(Error_0)));\n    captureStack(tmp, Error_init_$Create$_0);\n    return tmp;\n  }\n  function Error_0() {\n    captureStack(this, Error_0);\n  }\n  function NumberFormatException_init_$Init$($this) {\n    IllegalArgumentException_init_$Init$($this);\n    NumberFormatException.call($this);\n    return $this;\n  }\n  function NumberFormatException_init_$Create$() {\n    var tmp = NumberFormatException_init_$Init$(objectCreate(protoOf(NumberFormatException)));\n    captureStack(tmp, NumberFormatException_init_$Create$);\n    return tmp;\n  }\n  function NumberFormatException_init_$Init$_0(message, $this) {\n    IllegalArgumentException_init_$Init$_0(message, $this);\n    NumberFormatException.call($this);\n    return $this;\n  }\n  function NumberFormatException_init_$Create$_0(message) {\n    var tmp = NumberFormatException_init_$Init$_0(message, objectCreate(protoOf(NumberFormatException)));\n    captureStack(tmp, NumberFormatException_init_$Create$_0);\n    return tmp;\n  }\n  function NumberFormatException() {\n    captureStack(this, NumberFormatException);\n  }\n  function ConcurrentModificationException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    ConcurrentModificationException.call($this);\n    return $this;\n  }\n  function ConcurrentModificationException_init_$Create$() {\n    var tmp = ConcurrentModificationException_init_$Init$(objectCreate(protoOf(ConcurrentModificationException)));\n    captureStack(tmp, ConcurrentModificationException_init_$Create$);\n    return tmp;\n  }\n  function ConcurrentModificationException() {\n    captureStack(this, ConcurrentModificationException);\n  }\n  function NullPointerException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    NullPointerException.call($this);\n    return $this;\n  }\n  function NullPointerException_init_$Create$() {\n    var tmp = NullPointerException_init_$Init$(objectCreate(protoOf(NullPointerException)));\n    captureStack(tmp, NullPointerException_init_$Create$);\n    return tmp;\n  }\n  function NullPointerException() {\n    captureStack(this, NullPointerException);\n  }\n  function NoWhenBranchMatchedException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    NoWhenBranchMatchedException.call($this);\n    return $this;\n  }\n  function NoWhenBranchMatchedException_init_$Create$() {\n    var tmp = NoWhenBranchMatchedException_init_$Init$(objectCreate(protoOf(NoWhenBranchMatchedException)));\n    captureStack(tmp, NoWhenBranchMatchedException_init_$Create$);\n    return tmp;\n  }\n  function NoWhenBranchMatchedException() {\n    captureStack(this, NoWhenBranchMatchedException);\n  }\n  function ClassCastException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    ClassCastException.call($this);\n    return $this;\n  }\n  function ClassCastException_init_$Create$() {\n    var tmp = ClassCastException_init_$Init$(objectCreate(protoOf(ClassCastException)));\n    captureStack(tmp, ClassCastException_init_$Create$);\n    return tmp;\n  }\n  function ClassCastException() {\n    captureStack(this, ClassCastException);\n  }\n  function AbstractCollection$toString$lambda(this$0) {\n    return function (it) {\n      return it === this$0 ? '(this Collection)' : toString_0(it);\n    };\n  }\n  function AbstractCollection() {\n  }\n  protoOf(AbstractCollection).j = function (element) {\n    var tmp$ret$0;\n    $l$block_0: {\n      // Inline function 'kotlin.collections.any' call\n      var tmp;\n      if (isInterface(this, Collection)) {\n        tmp = this.l();\n      } else {\n        tmp = false;\n      }\n      if (tmp) {\n        tmp$ret$0 = false;\n        break $l$block_0;\n      }\n      var tmp0_iterator = this.i();\n      while (tmp0_iterator.q1()) {\n        var element_0 = tmp0_iterator.w1();\n        // Inline function 'kotlin.collections.AbstractCollection.contains.<anonymous>' call\n        if (equals(element_0, element)) {\n          tmp$ret$0 = true;\n          break $l$block_0;\n        }\n      }\n      tmp$ret$0 = false;\n    }\n    return tmp$ret$0;\n  };\n  protoOf(AbstractCollection).k = function (elements) {\n    var tmp$ret$0;\n    $l$block_0: {\n      // Inline function 'kotlin.collections.all' call\n      var tmp;\n      if (isInterface(elements, Collection)) {\n        tmp = elements.l();\n      } else {\n        tmp = false;\n      }\n      if (tmp) {\n        tmp$ret$0 = true;\n        break $l$block_0;\n      }\n      var tmp0_iterator = elements.i();\n      while (tmp0_iterator.q1()) {\n        var element = tmp0_iterator.w1();\n        // Inline function 'kotlin.collections.AbstractCollection.containsAll.<anonymous>' call\n        if (!this.j(element)) {\n          tmp$ret$0 = false;\n          break $l$block_0;\n        }\n      }\n      tmp$ret$0 = true;\n    }\n    return tmp$ret$0;\n  };\n  protoOf(AbstractCollection).l = function () {\n    return this.h() === 0;\n  };\n  protoOf(AbstractCollection).toString = function () {\n    return joinToString(this, ', ', '[', ']', VOID, VOID, AbstractCollection$toString$lambda(this));\n  };\n  protoOf(AbstractCollection).toArray = function () {\n    return collectionToArray(this);\n  };\n  function Companion_4() {\n    this.c1_1 = 2147483639;\n  }\n  protoOf(Companion_4).v5 = function (fromIndex, toIndex, size) {\n    if (fromIndex < 0 ? true : toIndex > size) {\n      throw IndexOutOfBoundsException_init_$Create$_0('fromIndex: ' + fromIndex + ', toIndex: ' + toIndex + ', size: ' + size);\n    }\n    if (fromIndex > toIndex) {\n      throw IllegalArgumentException_init_$Create$_0('fromIndex: ' + fromIndex + ' > toIndex: ' + toIndex);\n    }\n  };\n  protoOf(Companion_4).d1 = function (oldCapacity, minCapacity) {\n    var newCapacity = oldCapacity + (oldCapacity >> 1) | 0;\n    if ((newCapacity - minCapacity | 0) < 0)\n      newCapacity = minCapacity;\n    if ((newCapacity - 2147483639 | 0) > 0)\n      newCapacity = minCapacity > 2147483639 ? IntCompanionObject_instance.MAX_VALUE : 2147483639;\n    return newCapacity;\n  };\n  var Companion_instance_4;\n  function Companion_getInstance_4() {\n    return Companion_instance_4;\n  }\n  function Companion_5() {\n  }\n  protoOf(Companion_5).n = function (c) {\n    var hashCode_0 = 0;\n    var tmp0_iterator = c.i();\n    while (tmp0_iterator.q1()) {\n      var element = tmp0_iterator.w1();\n      var tmp = hashCode_0;\n      var tmp2_elvis_lhs = element == null ? null : hashCode(element);\n      hashCode_0 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;\n    }\n    return hashCode_0;\n  };\n  protoOf(Companion_5).m = function (c, other) {\n    if (!(c.h() === other.h()))\n      return false;\n    // Inline function 'kotlin.collections.containsAll' call\n    return c.k(other);\n  };\n  var Companion_instance_5;\n  function Companion_getInstance_5() {\n    return Companion_instance_5;\n  }\n  function collectionToArrayCommonImpl(collection) {\n    if (collection.l()) {\n      // Inline function 'kotlin.emptyArray' call\n      return [];\n    }\n    // Inline function 'kotlin.arrayOfNulls' call\n    var size = collection.h();\n    var destination = fillArrayVal(Array(size), null);\n    var iterator = collection.i();\n    var index = 0;\n    while (iterator.q1()) {\n      var tmp0 = index;\n      index = tmp0 + 1 | 0;\n      destination[tmp0] = iterator.w1();\n    }\n    return destination;\n  }\n  function EmptyIterator() {\n  }\n  protoOf(EmptyIterator).q1 = function () {\n    return false;\n  };\n  protoOf(EmptyIterator).w1 = function () {\n    throw NoSuchElementException_init_$Create$();\n  };\n  var EmptyIterator_instance;\n  function EmptyIterator_getInstance() {\n    return EmptyIterator_instance;\n  }\n  function IntIterator() {\n  }\n  protoOf(IntIterator).w1 = function () {\n    return this.x5();\n  };\n  function emptySet() {\n    return EmptySet_getInstance();\n  }\n  function hashSetOf(elements) {\n    return toCollection(elements, HashSet_init_$Create$_0(mapCapacity(elements.length)));\n  }\n  function EmptySet() {\n    EmptySet_instance = this;\n    this.y5_1 = new Long(1993859828, 793161749);\n  }\n  protoOf(EmptySet).equals = function (other) {\n    var tmp;\n    if (!(other == null) ? isInterface(other, Set) : false) {\n      tmp = other.l();\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(EmptySet).hashCode = function () {\n    return 0;\n  };\n  protoOf(EmptySet).toString = function () {\n    return '[]';\n  };\n  protoOf(EmptySet).h = function () {\n    return 0;\n  };\n  protoOf(EmptySet).l = function () {\n    return true;\n  };\n  protoOf(EmptySet).z5 = function (elements) {\n    return elements.l();\n  };\n  protoOf(EmptySet).k = function (elements) {\n    return this.z5(elements);\n  };\n  protoOf(EmptySet).i = function () {\n    return EmptyIterator_instance;\n  };\n  var EmptySet_instance;\n  function EmptySet_getInstance() {\n    if (EmptySet_instance == null)\n      new EmptySet();\n    return EmptySet_instance;\n  }\n  function optimizeReadOnlySet(_this__u8e3s4) {\n    switch (_this__u8e3s4.h()) {\n      case 0:\n        return emptySet();\n      case 1:\n        return setOf(_this__u8e3s4.i().w1());\n      default:\n        return _this__u8e3s4;\n    }\n  }\n  function getProgressionLastElement(start, end, step) {\n    var tmp;\n    if (step > 0) {\n      tmp = start >= end ? end : end - differenceModulo(end, start, step) | 0;\n    } else if (step < 0) {\n      tmp = start <= end ? end : end + differenceModulo(start, end, -step | 0) | 0;\n    } else {\n      throw IllegalArgumentException_init_$Create$_0('Step is zero.');\n    }\n    return tmp;\n  }\n  function differenceModulo(a, b, c) {\n    return mod(mod(a, c) - mod(b, c) | 0, c);\n  }\n  function mod(a, b) {\n    var mod = a % b | 0;\n    return mod >= 0 ? mod : mod + b | 0;\n  }\n  function Companion_6() {\n    Companion_instance_6 = this;\n    this.k4_1 = new IntRange(1, 0);\n  }\n  var Companion_instance_6;\n  function Companion_getInstance_6() {\n    if (Companion_instance_6 == null)\n      new Companion_6();\n    return Companion_instance_6;\n  }\n  function IntRange(start, endInclusive) {\n    Companion_getInstance_6();\n    IntProgression.call(this, start, endInclusive, 1);\n  }\n  protoOf(IntRange).m4 = function () {\n    return this.n4_1;\n  };\n  protoOf(IntRange).l4 = function () {\n    return this.o4_1;\n  };\n  protoOf(IntRange).l = function () {\n    return this.n4_1 > this.o4_1;\n  };\n  protoOf(IntRange).equals = function (other) {\n    var tmp;\n    if (other instanceof IntRange) {\n      tmp = (this.l() ? other.l() : false) ? true : this.n4_1 === other.n4_1 ? this.o4_1 === other.o4_1 : false;\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(IntRange).hashCode = function () {\n    return this.l() ? -1 : imul(31, this.n4_1) + this.o4_1 | 0;\n  };\n  protoOf(IntRange).toString = function () {\n    return '' + this.n4_1 + '..' + this.o4_1;\n  };\n  function IntProgressionIterator(first, last, step) {\n    IntIterator.call(this);\n    this.d6_1 = step;\n    this.e6_1 = last;\n    this.f6_1 = this.d6_1 > 0 ? first <= last : first >= last;\n    this.g6_1 = this.f6_1 ? first : this.e6_1;\n  }\n  protoOf(IntProgressionIterator).q1 = function () {\n    return this.f6_1;\n  };\n  protoOf(IntProgressionIterator).x5 = function () {\n    var value = this.g6_1;\n    if (value === this.e6_1) {\n      if (!this.f6_1)\n        throw NoSuchElementException_init_$Create$();\n      this.f6_1 = false;\n    } else {\n      this.g6_1 = this.g6_1 + this.d6_1 | 0;\n    }\n    return value;\n  };\n  function Companion_7() {\n  }\n  protoOf(Companion_7).q4 = function (rangeStart, rangeEnd, step) {\n    return new IntProgression(rangeStart, rangeEnd, step);\n  };\n  var Companion_instance_7;\n  function Companion_getInstance_7() {\n    return Companion_instance_7;\n  }\n  function IntProgression(start, endInclusive, step) {\n    if (step === 0)\n      throw IllegalArgumentException_init_$Create$_0('Step must be non-zero.');\n    if (step === IntCompanionObject_instance.MIN_VALUE)\n      throw IllegalArgumentException_init_$Create$_0('Step must be greater than Int.MIN_VALUE to avoid overflow on negation.');\n    this.n4_1 = start;\n    this.o4_1 = getProgressionLastElement(start, endInclusive, step);\n    this.p4_1 = step;\n  }\n  protoOf(IntProgression).i = function () {\n    return new IntProgressionIterator(this.n4_1, this.o4_1, this.p4_1);\n  };\n  protoOf(IntProgression).l = function () {\n    return this.p4_1 > 0 ? this.n4_1 > this.o4_1 : this.n4_1 < this.o4_1;\n  };\n  protoOf(IntProgression).equals = function (other) {\n    var tmp;\n    if (other instanceof IntProgression) {\n      tmp = (this.l() ? other.l() : false) ? true : (this.n4_1 === other.n4_1 ? this.o4_1 === other.o4_1 : false) ? this.p4_1 === other.p4_1 : false;\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(IntProgression).hashCode = function () {\n    return this.l() ? -1 : imul(31, imul(31, this.n4_1) + this.o4_1 | 0) + this.p4_1 | 0;\n  };\n  protoOf(IntProgression).toString = function () {\n    return this.p4_1 > 0 ? '' + this.n4_1 + '..' + this.o4_1 + ' step ' + this.p4_1 : '' + this.n4_1 + ' downTo ' + this.o4_1 + ' step ' + (-this.p4_1 | 0);\n  };\n  function ClosedRange() {\n  }\n  function ClosedFloatingPointRange() {\n  }\n  function checkStepIsPositive(isPositive, step) {\n    if (!isPositive)\n      throw IllegalArgumentException_init_$Create$_0('Step must be positive, was: ' + toString_1(step) + '.');\n  }\n  function appendElement(_this__u8e3s4, element, transform) {\n    if (!(transform == null)) {\n      _this__u8e3s4.u3(transform(element));\n    } else {\n      if (element == null ? true : isCharSequence(element)) {\n        _this__u8e3s4.u3(element);\n      } else {\n        if (element instanceof Char) {\n          _this__u8e3s4.g2(element.h6_1);\n        } else {\n          _this__u8e3s4.u3(toString_0(element));\n        }\n      }\n    }\n  }\n  function toIntOrNull(_this__u8e3s4, radix) {\n    checkRadix(radix);\n    var length = _this__u8e3s4.length;\n    if (length === 0)\n      return null;\n    var start;\n    var isNegative;\n    var limit;\n    var firstChar = charSequenceGet(_this__u8e3s4, 0);\n    if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n      if (length === 1)\n        return null;\n      start = 1;\n      if (firstChar === _Char___init__impl__6a9atx(45)) {\n        isNegative = true;\n        limit = IntCompanionObject_instance.MIN_VALUE;\n      } else if (firstChar === _Char___init__impl__6a9atx(43)) {\n        isNegative = false;\n        limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n      } else\n        return null;\n    } else {\n      start = 0;\n      isNegative = false;\n      limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n    }\n    var limitForMaxRadix = (-IntCompanionObject_instance.MAX_VALUE | 0) / 36 | 0;\n    var limitBeforeMul = limitForMaxRadix;\n    var result = 0;\n    var inductionVariable = start;\n    if (inductionVariable < length)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n        if (digit < 0)\n          return null;\n        if (result < limitBeforeMul) {\n          if (limitBeforeMul === limitForMaxRadix) {\n            limitBeforeMul = limit / radix | 0;\n            if (result < limitBeforeMul) {\n              return null;\n            }\n          } else {\n            return null;\n          }\n        }\n        result = imul(result, radix);\n        if (result < (limit + digit | 0))\n          return null;\n        result = result - digit | 0;\n      }\n       while (inductionVariable < length);\n    return isNegative ? result : -result | 0;\n  }\n  function numberFormatError(input) {\n    throw NumberFormatException_init_$Create$_0(\"Invalid number format: '\" + input + \"'\");\n  }\n  function toIntOrNull_0(_this__u8e3s4) {\n    return toIntOrNull(_this__u8e3s4, 10);\n  }\n  function get_lastIndex(_this__u8e3s4) {\n    return charSequenceLength(_this__u8e3s4) - 1 | 0;\n  }\n  function substring(_this__u8e3s4, range) {\n    // Inline function 'kotlin.text.substring' call\n    var startIndex = range.m4();\n    var endIndex = range.l4() + 1 | 0;\n    // Inline function 'kotlin.js.asDynamic' call\n    return _this__u8e3s4.substring(startIndex, endIndex);\n  }\n  function _UShort___init__impl__jigrne(data) {\n    return data;\n  }\n  function _UShort___get_data__impl__g0245($this) {\n    return $this;\n  }\n  function QRCode$Companion$EMPTY_FN$lambda($this$null, _anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd, _anonymous_parameter_2__qggqfi) {\n    return Unit_instance;\n  }\n  function Companion_8() {\n    Companion_instance_8 = this;\n    var tmp = this;\n    tmp.i6_1 = QRCode$Companion$EMPTY_FN$lambda;\n    this.DEFAULT_SQUARE_SIZE = 25;\n  }\n  protoOf(Companion_8).j6 = function () {\n    return this.i6_1;\n  };\n  protoOf(Companion_8).k6 = function () {\n    return this.DEFAULT_SQUARE_SIZE;\n  };\n  protoOf(Companion_8).ofSquares = function () {\n    return new QRCodeBuilder(QRCodeShapesEnum_SQUARE_getInstance());\n  };\n  protoOf(Companion_8).ofCircles = function () {\n    return new QRCodeBuilder(QRCodeShapesEnum_CIRCLE_getInstance());\n  };\n  protoOf(Companion_8).ofRoundedSquares = function () {\n    return new QRCodeBuilder(QRCodeShapesEnum_ROUNDED_SQUARE_getInstance());\n  };\n  protoOf(Companion_8).ofCustomShape = function (customShapeFunction) {\n    return new QRCodeBuilder(QRCodeShapesEnum_CUSTOM_getInstance(), customShapeFunction);\n  };\n  var Companion_instance_8;\n  function Companion_getInstance_8() {\n    if (Companion_instance_8 == null)\n      new Companion_8();\n    return Companion_instance_8;\n  }\n  function draw($this, xOffset, yOffset, rawData, canvas) {\n    return $this.qrCodeProcessor.renderShaded($this.squareSize, $this.squareSize, rawData, canvas, QRCode$draw$lambda($this, xOffset, yOffset, canvas));\n  }\n  function QRCode$draw$lambda(this$0, $xOffset, $yOffset, $canvas) {\n    return function (x, y, currentSquare, _anonymous_parameter_3__qggqen) {\n      var tmp0_elvis_lhs = currentSquare.parent;\n      var actualSquare = tmp0_elvis_lhs == null ? currentSquare : tmp0_elvis_lhs;\n      var tmp;\n      if (!actualSquare.rendered) {\n        switch (currentSquare.squareInfo.type.d5_1) {\n          case 0:\n          case 1:\n            this$0.shapeFn.renderControlSquare($xOffset, $yOffset, this$0.colorFn, actualSquare, $canvas, this$0);\n            break;\n          default:\n            this$0.shapeFn.renderSquare($xOffset + x | 0, $yOffset + y | 0, this$0.colorFn, currentSquare, $canvas, this$0);\n            break;\n        }\n        actualSquare.rendered = true;\n        tmp = Unit_instance;\n      }\n      return Unit_instance;\n    };\n  }\n  function QRCode(data, squareSize, colorFn, shapeFn, graphicsFactory, doBefore, doAfter) {\n    Companion_getInstance_8();\n    squareSize = squareSize === VOID ? 25 : squareSize;\n    colorFn = colorFn === VOID ? new DefaultColorFunction() : colorFn;\n    shapeFn = shapeFn === VOID ? new DefaultShapeFunction(squareSize, 0) : shapeFn;\n    graphicsFactory = graphicsFactory === VOID ? new QRCodeGraphicsFactory() : graphicsFactory;\n    doBefore = doBefore === VOID ? Companion_getInstance_8().i6_1 : doBefore;\n    doAfter = doAfter === VOID ? Companion_getInstance_8().i6_1 : doAfter;\n    this.data = data;\n    this.squareSize = squareSize;\n    this.colorFn = colorFn;\n    this.shapeFn = shapeFn;\n    this.graphicsFactory = graphicsFactory;\n    this.l6_1 = doBefore;\n    this.m6_1 = doAfter;\n    this.qrCodeProcessor = new QRCodeProcessor(this.data, ErrorCorrectionLevel_H_getInstance(), VOID, this.graphicsFactory);\n    this.typeNum = coerceAtLeast(Companion_instance_11.typeForDataAndECL(this.data, ErrorCorrectionLevel_H_getInstance()), 6);\n    this.rawData = this.qrCodeProcessor.encode(this.typeNum);\n    this.computedSize = this.qrCodeProcessor.computeImageSizeFromRawData(this.squareSize, this.squareSize, this.rawData);\n    this.graphics = this.graphicsFactory.newGraphicsSquare(this.computedSize);\n  }\n  protoOf(QRCode).n6 = function () {\n    return this.data;\n  };\n  protoOf(QRCode).o6 = function () {\n    return this.squareSize;\n  };\n  protoOf(QRCode).p6 = function () {\n    return this.colorFn;\n  };\n  protoOf(QRCode).q6 = function () {\n    return this.shapeFn;\n  };\n  protoOf(QRCode).r6 = function (_set____db54di) {\n    this.graphicsFactory = _set____db54di;\n  };\n  protoOf(QRCode).s6 = function () {\n    return this.graphicsFactory;\n  };\n  protoOf(QRCode).t6 = function () {\n    return this.qrCodeProcessor;\n  };\n  protoOf(QRCode).u6 = function () {\n    return this.typeNum;\n  };\n  protoOf(QRCode).v6 = function () {\n    return this.rawData;\n  };\n  protoOf(QRCode).w6 = function () {\n    return this.computedSize;\n  };\n  protoOf(QRCode).x6 = function () {\n    return this.graphics;\n  };\n  protoOf(QRCode).y6 = function (qrCodeGraphics, xOffset, yOffset) {\n    this.colorFn.beforeRender(this, qrCodeGraphics);\n    this.shapeFn.beforeRender(this, qrCodeGraphics);\n    this.l6_1(this, qrCodeGraphics, xOffset, yOffset);\n    // Inline function 'kotlin.also' call\n    var this_0 = draw(this, xOffset, yOffset, this.rawData, qrCodeGraphics);\n    // Inline function 'kotlin.contracts.contract' call\n    // Inline function 'qrcode.QRCode.render.<anonymous>' call\n    this.m6_1(this, this_0, xOffset, yOffset);\n    return this_0;\n  };\n  protoOf(QRCode).render = function (qrCodeGraphics, xOffset, yOffset, $super) {\n    qrCodeGraphics = qrCodeGraphics === VOID ? this.graphics : qrCodeGraphics;\n    xOffset = xOffset === VOID ? 0 : xOffset;\n    yOffset = yOffset === VOID ? 0 : yOffset;\n    return this.y6(qrCodeGraphics, xOffset, yOffset);\n  };\n  protoOf(QRCode).z6 = function (format) {\n    return this.render().getBytesForFormat(format);\n  };\n  protoOf(QRCode).renderToBytes = function (format, $super) {\n    format = format === VOID ? 'PNG' : format;\n    return this.z6(format);\n  };\n  protoOf(QRCode).reset = function () {\n    // Inline function 'kotlin.collections.forEach' call\n    var indexedObject = this.rawData;\n    var inductionVariable = 0;\n    var last = indexedObject.length;\n    while (inductionVariable < last) {\n      var element = indexedObject[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      // Inline function 'qrcode.QRCode.reset.<anonymous>' call\n      // Inline function 'kotlin.collections.forEach' call\n      var inductionVariable_0 = 0;\n      var last_0 = element.length;\n      while (inductionVariable_0 < last_0) {\n        var element_0 = element[inductionVariable_0];\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        // Inline function 'qrcode.QRCode.reset.<anonymous>.<anonymous>' call\n        element_0.rendered = false;\n        var tmp0_safe_receiver = element_0.parent;\n        if (tmp0_safe_receiver != null)\n          tmp0_safe_receiver.rendered = false;\n      }\n    }\n    this.graphics.reset();\n  };\n  var QRCodeShapesEnum_SQUARE_instance;\n  var QRCodeShapesEnum_CIRCLE_instance;\n  var QRCodeShapesEnum_ROUNDED_SQUARE_instance;\n  var QRCodeShapesEnum_CUSTOM_instance;\n  function values() {\n    return [QRCodeShapesEnum_SQUARE_getInstance(), QRCodeShapesEnum_CIRCLE_getInstance(), QRCodeShapesEnum_ROUNDED_SQUARE_getInstance(), QRCodeShapesEnum_CUSTOM_getInstance()];\n  }\n  function valueOf(value) {\n    switch (value) {\n      case 'SQUARE':\n        return QRCodeShapesEnum_SQUARE_getInstance();\n      case 'CIRCLE':\n        return QRCodeShapesEnum_CIRCLE_getInstance();\n      case 'ROUNDED_SQUARE':\n        return QRCodeShapesEnum_ROUNDED_SQUARE_getInstance();\n      case 'CUSTOM':\n        return QRCodeShapesEnum_CUSTOM_getInstance();\n      default:\n        QRCodeShapesEnum_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var QRCodeShapesEnum_entriesInitialized;\n  function QRCodeShapesEnum_initEntries() {\n    if (QRCodeShapesEnum_entriesInitialized)\n      return Unit_instance;\n    QRCodeShapesEnum_entriesInitialized = true;\n    QRCodeShapesEnum_SQUARE_instance = new QRCodeShapesEnum('SQUARE', 0);\n    QRCodeShapesEnum_CIRCLE_instance = new QRCodeShapesEnum('CIRCLE', 1);\n    QRCodeShapesEnum_ROUNDED_SQUARE_instance = new QRCodeShapesEnum('ROUNDED_SQUARE', 2);\n    QRCodeShapesEnum_CUSTOM_instance = new QRCodeShapesEnum('CUSTOM', 3);\n  }\n  function QRCodeShapesEnum(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  function innerSpace($this) {\n    // Inline function 'kotlin.takeIf' call\n    var tmp;\n    switch ($this.c7_1.d5_1) {\n      case 0:\n        tmp = 1;\n        break;\n      case 1:\n        tmp = Companion_instance_12.defaultInnerSpace($this.f7_1);\n        break;\n      case 2:\n        tmp = Companion_instance_13.defaultInnerSpace($this.f7_1);\n        break;\n      case 3:\n        tmp = 0;\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    var this_0 = tmp;\n    // Inline function 'kotlin.contracts.contract' call\n    var tmp_0;\n    // Inline function 'qrcode.QRCodeBuilder.innerSpace.<anonymous>' call\n    if (this_0 < $this.f7_1) {\n      tmp_0 = this_0;\n    } else {\n      tmp_0 = null;\n    }\n    var tmp1_elvis_lhs = tmp_0;\n    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n  }\n  function _get_beforeFn__5052ik($this) {\n    return QRCodeBuilder$_get_beforeFn_$lambda_n0dxjk($this);\n  }\n  function _get_afterFn__jaczeb($this) {\n    return QRCodeBuilder$_get_afterFn_$lambda_eq0wxh($this);\n  }\n  function _get_colorFunction__6g154a($this) {\n    var tmp;\n    if ($this.h7_1 == null) {\n      var tmp1_elvis_lhs = $this.e7_1;\n      tmp = tmp1_elvis_lhs == null ? new DefaultColorFunction($this.g7_1, $this.j7_1) : tmp1_elvis_lhs;\n    } else {\n      var tmp2_elvis_lhs = $this.e7_1;\n      tmp = tmp2_elvis_lhs == null ? new LinearGradientColorFunction($this.g7_1, ensureNotNull($this.h7_1), $this.j7_1) : tmp2_elvis_lhs;\n    }\n    return tmp;\n  }\n  function _get_shapeFunction__ousj14($this) {\n    var tmp1_elvis_lhs = $this.d7_1;\n    var tmp;\n    if (tmp1_elvis_lhs == null) {\n      var tmp_0;\n      switch ($this.c7_1.d5_1) {\n        case 0:\n        case 3:\n          tmp_0 = new DefaultShapeFunction($this.f7_1, $this.k7_1);\n          break;\n        case 1:\n          tmp_0 = new CircleShapeFunction($this.f7_1, $this.k7_1);\n          break;\n        case 2:\n          tmp_0 = new RoundSquaresShapeFunction($this.f7_1, $this.l7_1, $this.k7_1);\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp = tmp_0;\n    } else {\n      tmp = tmp1_elvis_lhs;\n    }\n    return tmp;\n  }\n  function QRCodeBuilder$withLogo$lambda($width, $height) {\n    return function ($this$null, _anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd, _anonymous_parameter_2__qggqfi) {\n      var logoX = ($this$null.computedSize - $width | 0) / 2 | 0;\n      var logoY = ($this$null.computedSize - $height | 0) / 2 | 0;\n      var indexedObject = $this$null.rawData;\n      var inductionVariable = 0;\n      var last = indexedObject.length;\n      while (inductionVariable < last) {\n        var element = indexedObject[inductionVariable];\n        inductionVariable = inductionVariable + 1 | 0;\n        // Inline function 'qrcode.QRCodeBuilder.withLogo.<anonymous>.<anonymous>' call\n        // Inline function 'kotlin.collections.forEach' call\n        var inductionVariable_0 = 0;\n        var last_0 = element.length;\n        while (inductionVariable_0 < last_0) {\n          var element_0 = element[inductionVariable_0];\n          inductionVariable_0 = inductionVariable_0 + 1 | 0;\n          // Inline function 'qrcode.QRCodeBuilder.withLogo.<anonymous>.<anonymous>.<anonymous>' call\n          var cellX = element_0.absoluteX($this$null.squareSize) + $this$null.squareSize | 0;\n          var cellY = element_0.absoluteY($this$null.squareSize) + $this$null.squareSize | 0;\n          element_0.rendered = !QRMath_getInstance().rectsIntersect(logoX, logoY, $width, $height, cellX, cellY, $this$null.squareSize, $this$null.squareSize);\n        }\n      }\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$withLogo$lambda_0($width, $height, $logo) {\n    return function ($this$null, canvas, xOffset, yOffset) {\n      var logoX = xOffset + (($this$null.computedSize - $width | 0) / 2 | 0) | 0;\n      var logoY = yOffset + (($this$null.computedSize - $height | 0) / 2 | 0) | 0;\n      canvas.drawImageFromBytes($logo, logoX, logoY);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$withAfterRenderAction$lambda($action) {\n    return function ($this$null, it, _anonymous_parameter_1__qggqgd, _anonymous_parameter_2__qggqfi) {\n      $action($this$null, it);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$withBeforeRenderAction$lambda($action) {\n    return function ($this$null, it, _anonymous_parameter_1__qggqgd, _anonymous_parameter_2__qggqfi) {\n      $action($this$null, it);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$_get_beforeFn_$lambda_n0dxjk(this$0) {\n    return function ($this$null, canvas, xOffset, yOffset) {\n      this$0.n7_1($this$null, canvas, xOffset, yOffset);\n      this$0.p7_1($this$null, canvas, xOffset, yOffset);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$_get_afterFn_$lambda_eq0wxh(this$0) {\n    return function ($this$null, canvas, xOffset, yOffset) {\n      this$0.m7_1($this$null, canvas, xOffset, yOffset);\n      this$0.o7_1($this$null, canvas, xOffset, yOffset);\n      return Unit_instance;\n    };\n  }\n  function QRCodeShapesEnum_SQUARE_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_SQUARE_instance;\n  }\n  function QRCodeShapesEnum_CIRCLE_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_CIRCLE_instance;\n  }\n  function QRCodeShapesEnum_ROUNDED_SQUARE_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_ROUNDED_SQUARE_instance;\n  }\n  function QRCodeShapesEnum_CUSTOM_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_CUSTOM_instance;\n  }\n  function QRCodeBuilder(shape, customShapeFunction) {\n    customShapeFunction = customShapeFunction === VOID ? null : customShapeFunction;\n    this.c7_1 = shape;\n    this.d7_1 = customShapeFunction;\n    this.e7_1 = null;\n    var tmp = this;\n    tmp.f7_1 = 25;\n    var tmp_0 = this;\n    tmp_0.g7_1 = -16777216;\n    this.h7_1 = null;\n    this.i7_1 = true;\n    var tmp_1 = this;\n    tmp_1.j7_1 = -1;\n    this.k7_1 = innerSpace(this);\n    this.l7_1 = Companion_instance_13.defaultRadius(this.f7_1);\n    this.m7_1 = Companion_getInstance_8().i6_1;\n    this.n7_1 = Companion_getInstance_8().i6_1;\n    this.o7_1 = Companion_getInstance_8().i6_1;\n    this.p7_1 = Companion_getInstance_8().i6_1;\n    this.q7_1 = new QRCodeGraphicsFactory();\n  }\n  protoOf(QRCodeBuilder).withSize = function (size) {\n    this.f7_1 = coerceAtLeast(size, 1);\n    return this.withInnerSpacing(innerSpace(this));\n  };\n  protoOf(QRCodeBuilder).withColor = function (color) {\n    this.g7_1 = color;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withBackgroundColor = function (bgColor) {\n    this.j7_1 = bgColor;\n    return this;\n  };\n  protoOf(QRCodeBuilder).r7 = function (startColor, endColor, vertical) {\n    this.g7_1 = startColor;\n    this.h7_1 = endColor;\n    this.i7_1 = vertical;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withGradientColor = function (startColor, endColor, vertical, $super) {\n    vertical = vertical === VOID ? true : vertical;\n    return this.r7(startColor, endColor, vertical);\n  };\n  protoOf(QRCodeBuilder).withRadius = function (radius) {\n    var tmp = this;\n    // Inline function 'kotlin.takeIf' call\n    // Inline function 'kotlin.contracts.contract' call\n    var tmp_0;\n    // Inline function 'qrcode.QRCodeBuilder.withRadius.<anonymous>' call\n    if (radius >= 0) {\n      tmp_0 = radius;\n    } else {\n      tmp_0 = null;\n    }\n    var tmp0_elvis_lhs = tmp_0;\n    tmp.l7_1 = tmp0_elvis_lhs == null ? Companion_instance_13.defaultRadius(this.f7_1) : tmp0_elvis_lhs;\n    return this;\n  };\n  protoOf(QRCodeBuilder).s7 = function (innerSpacing) {\n    var tmp = this;\n    var tmp_0;\n    if (innerSpacing == null) {\n      tmp_0 = null;\n    } else {\n      // Inline function 'kotlin.takeIf' call\n      // Inline function 'kotlin.contracts.contract' call\n      var tmp_1;\n      // Inline function 'qrcode.QRCodeBuilder.withInnerSpacing.<anonymous>' call\n      if (innerSpacing >= 0) {\n        tmp_1 = innerSpacing;\n      } else {\n        tmp_1 = null;\n      }\n      tmp_0 = tmp_1;\n    }\n    var tmp1_elvis_lhs = tmp_0;\n    tmp.k7_1 = tmp1_elvis_lhs == null ? innerSpace(this) : tmp1_elvis_lhs;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withInnerSpacing = function (innerSpacing, $super) {\n    innerSpacing = innerSpacing === VOID ? null : innerSpacing;\n    return this.s7(innerSpacing);\n  };\n  protoOf(QRCodeBuilder).t7 = function (logo, width, height, clearLogoArea) {\n    if (!(logo == null)) {\n      if (clearLogoArea) {\n        var tmp = this;\n        tmp.n7_1 = QRCodeBuilder$withLogo$lambda(width, height);\n      } else {\n        this.n7_1 = Companion_getInstance_8().i6_1;\n      }\n      var tmp_0 = this;\n      tmp_0.m7_1 = QRCodeBuilder$withLogo$lambda_0(width, height, logo);\n    }\n    return this;\n  };\n  protoOf(QRCodeBuilder).withLogo = function (logo, width, height, clearLogoArea, $super) {\n    clearLogoArea = clearLogoArea === VOID ? true : clearLogoArea;\n    return this.t7(logo, width, height, clearLogoArea);\n  };\n  protoOf(QRCodeBuilder).withAfterRenderAction = function (action) {\n    var tmp = this;\n    tmp.o7_1 = QRCodeBuilder$withAfterRenderAction$lambda(action);\n    return this;\n  };\n  protoOf(QRCodeBuilder).withBeforeRenderAction = function (action) {\n    var tmp = this;\n    tmp.p7_1 = QRCodeBuilder$withBeforeRenderAction$lambda(action);\n    return this;\n  };\n  protoOf(QRCodeBuilder).withGraphicsFactory = function (factory) {\n    this.q7_1 = factory;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withCustomColorFunction = function (colorFn) {\n    this.e7_1 = colorFn;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withCustomShapeFunction = function (shapeFn) {\n    this.d7_1 = shapeFn;\n    return this;\n  };\n  protoOf(QRCodeBuilder).build = function (data) {\n    return new QRCode(data, this.f7_1, _get_colorFunction__6g154a(this), _get_shapeFunction__ousj14(this), this.q7_1, _get_beforeFn__5052ik(this), _get_afterFn__jaczeb(this));\n  };\n  function Colors() {\n    this.TRANSPARENT = 0;\n    this.ALICE_BLUE = -984833;\n    this.ANTIQUE_WHITE = -332841;\n    this.AQUA = -16711681;\n    this.AQUAMARINE = -8388652;\n    this.AZURE = -983041;\n    this.BEIGE = -657956;\n    this.BISQUE = -6972;\n    this.BLACK = -16777216;\n    this.BLANCHED_ALMOND = -5171;\n    this.BLUE = -16776961;\n    this.BLUE_VIOLET = -7722014;\n    this.BROWN = -5952982;\n    this.BURLY_WOOD = -2180985;\n    this.CADET_BLUE = -10510688;\n    this.CHARTREUSE = -8388864;\n    this.CHOCOLATE = -2987746;\n    this.CORAL = -32944;\n    this.CORNFLOWER_BLUE = -10185235;\n    this.CORNSILK = -1828;\n    this.CRIMSON = -2354116;\n    this.CYAN = -16711681;\n    this.DARK_BLUE = -16777077;\n    this.DARK_CYAN = -16741493;\n    this.DARK_GOLDEN_ROD = -4684277;\n    this.DARK_GRAY = -5658199;\n    this.DARK_GREY = -5658199;\n    this.DARK_GREEN = -16751616;\n    this.DARK_KHAKI = -4343957;\n    this.DARK_MAGENTA = -7667573;\n    this.DARK_OLIVE_GREEN = -11179217;\n    this.DARK_ORANGE = -29696;\n    this.DARK_ORCHID = -6737204;\n    this.DARK_RED = -7667712;\n    this.DARK_SALMON = -1468806;\n    this.DARK_SEA_GREEN = -7357297;\n    this.DARK_SLATE_BLUE = -12042869;\n    this.DARK_SLATE_GRAY = -13676721;\n    this.DARK_SLATE_GREY = -13676721;\n    this.DARK_TURQUOISE = -16724271;\n    this.DARK_VIOLET = -7077677;\n    this.DEEP_PINK = -60269;\n    this.DEEP_SKY_BLUE = -16728065;\n    this.DIM_GRAY = -9868951;\n    this.DIM_GREY = -9868951;\n    this.DODGER_BLUE = -14774017;\n    this.FIRE_BRICK = -5103070;\n    this.FLORAL_WHITE = -1296;\n    this.FOREST_GREEN = -14513374;\n    this.FUCHSIA = -65281;\n    this.GAINSBORO = -2302756;\n    this.GHOST_WHITE = -460545;\n    this.GOLD = -10496;\n    this.GOLDEN_ROD = -2448096;\n    this.GRAY = -8355712;\n    this.GREY = -8355712;\n    this.GREEN = -16744448;\n    this.GREEN_YELLOW = -5374161;\n    this.HONEY_DEW = -983056;\n    this.HOT_PINK = -38476;\n    this.INDIAN_RED = -3318692;\n    this.INDIGO = -11861886;\n    this.IVORY = -16;\n    this.KHAKI = -989556;\n    this.LAVENDER = -1644806;\n    this.LAVENDER_BLUSH = -3851;\n    this.LAWN_GREEN = -8586240;\n    this.LEMON_CHIFFON = -1331;\n    this.LIGHT_BLUE = -5383962;\n    this.LIGHT_CORAL = -1015680;\n    this.LIGHT_CYAN = -2031617;\n    this.LIGHT_GOLDEN_ROD_YELLOW = -329006;\n    this.LIGHT_GRAY = -2894893;\n    this.LIGHT_GREY = -2894893;\n    this.LIGHT_GREEN = -7278960;\n    this.LIGHT_PINK = -18751;\n    this.LIGHT_SALMON = -24454;\n    this.LIGHT_SEA_GREEN = -14634326;\n    this.LIGHT_SKY_BLUE = -7876870;\n    this.LIGHT_SLATE_GRAY = -8943463;\n    this.LIGHT_SLATE_GREY = -8943463;\n    this.LIGHT_STEEL_BLUE = -5192482;\n    this.LIGHT_YELLOW = -32;\n    this.LIME = -16711936;\n    this.LIME_GREEN = -13447886;\n    this.LINEN = -331546;\n    this.MAGENTA = -65281;\n    this.MAROON = -8388608;\n    this.MEDIUM_AQUA_MARINE = -10039894;\n    this.MEDIUM_BLUE = -16777011;\n    this.MEDIUM_ORCHID = -4565549;\n    this.MEDIUM_PURPLE = -7114533;\n    this.MEDIUM_SEA_GREEN = -12799119;\n    this.MEDIUM_SLATE_BLUE = -8689426;\n    this.MEDIUM_SPRING_GREEN = -16713062;\n    this.MEDIUM_TURQUOISE = -12004916;\n    this.MEDIUM_VIOLET_RED = -3730043;\n    this.MIDNIGHT_BLUE = -15132304;\n    this.MINT_CREAM = -655366;\n    this.MISTY_ROSE = -6943;\n    this.MOCCASIN = -6987;\n    this.NAVAJO_WHITE = -8531;\n    this.NAVY = -16777088;\n    this.OLD_LACE = -133658;\n    this.OLIVE = -8355840;\n    this.OLIVE_DRAB = -9728477;\n    this.ORANGE = -23296;\n    this.ORANGE_RED = -47872;\n    this.ORCHID = -2461482;\n    this.PALE_GOLDEN_ROD = -1120086;\n    this.PALE_GREEN = -6751336;\n    this.PALE_TURQUOISE = -5247250;\n    this.PALE_VIOLET_RED = -2396013;\n    this.PAPAYA_WHIP = -4139;\n    this.PEACH_PUFF = -9543;\n    this.PERU = -3308225;\n    this.PINK = -16181;\n    this.PLUM = -2252579;\n    this.POWDER_BLUE = -5185306;\n    this.PURPLE = -8388480;\n    this.REBECCA_PURPLE = -10079335;\n    this.RED = -65536;\n    this.ROSY_BROWN = -4419697;\n    this.ROYAL_BLUE = -12490271;\n    this.SADDLE_BROWN = -7650029;\n    this.SALMON = -360334;\n    this.SANDY_BROWN = -744352;\n    this.SEA_GREEN = -13726889;\n    this.SEA_SHELL = -2578;\n    this.SIENNA = -6270419;\n    this.SILVER = -4144960;\n    this.SKY_BLUE = -7876885;\n    this.SLATE_BLUE = -9807155;\n    this.SLATE_GRAY = -9404272;\n    this.SLATE_GREY = -9404272;\n    this.SNOW = -1286;\n    this.SPRING_GREEN = -16711809;\n    this.STEEL_BLUE = -12156236;\n    this.TAN = -2968436;\n    this.TEAL = -16744320;\n    this.THISTLE = -2572328;\n    this.TOMATO = -40121;\n    this.TURQUOISE = -12525360;\n    this.VIOLET = -1146130;\n    this.WHEAT = -663885;\n    this.WHITE = -1;\n    this.WHITE_SMOKE = -657931;\n    this.YELLOW = -256;\n    this.YELLOW_GREEN = -6632142;\n  }\n  protoOf(Colors).css = function (str) {\n    return toInt(substring(str, numberRangeToNumber(1, 6)), 16) | -16777216;\n  };\n  protoOf(Colors).u7 = function (r, g, b, a) {\n    return (coerceIn(a, numberRangeToNumber(0, 255)) & 255) << 24 | (coerceIn(r, numberRangeToNumber(0, 255)) & 255) << 16 | (coerceIn(g, numberRangeToNumber(0, 255)) & 255) << 8 | (coerceIn(b, numberRangeToNumber(0, 255)) & 255) << 0;\n  };\n  protoOf(Colors).rgba = function (r, g, b, a, $super) {\n    a = a === VOID ? 255 : a;\n    return this.u7(r, g, b, a);\n  };\n  protoOf(Colors).getRGBA = function (color) {\n    // Inline function 'kotlin.intArrayOf' call\n    return new Int32Array([color >> 16 & 255, color >> 8 & 255, color >> 0 & 255, color >> 24 & 255]);\n  };\n  protoOf(Colors).v7 = function (color, maxValue) {\n    // Inline function 'kotlin.doubleArrayOf' call\n    return new Float64Array([(color >> 16 & 255) / maxValue, (color >> 8 & 255) / maxValue, (color >> 0 & 255) / maxValue, (color >> 24 & 255) / maxValue]);\n  };\n  protoOf(Colors).getRGBAPercentages = function (color, maxValue, $super) {\n    maxValue = maxValue === VOID ? 255.0 : maxValue;\n    return this.v7(color, maxValue);\n  };\n  protoOf(Colors).withAlpha = function (color, alpha) {\n    return (coerceIn(alpha, numberRangeToNumber(0, 255)) << 24) + (color & 16777215) | 0;\n  };\n  protoOf(Colors).w7 = function () {\n    return this.TRANSPARENT;\n  };\n  protoOf(Colors).x7 = function () {\n    return this.ALICE_BLUE;\n  };\n  protoOf(Colors).y7 = function () {\n    return this.ANTIQUE_WHITE;\n  };\n  protoOf(Colors).z7 = function () {\n    return this.AQUA;\n  };\n  protoOf(Colors).a8 = function () {\n    return this.AQUAMARINE;\n  };\n  protoOf(Colors).b8 = function () {\n    return this.AZURE;\n  };\n  protoOf(Colors).c8 = function () {\n    return this.BEIGE;\n  };\n  protoOf(Colors).d8 = function () {\n    return this.BISQUE;\n  };\n  protoOf(Colors).e8 = function () {\n    return this.BLACK;\n  };\n  protoOf(Colors).f8 = function () {\n    return this.BLANCHED_ALMOND;\n  };\n  protoOf(Colors).g8 = function () {\n    return this.BLUE;\n  };\n  protoOf(Colors).h8 = function () {\n    return this.BLUE_VIOLET;\n  };\n  protoOf(Colors).i8 = function () {\n    return this.BROWN;\n  };\n  protoOf(Colors).j8 = function () {\n    return this.BURLY_WOOD;\n  };\n  protoOf(Colors).k8 = function () {\n    return this.CADET_BLUE;\n  };\n  protoOf(Colors).l8 = function () {\n    return this.CHARTREUSE;\n  };\n  protoOf(Colors).m8 = function () {\n    return this.CHOCOLATE;\n  };\n  protoOf(Colors).n8 = function () {\n    return this.CORAL;\n  };\n  protoOf(Colors).o8 = function () {\n    return this.CORNFLOWER_BLUE;\n  };\n  protoOf(Colors).p8 = function () {\n    return this.CORNSILK;\n  };\n  protoOf(Colors).q8 = function () {\n    return this.CRIMSON;\n  };\n  protoOf(Colors).r8 = function () {\n    return this.CYAN;\n  };\n  protoOf(Colors).s8 = function () {\n    return this.DARK_BLUE;\n  };\n  protoOf(Colors).t8 = function () {\n    return this.DARK_CYAN;\n  };\n  protoOf(Colors).u8 = function () {\n    return this.DARK_GOLDEN_ROD;\n  };\n  protoOf(Colors).v8 = function () {\n    return this.DARK_GRAY;\n  };\n  protoOf(Colors).w8 = function () {\n    return this.DARK_GREY;\n  };\n  protoOf(Colors).x8 = function () {\n    return this.DARK_GREEN;\n  };\n  protoOf(Colors).y8 = function () {\n    return this.DARK_KHAKI;\n  };\n  protoOf(Colors).z8 = function () {\n    return this.DARK_MAGENTA;\n  };\n  protoOf(Colors).a9 = function () {\n    return this.DARK_OLIVE_GREEN;\n  };\n  protoOf(Colors).b9 = function () {\n    return this.DARK_ORANGE;\n  };\n  protoOf(Colors).c9 = function () {\n    return this.DARK_ORCHID;\n  };\n  protoOf(Colors).d9 = function () {\n    return this.DARK_RED;\n  };\n  protoOf(Colors).e9 = function () {\n    return this.DARK_SALMON;\n  };\n  protoOf(Colors).f9 = function () {\n    return this.DARK_SEA_GREEN;\n  };\n  protoOf(Colors).g9 = function () {\n    return this.DARK_SLATE_BLUE;\n  };\n  protoOf(Colors).h9 = function () {\n    return this.DARK_SLATE_GRAY;\n  };\n  protoOf(Colors).i9 = function () {\n    return this.DARK_SLATE_GREY;\n  };\n  protoOf(Colors).j9 = function () {\n    return this.DARK_TURQUOISE;\n  };\n  protoOf(Colors).k9 = function () {\n    return this.DARK_VIOLET;\n  };\n  protoOf(Colors).l9 = function () {\n    return this.DEEP_PINK;\n  };\n  protoOf(Colors).m9 = function () {\n    return this.DEEP_SKY_BLUE;\n  };\n  protoOf(Colors).n9 = function () {\n    return this.DIM_GRAY;\n  };\n  protoOf(Colors).o9 = function () {\n    return this.DIM_GREY;\n  };\n  protoOf(Colors).p9 = function () {\n    return this.DODGER_BLUE;\n  };\n  protoOf(Colors).q9 = function () {\n    return this.FIRE_BRICK;\n  };\n  protoOf(Colors).r9 = function () {\n    return this.FLORAL_WHITE;\n  };\n  protoOf(Colors).s9 = function () {\n    return this.FOREST_GREEN;\n  };\n  protoOf(Colors).t9 = function () {\n    return this.FUCHSIA;\n  };\n  protoOf(Colors).u9 = function () {\n    return this.GAINSBORO;\n  };\n  protoOf(Colors).v9 = function () {\n    return this.GHOST_WHITE;\n  };\n  protoOf(Colors).w9 = function () {\n    return this.GOLD;\n  };\n  protoOf(Colors).x9 = function () {\n    return this.GOLDEN_ROD;\n  };\n  protoOf(Colors).y9 = function () {\n    return this.GRAY;\n  };\n  protoOf(Colors).z9 = function () {\n    return this.GREY;\n  };\n  protoOf(Colors).aa = function () {\n    return this.GREEN;\n  };\n  protoOf(Colors).ba = function () {\n    return this.GREEN_YELLOW;\n  };\n  protoOf(Colors).ca = function () {\n    return this.HONEY_DEW;\n  };\n  protoOf(Colors).da = function () {\n    return this.HOT_PINK;\n  };\n  protoOf(Colors).ea = function () {\n    return this.INDIAN_RED;\n  };\n  protoOf(Colors).fa = function () {\n    return this.INDIGO;\n  };\n  protoOf(Colors).ga = function () {\n    return this.IVORY;\n  };\n  protoOf(Colors).ha = function () {\n    return this.KHAKI;\n  };\n  protoOf(Colors).ia = function () {\n    return this.LAVENDER;\n  };\n  protoOf(Colors).ja = function () {\n    return this.LAVENDER_BLUSH;\n  };\n  protoOf(Colors).ka = function () {\n    return this.LAWN_GREEN;\n  };\n  protoOf(Colors).la = function () {\n    return this.LEMON_CHIFFON;\n  };\n  protoOf(Colors).ma = function () {\n    return this.LIGHT_BLUE;\n  };\n  protoOf(Colors).na = function () {\n    return this.LIGHT_CORAL;\n  };\n  protoOf(Colors).oa = function () {\n    return this.LIGHT_CYAN;\n  };\n  protoOf(Colors).pa = function () {\n    return this.LIGHT_GOLDEN_ROD_YELLOW;\n  };\n  protoOf(Colors).qa = function () {\n    return this.LIGHT_GRAY;\n  };\n  protoOf(Colors).ra = function () {\n    return this.LIGHT_GREY;\n  };\n  protoOf(Colors).sa = function () {\n    return this.LIGHT_GREEN;\n  };\n  protoOf(Colors).ta = function () {\n    return this.LIGHT_PINK;\n  };\n  protoOf(Colors).ua = function () {\n    return this.LIGHT_SALMON;\n  };\n  protoOf(Colors).va = function () {\n    return this.LIGHT_SEA_GREEN;\n  };\n  protoOf(Colors).wa = function () {\n    return this.LIGHT_SKY_BLUE;\n  };\n  protoOf(Colors).xa = function () {\n    return this.LIGHT_SLATE_GRAY;\n  };\n  protoOf(Colors).ya = function () {\n    return this.LIGHT_SLATE_GREY;\n  };\n  protoOf(Colors).za = function () {\n    return this.LIGHT_STEEL_BLUE;\n  };\n  protoOf(Colors).ab = function () {\n    return this.LIGHT_YELLOW;\n  };\n  protoOf(Colors).bb = function () {\n    return this.LIME;\n  };\n  protoOf(Colors).cb = function () {\n    return this.LIME_GREEN;\n  };\n  protoOf(Colors).db = function () {\n    return this.LINEN;\n  };\n  protoOf(Colors).eb = function () {\n    return this.MAGENTA;\n  };\n  protoOf(Colors).fb = function () {\n    return this.MAROON;\n  };\n  protoOf(Colors).gb = function () {\n    return this.MEDIUM_AQUA_MARINE;\n  };\n  protoOf(Colors).hb = function () {\n    return this.MEDIUM_BLUE;\n  };\n  protoOf(Colors).ib = function () {\n    return this.MEDIUM_ORCHID;\n  };\n  protoOf(Colors).jb = function () {\n    return this.MEDIUM_PURPLE;\n  };\n  protoOf(Colors).kb = function () {\n    return this.MEDIUM_SEA_GREEN;\n  };\n  protoOf(Colors).lb = function () {\n    return this.MEDIUM_SLATE_BLUE;\n  };\n  protoOf(Colors).mb = function () {\n    return this.MEDIUM_SPRING_GREEN;\n  };\n  protoOf(Colors).nb = function () {\n    return this.MEDIUM_TURQUOISE;\n  };\n  protoOf(Colors).ob = function () {\n    return this.MEDIUM_VIOLET_RED;\n  };\n  protoOf(Colors).pb = function () {\n    return this.MIDNIGHT_BLUE;\n  };\n  protoOf(Colors).qb = function () {\n    return this.MINT_CREAM;\n  };\n  protoOf(Colors).rb = function () {\n    return this.MISTY_ROSE;\n  };\n  protoOf(Colors).sb = function () {\n    return this.MOCCASIN;\n  };\n  protoOf(Colors).tb = function () {\n    return this.NAVAJO_WHITE;\n  };\n  protoOf(Colors).ub = function () {\n    return this.NAVY;\n  };\n  protoOf(Colors).vb = function () {\n    return this.OLD_LACE;\n  };\n  protoOf(Colors).wb = function () {\n    return this.OLIVE;\n  };\n  protoOf(Colors).xb = function () {\n    return this.OLIVE_DRAB;\n  };\n  protoOf(Colors).yb = function () {\n    return this.ORANGE;\n  };\n  protoOf(Colors).zb = function () {\n    return this.ORANGE_RED;\n  };\n  protoOf(Colors).ac = function () {\n    return this.ORCHID;\n  };\n  protoOf(Colors).bc = function () {\n    return this.PALE_GOLDEN_ROD;\n  };\n  protoOf(Colors).cc = function () {\n    return this.PALE_GREEN;\n  };\n  protoOf(Colors).dc = function () {\n    return this.PALE_TURQUOISE;\n  };\n  protoOf(Colors).ec = function () {\n    return this.PALE_VIOLET_RED;\n  };\n  protoOf(Colors).fc = function () {\n    return this.PAPAYA_WHIP;\n  };\n  protoOf(Colors).gc = function () {\n    return this.PEACH_PUFF;\n  };\n  protoOf(Colors).hc = function () {\n    return this.PERU;\n  };\n  protoOf(Colors).ic = function () {\n    return this.PINK;\n  };\n  protoOf(Colors).jc = function () {\n    return this.PLUM;\n  };\n  protoOf(Colors).kc = function () {\n    return this.POWDER_BLUE;\n  };\n  protoOf(Colors).lc = function () {\n    return this.PURPLE;\n  };\n  protoOf(Colors).mc = function () {\n    return this.REBECCA_PURPLE;\n  };\n  protoOf(Colors).nc = function () {\n    return this.RED;\n  };\n  protoOf(Colors).oc = function () {\n    return this.ROSY_BROWN;\n  };\n  protoOf(Colors).pc = function () {\n    return this.ROYAL_BLUE;\n  };\n  protoOf(Colors).qc = function () {\n    return this.SADDLE_BROWN;\n  };\n  protoOf(Colors).rc = function () {\n    return this.SALMON;\n  };\n  protoOf(Colors).sc = function () {\n    return this.SANDY_BROWN;\n  };\n  protoOf(Colors).tc = function () {\n    return this.SEA_GREEN;\n  };\n  protoOf(Colors).uc = function () {\n    return this.SEA_SHELL;\n  };\n  protoOf(Colors).vc = function () {\n    return this.SIENNA;\n  };\n  protoOf(Colors).wc = function () {\n    return this.SILVER;\n  };\n  protoOf(Colors).xc = function () {\n    return this.SKY_BLUE;\n  };\n  protoOf(Colors).yc = function () {\n    return this.SLATE_BLUE;\n  };\n  protoOf(Colors).zc = function () {\n    return this.SLATE_GRAY;\n  };\n  protoOf(Colors).ad = function () {\n    return this.SLATE_GREY;\n  };\n  protoOf(Colors).bd = function () {\n    return this.SNOW;\n  };\n  protoOf(Colors).cd = function () {\n    return this.SPRING_GREEN;\n  };\n  protoOf(Colors).dd = function () {\n    return this.STEEL_BLUE;\n  };\n  protoOf(Colors).ed = function () {\n    return this.TAN;\n  };\n  protoOf(Colors).fd = function () {\n    return this.TEAL;\n  };\n  protoOf(Colors).gd = function () {\n    return this.THISTLE;\n  };\n  protoOf(Colors).hd = function () {\n    return this.TOMATO;\n  };\n  protoOf(Colors).id = function () {\n    return this.TURQUOISE;\n  };\n  protoOf(Colors).jd = function () {\n    return this.VIOLET;\n  };\n  protoOf(Colors).kd = function () {\n    return this.WHEAT;\n  };\n  protoOf(Colors).ld = function () {\n    return this.WHITE;\n  };\n  protoOf(Colors).md = function () {\n    return this.WHITE_SMOKE;\n  };\n  protoOf(Colors).nd = function () {\n    return this.YELLOW;\n  };\n  protoOf(Colors).od = function () {\n    return this.YELLOW_GREEN;\n  };\n  var Colors_instance;\n  function Colors_getInstance() {\n    return Colors_instance;\n  }\n  function DefaultColorFunction(foreground, background) {\n    var tmp;\n    if (foreground === VOID) {\n      tmp = -16777216;\n    } else {\n      tmp = foreground;\n    }\n    foreground = tmp;\n    var tmp_0;\n    if (background === VOID) {\n      tmp_0 = -1;\n    } else {\n      tmp_0 = background;\n    }\n    background = tmp_0;\n    this.pd_1 = foreground;\n    this.qd_1 = background;\n  }\n  protoOf(DefaultColorFunction).fg = function (row, col, qrCode, qrCodeGraphics) {\n    return this.pd_1;\n  };\n  protoOf(DefaultColorFunction).bg = function (row, col, qrCode, qrCodeGraphics) {\n    return this.qd_1;\n  };\n  protoOf(DefaultColorFunction).margin = function (row, col, qrCode, qrCodeGraphics) {\n    return this.qd_1;\n  };\n  function LinearGradientColorFunction(startForegroundColor, endForegroundColor, backgroundColor, vertical) {\n    var tmp;\n    if (backgroundColor === VOID) {\n      tmp = -1;\n    } else {\n      tmp = backgroundColor;\n    }\n    backgroundColor = tmp;\n    vertical = vertical === VOID ? true : vertical;\n    this.startForegroundColor = startForegroundColor;\n    this.endForegroundColor = endForegroundColor;\n    this.backgroundColor = backgroundColor;\n    this.vertical = vertical;\n    this.rd_1 = Colors_instance.getRGBA(this.startForegroundColor);\n    this.sd_1 = Colors_instance.getRGBA(this.endForegroundColor);\n  }\n  protoOf(LinearGradientColorFunction).td = function () {\n    return this.startForegroundColor;\n  };\n  protoOf(LinearGradientColorFunction).ud = function () {\n    return this.endForegroundColor;\n  };\n  protoOf(LinearGradientColorFunction).vd = function () {\n    return this.backgroundColor;\n  };\n  protoOf(LinearGradientColorFunction).wd = function (_set____db54di) {\n    this.vertical = _set____db54di;\n  };\n  protoOf(LinearGradientColorFunction).xd = function () {\n    return this.vertical;\n  };\n  protoOf(LinearGradientColorFunction).fg = function (row, col, qrCode, qrCodeGraphics) {\n    var tmp;\n    if (this.vertical) {\n      tmp = row;\n    } else {\n      tmp = col;\n    }\n    var pct = tmp / qrCode.rawData.length;\n    var r = this.rd_1[0] * (1 - pct) + this.sd_1[0] * pct;\n    var g = this.rd_1[1] * (1 - pct) + this.sd_1[1] * pct;\n    var b = this.rd_1[2] * (1 - pct) + this.sd_1[2] * pct;\n    return Colors_instance.rgba(coerceIn(roundToInt(r), numberRangeToNumber(0, 255)), coerceIn(roundToInt(g), numberRangeToNumber(0, 255)), coerceIn(roundToInt(b), numberRangeToNumber(0, 255)), 255);\n  };\n  protoOf(LinearGradientColorFunction).bg = function (row, col, qrCode, qrCodeGraphics) {\n    return this.backgroundColor;\n  };\n  protoOf(LinearGradientColorFunction).margin = function (row, col, qrCode, qrCodeGraphics) {\n    return this.backgroundColor;\n  };\n  function QRCodeColorFunction() {\n  }\n  function get($this, index) {\n    return (($this.buffer[index / 8 | 0] >>> (7 - (index % 8 | 0) | 0) | 0) & 1) === 1;\n  }\n  function BitBuffer() {\n    this.yd_1 = 32;\n    this.buffer = new Int32Array(this.yd_1);\n    this.lengthInBits = 0;\n  }\n  protoOf(BitBuffer).put = function (num, length) {\n    var inductionVariable = 0;\n    if (inductionVariable < length)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        this.putBit(((num >>> ((length - i | 0) - 1 | 0) | 0) & 1) === 1);\n      }\n       while (inductionVariable < length);\n  };\n  protoOf(BitBuffer).putBit = function (bit) {\n    if (this.lengthInBits === imul(this.buffer.length, 8)) {\n      this.buffer = copyOf(this.buffer, this.buffer.length + this.yd_1 | 0);\n    }\n    if (bit) {\n      this.buffer[this.lengthInBits / 8 | 0] = this.buffer[this.lengthInBits / 8 | 0] | (128 >>> (this.lengthInBits % 8 | 0) | 0);\n    }\n    this.lengthInBits = this.lengthInBits + 1 | 0;\n  };\n  protoOf(BitBuffer).toString = function () {\n    var buffer = StringBuilder_init_$Create$_0();\n    var inductionVariable = 0;\n    var last = this.lengthInBits;\n    if (inductionVariable < last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        buffer.g2(get(this, i) ? _Char___init__impl__6a9atx(49) : _Char___init__impl__6a9atx(48));\n      }\n       while (inductionVariable < last);\n    return buffer.toString();\n  };\n  function arraycopy($this, from, fromPos, to, toPos, length) {\n    var inductionVariable = 0;\n    if (inductionVariable < length)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        to[toPos + i | 0] = from[fromPos + i | 0];\n      }\n       while (inductionVariable < length);\n  }\n  function Polynomial(num, shift) {\n    shift = shift === VOID ? 0 : shift;\n    var tmp$ret$1;\n    $l$block: {\n      // Inline function 'kotlin.collections.indexOfFirst' call\n      var inductionVariable = 0;\n      var last = num.length - 1 | 0;\n      if (inductionVariable <= last)\n        do {\n          var index = inductionVariable;\n          inductionVariable = inductionVariable + 1 | 0;\n          // Inline function 'qrcode.internals.Polynomial.<anonymous>' call\n          if (!(num[index] === 0)) {\n            tmp$ret$1 = index;\n            break $l$block;\n          }\n        }\n         while (inductionVariable <= last);\n      tmp$ret$1 = -1;\n    }\n    var offset = coerceAtLeast(tmp$ret$1, 0);\n    var tmp = this;\n    var tmp_0 = 0;\n    var tmp_1 = (num.length - offset | 0) + shift | 0;\n    var tmp_2 = new Int32Array(tmp_1);\n    while (tmp_0 < tmp_1) {\n      tmp_2[tmp_0] = 0;\n      tmp_0 = tmp_0 + 1 | 0;\n    }\n    tmp.data = tmp_2;\n    arraycopy(this, num, offset, this.data, 0, num.length - offset | 0);\n  }\n  protoOf(Polynomial).get = function (i) {\n    return this.data[i];\n  };\n  protoOf(Polynomial).len = function () {\n    return this.data.length;\n  };\n  protoOf(Polynomial).multiply = function (other) {\n    // Inline function 'kotlin.let' call\n    var tmp = 0;\n    var tmp_0 = (this.len() + other.len() | 0) - 1 | 0;\n    var tmp_1 = new Int32Array(tmp_0);\n    while (tmp < tmp_0) {\n      tmp_1[tmp] = 0;\n      tmp = tmp + 1 | 0;\n    }\n    // Inline function 'kotlin.contracts.contract' call\n    // Inline function 'qrcode.internals.Polynomial.multiply.<anonymous>' call\n    var inductionVariable = 0;\n    var last = this.len();\n    if (inductionVariable < last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var inductionVariable_0 = 0;\n        var last_0 = other.len();\n        if (inductionVariable_0 < last_0)\n          do {\n            var j = inductionVariable_0;\n            inductionVariable_0 = inductionVariable_0 + 1 | 0;\n            tmp_1[i + j | 0] = tmp_1[i + j | 0] ^ QRMath_getInstance().gexp(QRMath_getInstance().glog(this.get(i)) + QRMath_getInstance().glog(other.get(j)) | 0);\n          }\n           while (inductionVariable_0 < last_0);\n      }\n       while (inductionVariable < last);\n    return new Polynomial(tmp_1);\n  };\n  protoOf(Polynomial).mod = function (other) {\n    var tmp;\n    if ((this.len() - other.len() | 0) < 0) {\n      tmp = this;\n    } else {\n      var ratio = QRMath_getInstance().glog(this.get(0)) - QRMath_getInstance().glog(other.get(0)) | 0;\n      // Inline function 'kotlin.collections.copyOf' call\n      // Inline function 'kotlin.js.asDynamic' call\n      var result = this.data.slice();\n      // Inline function 'kotlin.collections.forEachIndexed' call\n      var index = 0;\n      var indexedObject = other.data;\n      var inductionVariable = 0;\n      var last = indexedObject.length;\n      while (inductionVariable < last) {\n        var item = indexedObject[inductionVariable];\n        inductionVariable = inductionVariable + 1 | 0;\n        // Inline function 'qrcode.internals.Polynomial.mod.<anonymous>' call\n        var tmp1 = index;\n        index = tmp1 + 1 | 0;\n        result[tmp1] = result[tmp1] ^ QRMath_getInstance().gexp(QRMath_getInstance().glog(item) + ratio | 0);\n      }\n      tmp = (new Polynomial(result)).mod(other);\n    }\n    return tmp;\n  };\n  function isInsideModules($this, row, rowOffset, col, colOffset, modulesSize) {\n    var tmp;\n    var containsArg = row + rowOffset | 0;\n    if (0 <= containsArg ? containsArg < modulesSize : false) {\n      var containsArg_0 = col + colOffset | 0;\n      tmp = 0 <= containsArg_0 ? containsArg_0 < modulesSize : false;\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  }\n  function isTopBottomRowSquare($this, row, col, probeSize) {\n    return (0 <= col ? col < probeSize : false) ? row === 0 ? true : row === (probeSize - 1 | 0) : false;\n  }\n  function isLeftRightColSquare($this, row, col, probeSize) {\n    return (0 <= row ? row < probeSize : false) ? col === 0 ? true : col === (probeSize - 1 | 0) : false;\n  }\n  function isMidSquare($this, row, col, probeSize) {\n    return ((2 <= row ? row < (probeSize - 2 | 0) : false) ? 2 <= col : false) ? col <= (probeSize - 3 | 0) : false;\n  }\n  function findSquareRegion($this, row, col, probeSize) {\n    var tmp;\n    if (row === 0) {\n      tmp = col === 0 ? QRCodeRegion_TOP_LEFT_CORNER_getInstance() : col === (probeSize - 1 | 0) ? QRCodeRegion_TOP_RIGHT_CORNER_getInstance() : col === probeSize ? QRCodeRegion_MARGIN_getInstance() : QRCodeRegion_TOP_MID_getInstance();\n    } else if (row === (probeSize - 1 | 0)) {\n      tmp = col === 0 ? QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance() : col === (probeSize - 1 | 0) ? QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance() : col === probeSize ? QRCodeRegion_MARGIN_getInstance() : QRCodeRegion_BOTTOM_MID_getInstance();\n    } else if (row === probeSize) {\n      tmp = QRCodeRegion_MARGIN_getInstance();\n    } else {\n      tmp = col === 0 ? QRCodeRegion_LEFT_MID_getInstance() : col === (probeSize - 1 | 0) ? QRCodeRegion_RIGHT_MID_getInstance() : col === probeSize ? QRCodeRegion_MARGIN_getInstance() : QRCodeRegion_CENTER_getInstance();\n    }\n    return tmp;\n  }\n  function set($this, row, col, value, modules, parent) {\n    var qrCodeSquare = modules[row][col];\n    if (!(qrCodeSquare == null)) {\n      qrCodeSquare.dark = value;\n    } else {\n      modules[row][col] = new QRCodeSquare(value, row, col, modules.length, VOID, VOID, VOID, parent);\n    }\n  }\n  function set$default($this, row, col, value, modules, parent, $super) {\n    parent = parent === VOID ? null : parent;\n    return set($this, row, col, value, modules, parent);\n  }\n  function QRCodeSetup() {\n    this.zd_1 = 7;\n  }\n  protoOf(QRCodeSetup).ae = function (modules, probeSize) {\n    this.setupPositionProbePattern(0, 0, modules, probeSize);\n  };\n  protoOf(QRCodeSetup).setupTopLeftPositionProbePattern = function (modules, probeSize, $super) {\n    probeSize = probeSize === VOID ? 7 : probeSize;\n    return this.ae(modules, probeSize);\n  };\n  protoOf(QRCodeSetup).be = function (modules, probeSize) {\n    this.setupPositionProbePattern(modules.length - probeSize | 0, 0, modules, probeSize);\n  };\n  protoOf(QRCodeSetup).setupTopRightPositionProbePattern = function (modules, probeSize, $super) {\n    probeSize = probeSize === VOID ? 7 : probeSize;\n    return this.be(modules, probeSize);\n  };\n  protoOf(QRCodeSetup).ce = function (modules, probeSize) {\n    this.setupPositionProbePattern(0, modules.length - probeSize | 0, modules, probeSize);\n  };\n  protoOf(QRCodeSetup).setupBottomLeftPositionProbePattern = function (modules, probeSize, $super) {\n    probeSize = probeSize === VOID ? 7 : probeSize;\n    return this.ce(modules, probeSize);\n  };\n  protoOf(QRCodeSetup).de = function (rowOffset, colOffset, modules, probeSize) {\n    var modulesSize = modules.length;\n    var tmp0_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_PROBE_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n    var squareData = new QRCodeSquare(false, rowOffset, colOffset, modulesSize, tmp0_squareInfo, probeSize, probeSize);\n    var inductionVariable = -1;\n    if (inductionVariable <= probeSize)\n      do {\n        var row = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var inductionVariable_0 = -1;\n        if (inductionVariable_0 <= probeSize)\n          $l$loop: do {\n            var col = inductionVariable_0;\n            inductionVariable_0 = inductionVariable_0 + 1 | 0;\n            if (!isInsideModules(this, row, rowOffset, col, colOffset, modulesSize)) {\n              continue;\n            }\n            var isDark = (isTopBottomRowSquare(this, row, col, probeSize) ? true : isLeftRightColSquare(this, row, col, probeSize)) ? true : isMidSquare(this, row, col, probeSize);\n            var region = findSquareRegion(this, row, col, probeSize);\n            var tmp = modules[row + rowOffset | 0];\n            var tmp_0 = col + colOffset | 0;\n            var tmp3_row = row + rowOffset | 0;\n            var tmp4_col = col + colOffset | 0;\n            var tmp5_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_PROBE_getInstance(), region);\n            tmp[tmp_0] = new QRCodeSquare(isDark, tmp3_row, tmp4_col, modulesSize, tmp5_squareInfo, VOID, VOID, squareData);\n          }\n           while (!(col === probeSize));\n      }\n       while (!(row === probeSize));\n  };\n  protoOf(QRCodeSetup).setupPositionProbePattern = function (rowOffset, colOffset, modules, probeSize, $super) {\n    probeSize = probeSize === VOID ? 7 : probeSize;\n    return this.de(rowOffset, colOffset, modules, probeSize);\n  };\n  protoOf(QRCodeSetup).setupPositionAdjustPattern = function (type, modules) {\n    var pos = QRUtil_getInstance().getPatternPosition(type);\n    var inductionVariable = 0;\n    var last = pos.length - 1 | 0;\n    if (inductionVariable <= last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var inductionVariable_0 = 0;\n        var last_0 = pos.length - 1 | 0;\n        if (inductionVariable_0 <= last_0)\n          $l$loop: do {\n            var j = inductionVariable_0;\n            inductionVariable_0 = inductionVariable_0 + 1 | 0;\n            var row = pos[i];\n            var col = pos[j];\n            if (!(modules[row][col] == null)) {\n              continue;\n            }\n            var tmp2_row = row - 1 | 0;\n            var tmp3_col = col - 1 | 0;\n            var tmp4_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_ADJUST_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n            var tmp5_moduleSize = modules.length;\n            var squareData = new QRCodeSquare(false, tmp2_row, tmp3_col, tmp5_moduleSize, tmp4_squareInfo, 5, 5);\n            var inductionVariable_1 = -2;\n            if (inductionVariable_1 <= 2)\n              do {\n                var r = inductionVariable_1;\n                inductionVariable_1 = inductionVariable_1 + 1 | 0;\n                var inductionVariable_2 = -2;\n                if (inductionVariable_2 <= 2)\n                  do {\n                    var c = inductionVariable_2;\n                    inductionVariable_2 = inductionVariable_2 + 1 | 0;\n                    var tmp = modules[row + r | 0];\n                    var tmp_0 = col + c | 0;\n                    var tmp8_dark = (((r === -2 ? true : r === 2) ? true : c === -2) ? true : c === 2) ? true : r === 0 ? c === 0 : false;\n                    var tmp9_row = row + r | 0;\n                    var tmp10_col = col + c | 0;\n                    var tmp11_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_ADJUST_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n                    var tmp12_moduleSize = modules.length;\n                    tmp[tmp_0] = new QRCodeSquare(tmp8_dark, tmp9_row, tmp10_col, tmp12_moduleSize, tmp11_squareInfo, VOID, VOID, squareData);\n                  }\n                   while (inductionVariable_2 <= 2);\n              }\n               while (inductionVariable_1 <= 2);\n          }\n           while (inductionVariable_0 <= last_0);\n      }\n       while (inductionVariable <= last);\n  };\n  protoOf(QRCodeSetup).setupTimingPattern = function (moduleCount, modules) {\n    var tmp0_rowSize = moduleCount - 8 | 0;\n    var tmp1_colSize = moduleCount - 8 | 0;\n    var tmp2_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_TIMING_PATTERN_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n    var tmp3_moduleSize = modules.length;\n    var squareData = new QRCodeSquare(false, 8, 6, tmp3_moduleSize, tmp2_squareInfo, tmp0_rowSize, tmp1_colSize);\n    var inductionVariable = 8;\n    var last = moduleCount - 8 | 0;\n    if (inductionVariable < last)\n      $l$loop: do {\n        var r = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        if (!(modules[r][6] == null)) {\n          continue;\n        }\n        var tmp = modules[r];\n        var tmp5_dark = (r % 2 | 0) === 0;\n        var tmp6_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_TIMING_PATTERN_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n        var tmp7_moduleSize = modules.length;\n        tmp[6] = new QRCodeSquare(tmp5_dark, r, 6, tmp7_moduleSize, tmp6_squareInfo, VOID, VOID, squareData);\n      }\n       while (inductionVariable < last);\n    var inductionVariable_0 = 8;\n    var last_0 = moduleCount - 8 | 0;\n    if (inductionVariable_0 < last_0)\n      $l$loop_0: do {\n        var c = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        if (!(modules[6][c] == null)) {\n          continue;\n        }\n        var tmp_0 = modules[6];\n        var tmp9_dark = (c % 2 | 0) === 0;\n        var tmp10_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_TIMING_PATTERN_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n        var tmp11_moduleSize = modules.length;\n        tmp_0[c] = new QRCodeSquare(tmp9_dark, 6, c, tmp11_moduleSize, tmp10_squareInfo, VOID, VOID, squareData);\n      }\n       while (inductionVariable_0 < last_0);\n  };\n  protoOf(QRCodeSetup).setupTypeInfo = function (errorCorrectionLevel, maskPattern, moduleCount, modules) {\n    var data = errorCorrectionLevel.value << 3 | maskPattern.d5_1;\n    var bits = QRUtil_getInstance().getBCHTypeInfo(data);\n    var inductionVariable = 0;\n    if (inductionVariable <= 14)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var mod = (bits >> i & 1) === 1;\n        if (i < 6) {\n          set$default(this, i, 8, mod, modules);\n        } else if (i < 8) {\n          set$default(this, i + 1 | 0, 8, mod, modules);\n        } else {\n          set$default(this, (moduleCount - 15 | 0) + i | 0, 8, mod, modules);\n        }\n      }\n       while (inductionVariable <= 14);\n    var inductionVariable_0 = 0;\n    if (inductionVariable_0 <= 14)\n      do {\n        var i_0 = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        var mod_0 = (bits >> i_0 & 1) === 1;\n        if (i_0 < 8) {\n          set$default(this, 8, (moduleCount - i_0 | 0) - 1 | 0, mod_0, modules);\n        } else if (i_0 < 9) {\n          set$default(this, 8, 15 - i_0 | 0, mod_0, modules);\n        } else {\n          set$default(this, 8, (15 - i_0 | 0) - 1 | 0, mod_0, modules);\n        }\n      }\n       while (inductionVariable_0 <= 14);\n    set$default(this, moduleCount - 8 | 0, 8, true, modules);\n  };\n  protoOf(QRCodeSetup).setupTypeNumber = function (type, moduleCount, modules) {\n    var bits = QRUtil_getInstance().getBCHTypeNumber(type);\n    var inductionVariable = 0;\n    if (inductionVariable <= 17)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var mod = (bits >> i & 1) === 1;\n        set$default(this, i / 3 | 0, (((i % 3 | 0) + moduleCount | 0) - 8 | 0) - 3 | 0, mod, modules);\n      }\n       while (inductionVariable <= 17);\n    var inductionVariable_0 = 0;\n    if (inductionVariable_0 <= 17)\n      do {\n        var i_0 = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        var mod_0 = (bits >> i_0 & 1) === 1;\n        set$default(this, (((i_0 % 3 | 0) + moduleCount | 0) - 8 | 0) - 3 | 0, i_0 / 3 | 0, mod_0, modules);\n      }\n       while (inductionVariable_0 <= 17);\n  };\n  protoOf(QRCodeSetup).applyMaskPattern = function (data, maskPattern, moduleCount, modules) {\n    var inc = -1;\n    var bitIndex = 7;\n    var byteIndex = 0;\n    var row = moduleCount - 1 | 0;\n    var col = moduleCount - 1 | 0;\n    while (col > 0) {\n      if (col === 6) {\n        col = col - 1 | 0;\n      }\n      $l$loop: while (true) {\n        var inductionVariable = 0;\n        if (inductionVariable <= 1)\n          do {\n            var c = inductionVariable;\n            inductionVariable = inductionVariable + 1 | 0;\n            if (modules[row][col - c | 0] == null) {\n              var dark = false;\n              if (byteIndex < data.length) {\n                dark = ((data[byteIndex] >>> bitIndex | 0) & 1) === 1;\n              }\n              var mask = QRUtil_getInstance().getMask(maskPattern, row, col - c | 0);\n              if (mask) {\n                dark = !dark;\n              }\n              set$default(this, row, col - c | 0, dark, modules);\n              bitIndex = bitIndex - 1 | 0;\n              if (bitIndex === -1) {\n                byteIndex = byteIndex + 1 | 0;\n                bitIndex = 7;\n              }\n            }\n          }\n           while (inductionVariable <= 1);\n        row = row + inc | 0;\n        if (row < 0 ? true : moduleCount <= row) {\n          row = row - inc | 0;\n          inc = -inc | 0;\n          break;\n        }\n      }\n      col = col - 2 | 0;\n    }\n  };\n  var QRCodeSetup_instance;\n  function QRCodeSetup_getInstance() {\n    return QRCodeSetup_instance;\n  }\n  function QRCodeSquare(dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent) {\n    squareInfo = squareInfo === VOID ? new QRCodeSquareInfo(QRCodeSquareType_DEFAULT_getInstance(), QRCodeRegion_UNKNOWN_getInstance()) : squareInfo;\n    rowSize = rowSize === VOID ? 1 : rowSize;\n    colSize = colSize === VOID ? 1 : colSize;\n    parent = parent === VOID ? null : parent;\n    this.dark = dark;\n    this.row = row;\n    this.col = col;\n    this.moduleSize = moduleSize;\n    this.squareInfo = squareInfo;\n    this.rowSize = rowSize;\n    this.colSize = colSize;\n    this.parent = parent;\n    this.rendered = false;\n  }\n  protoOf(QRCodeSquare).ge = function (_set____db54di) {\n    this.dark = _set____db54di;\n  };\n  protoOf(QRCodeSquare).he = function () {\n    return this.dark;\n  };\n  protoOf(QRCodeSquare).ie = function () {\n    return this.row;\n  };\n  protoOf(QRCodeSquare).je = function () {\n    return this.col;\n  };\n  protoOf(QRCodeSquare).ke = function () {\n    return this.moduleSize;\n  };\n  protoOf(QRCodeSquare).le = function () {\n    return this.squareInfo;\n  };\n  protoOf(QRCodeSquare).me = function () {\n    return this.rowSize;\n  };\n  protoOf(QRCodeSquare).ne = function () {\n    return this.colSize;\n  };\n  protoOf(QRCodeSquare).oe = function () {\n    return this.parent;\n  };\n  protoOf(QRCodeSquare).pe = function (_set____db54di) {\n    this.rendered = _set____db54di;\n  };\n  protoOf(QRCodeSquare).qe = function () {\n    return this.rendered;\n  };\n  protoOf(QRCodeSquare).re = function (cellSize) {\n    return imul(this.col, cellSize);\n  };\n  protoOf(QRCodeSquare).absoluteX = function (cellSize, $super) {\n    var tmp;\n    if (cellSize === VOID) {\n      tmp = 25;\n    } else {\n      tmp = cellSize;\n    }\n    cellSize = tmp;\n    return this.re(cellSize);\n  };\n  protoOf(QRCodeSquare).se = function (cellSize) {\n    return imul(this.row, cellSize);\n  };\n  protoOf(QRCodeSquare).absoluteY = function (cellSize, $super) {\n    var tmp;\n    if (cellSize === VOID) {\n      tmp = 25;\n    } else {\n      tmp = cellSize;\n    }\n    cellSize = tmp;\n    return this.se(cellSize);\n  };\n  protoOf(QRCodeSquare).equals = function (other) {\n    if (this === other)\n      return true;\n    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n      return false;\n    if (!(other instanceof QRCodeSquare))\n      THROW_CCE();\n    if (!(this.row === other.row))\n      return false;\n    if (!(this.col === other.col))\n      return false;\n    if (!(this.rowSize === other.rowSize))\n      return false;\n    if (!(this.colSize === other.colSize))\n      return false;\n    return true;\n  };\n  protoOf(QRCodeSquare).hashCode = function () {\n    var result = this.row;\n    result = imul(31, result) + this.col | 0;\n    result = imul(31, result) + this.rowSize | 0;\n    result = imul(31, result) + this.colSize | 0;\n    return result;\n  };\n  protoOf(QRCodeSquare).te = function () {\n    return this.dark;\n  };\n  protoOf(QRCodeSquare).ue = function () {\n    return this.row;\n  };\n  protoOf(QRCodeSquare).ve = function () {\n    return this.col;\n  };\n  protoOf(QRCodeSquare).we = function () {\n    return this.moduleSize;\n  };\n  protoOf(QRCodeSquare).xe = function () {\n    return this.squareInfo;\n  };\n  protoOf(QRCodeSquare).ye = function () {\n    return this.rowSize;\n  };\n  protoOf(QRCodeSquare).ze = function () {\n    return this.colSize;\n  };\n  protoOf(QRCodeSquare).af = function () {\n    return this.parent;\n  };\n  protoOf(QRCodeSquare).bf = function (dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent) {\n    return new QRCodeSquare(dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent);\n  };\n  protoOf(QRCodeSquare).copy = function (dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent, $super) {\n    dark = dark === VOID ? this.dark : dark;\n    row = row === VOID ? this.row : row;\n    col = col === VOID ? this.col : col;\n    moduleSize = moduleSize === VOID ? this.moduleSize : moduleSize;\n    squareInfo = squareInfo === VOID ? this.squareInfo : squareInfo;\n    rowSize = rowSize === VOID ? this.rowSize : rowSize;\n    colSize = colSize === VOID ? this.colSize : colSize;\n    parent = parent === VOID ? this.parent : parent;\n    return this.bf(dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent);\n  };\n  protoOf(QRCodeSquare).toString = function () {\n    return 'QRCodeSquare(dark=' + this.dark + ', row=' + this.row + ', col=' + this.col + ', moduleSize=' + this.moduleSize + ', squareInfo=' + this.squareInfo + ', rowSize=' + this.rowSize + ', colSize=' + this.colSize + ', parent=' + this.parent + ')';\n  };\n  function Companion_9() {\n  }\n  protoOf(Companion_9).cf = function () {\n    return new QRCodeSquareInfo(QRCodeSquareType_MARGIN_getInstance(), QRCodeRegion_MARGIN_getInstance());\n  };\n  var Companion_instance_9;\n  function Companion_getInstance_9() {\n    return Companion_instance_9;\n  }\n  function QRCodeSquareInfo(type, region) {\n    this.type = type;\n    this.region = region;\n  }\n  protoOf(QRCodeSquareInfo).df = function () {\n    return this.type;\n  };\n  protoOf(QRCodeSquareInfo).ef = function () {\n    return this.region;\n  };\n  protoOf(QRCodeSquareInfo).te = function () {\n    return this.type;\n  };\n  protoOf(QRCodeSquareInfo).ue = function () {\n    return this.region;\n  };\n  protoOf(QRCodeSquareInfo).ff = function (type, region) {\n    return new QRCodeSquareInfo(type, region);\n  };\n  protoOf(QRCodeSquareInfo).copy = function (type, region, $super) {\n    type = type === VOID ? this.type : type;\n    region = region === VOID ? this.region : region;\n    return this.ff(type, region);\n  };\n  protoOf(QRCodeSquareInfo).toString = function () {\n    return 'QRCodeSquareInfo(type=' + this.type + ', region=' + this.region + ')';\n  };\n  protoOf(QRCodeSquareInfo).hashCode = function () {\n    var result = this.type.hashCode();\n    result = imul(result, 31) + this.region.hashCode() | 0;\n    return result;\n  };\n  protoOf(QRCodeSquareInfo).equals = function (other) {\n    if (this === other)\n      return true;\n    if (!(other instanceof QRCodeSquareInfo))\n      return false;\n    var tmp0_other_with_cast = other instanceof QRCodeSquareInfo ? other : THROW_CCE();\n    if (!this.type.equals(tmp0_other_with_cast.type))\n      return false;\n    if (!this.region.equals(tmp0_other_with_cast.region))\n      return false;\n    return true;\n  };\n  var QRCodeSquareType_POSITION_PROBE_instance;\n  var QRCodeSquareType_POSITION_ADJUST_instance;\n  var QRCodeSquareType_TIMING_PATTERN_instance;\n  var QRCodeSquareType_DEFAULT_instance;\n  var QRCodeSquareType_MARGIN_instance;\n  function values_0() {\n    return [QRCodeSquareType_POSITION_PROBE_getInstance(), QRCodeSquareType_POSITION_ADJUST_getInstance(), QRCodeSquareType_TIMING_PATTERN_getInstance(), QRCodeSquareType_DEFAULT_getInstance(), QRCodeSquareType_MARGIN_getInstance()];\n  }\n  function valueOf_0(value) {\n    switch (value) {\n      case 'POSITION_PROBE':\n        return QRCodeSquareType_POSITION_PROBE_getInstance();\n      case 'POSITION_ADJUST':\n        return QRCodeSquareType_POSITION_ADJUST_getInstance();\n      case 'TIMING_PATTERN':\n        return QRCodeSquareType_TIMING_PATTERN_getInstance();\n      case 'DEFAULT':\n        return QRCodeSquareType_DEFAULT_getInstance();\n      case 'MARGIN':\n        return QRCodeSquareType_MARGIN_getInstance();\n      default:\n        QRCodeSquareType_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var QRCodeSquareType_entriesInitialized;\n  function QRCodeSquareType_initEntries() {\n    if (QRCodeSquareType_entriesInitialized)\n      return Unit_instance;\n    QRCodeSquareType_entriesInitialized = true;\n    QRCodeSquareType_POSITION_PROBE_instance = new QRCodeSquareType('POSITION_PROBE', 0);\n    QRCodeSquareType_POSITION_ADJUST_instance = new QRCodeSquareType('POSITION_ADJUST', 1);\n    QRCodeSquareType_TIMING_PATTERN_instance = new QRCodeSquareType('TIMING_PATTERN', 2);\n    QRCodeSquareType_DEFAULT_instance = new QRCodeSquareType('DEFAULT', 3);\n    QRCodeSquareType_MARGIN_instance = new QRCodeSquareType('MARGIN', 4);\n  }\n  function QRCodeSquareType(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  var QRCodeRegion_TOP_LEFT_CORNER_instance;\n  var QRCodeRegion_TOP_RIGHT_CORNER_instance;\n  var QRCodeRegion_TOP_MID_instance;\n  var QRCodeRegion_LEFT_MID_instance;\n  var QRCodeRegion_RIGHT_MID_instance;\n  var QRCodeRegion_CENTER_instance;\n  var QRCodeRegion_BOTTOM_LEFT_CORNER_instance;\n  var QRCodeRegion_BOTTOM_RIGHT_CORNER_instance;\n  var QRCodeRegion_BOTTOM_MID_instance;\n  var QRCodeRegion_MARGIN_instance;\n  var QRCodeRegion_UNKNOWN_instance;\n  function values_1() {\n    return [QRCodeRegion_TOP_LEFT_CORNER_getInstance(), QRCodeRegion_TOP_RIGHT_CORNER_getInstance(), QRCodeRegion_TOP_MID_getInstance(), QRCodeRegion_LEFT_MID_getInstance(), QRCodeRegion_RIGHT_MID_getInstance(), QRCodeRegion_CENTER_getInstance(), QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance(), QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance(), QRCodeRegion_BOTTOM_MID_getInstance(), QRCodeRegion_MARGIN_getInstance(), QRCodeRegion_UNKNOWN_getInstance()];\n  }\n  function valueOf_1(value) {\n    switch (value) {\n      case 'TOP_LEFT_CORNER':\n        return QRCodeRegion_TOP_LEFT_CORNER_getInstance();\n      case 'TOP_RIGHT_CORNER':\n        return QRCodeRegion_TOP_RIGHT_CORNER_getInstance();\n      case 'TOP_MID':\n        return QRCodeRegion_TOP_MID_getInstance();\n      case 'LEFT_MID':\n        return QRCodeRegion_LEFT_MID_getInstance();\n      case 'RIGHT_MID':\n        return QRCodeRegion_RIGHT_MID_getInstance();\n      case 'CENTER':\n        return QRCodeRegion_CENTER_getInstance();\n      case 'BOTTOM_LEFT_CORNER':\n        return QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance();\n      case 'BOTTOM_RIGHT_CORNER':\n        return QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance();\n      case 'BOTTOM_MID':\n        return QRCodeRegion_BOTTOM_MID_getInstance();\n      case 'MARGIN':\n        return QRCodeRegion_MARGIN_getInstance();\n      case 'UNKNOWN':\n        return QRCodeRegion_UNKNOWN_getInstance();\n      default:\n        QRCodeRegion_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var QRCodeRegion_entriesInitialized;\n  function QRCodeRegion_initEntries() {\n    if (QRCodeRegion_entriesInitialized)\n      return Unit_instance;\n    QRCodeRegion_entriesInitialized = true;\n    QRCodeRegion_TOP_LEFT_CORNER_instance = new QRCodeRegion('TOP_LEFT_CORNER', 0);\n    QRCodeRegion_TOP_RIGHT_CORNER_instance = new QRCodeRegion('TOP_RIGHT_CORNER', 1);\n    QRCodeRegion_TOP_MID_instance = new QRCodeRegion('TOP_MID', 2);\n    QRCodeRegion_LEFT_MID_instance = new QRCodeRegion('LEFT_MID', 3);\n    QRCodeRegion_RIGHT_MID_instance = new QRCodeRegion('RIGHT_MID', 4);\n    QRCodeRegion_CENTER_instance = new QRCodeRegion('CENTER', 5);\n    QRCodeRegion_BOTTOM_LEFT_CORNER_instance = new QRCodeRegion('BOTTOM_LEFT_CORNER', 6);\n    QRCodeRegion_BOTTOM_RIGHT_CORNER_instance = new QRCodeRegion('BOTTOM_RIGHT_CORNER', 7);\n    QRCodeRegion_BOTTOM_MID_instance = new QRCodeRegion('BOTTOM_MID', 8);\n    QRCodeRegion_MARGIN_instance = new QRCodeRegion('MARGIN', 9);\n    QRCodeRegion_UNKNOWN_instance = new QRCodeRegion('UNKNOWN', 10);\n  }\n  function QRCodeRegion(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  function QRCodeSquareType_POSITION_PROBE_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_POSITION_PROBE_instance;\n  }\n  function QRCodeSquareType_POSITION_ADJUST_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_POSITION_ADJUST_instance;\n  }\n  function QRCodeSquareType_TIMING_PATTERN_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_TIMING_PATTERN_instance;\n  }\n  function QRCodeSquareType_DEFAULT_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_DEFAULT_instance;\n  }\n  function QRCodeSquareType_MARGIN_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_MARGIN_instance;\n  }\n  function QRCodeRegion_TOP_LEFT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_TOP_LEFT_CORNER_instance;\n  }\n  function QRCodeRegion_TOP_RIGHT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_TOP_RIGHT_CORNER_instance;\n  }\n  function QRCodeRegion_TOP_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_TOP_MID_instance;\n  }\n  function QRCodeRegion_LEFT_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_LEFT_MID_instance;\n  }\n  function QRCodeRegion_RIGHT_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_RIGHT_MID_instance;\n  }\n  function QRCodeRegion_CENTER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_CENTER_instance;\n  }\n  function QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_BOTTOM_LEFT_CORNER_instance;\n  }\n  function QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_BOTTOM_RIGHT_CORNER_instance;\n  }\n  function QRCodeRegion_BOTTOM_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_BOTTOM_MID_instance;\n  }\n  function QRCodeRegion_MARGIN_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_MARGIN_instance;\n  }\n  function QRCodeRegion_UNKNOWN_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_UNKNOWN_instance;\n  }\n  function QRData(dataType, data) {\n    this.dataType = dataType;\n    this.data = data;\n  }\n  protoOf(QRData).getLengthInBits = function (type) {\n    var tmp;\n    if (1 <= type ? type <= 9 : false) {\n      var tmp_0;\n      switch (this.dataType.d5_1) {\n        case 0:\n          tmp_0 = 10;\n          break;\n        case 1:\n          tmp_0 = 9;\n          break;\n        case 2:\n          tmp_0 = 8;\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp = tmp_0;\n    } else if (1 <= type ? type <= 26 : false) {\n      var tmp_1;\n      switch (this.dataType.d5_1) {\n        case 0:\n          tmp_1 = 12;\n          break;\n        case 1:\n          tmp_1 = 11;\n          break;\n        case 2:\n          tmp_1 = 16;\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp = tmp_1;\n    } else if (1 <= type ? type <= 40 : false) {\n      var tmp_2;\n      switch (this.dataType.d5_1) {\n        case 0:\n          tmp_2 = 14;\n          break;\n        case 1:\n          tmp_2 = 13;\n          break;\n        case 2:\n          tmp_2 = 16;\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp = tmp_2;\n    } else {\n      throw IllegalArgumentException_init_$Create$_0(\"'type' must be greater than 0 and cannot be greater than 40: \" + type);\n    }\n    return tmp;\n  };\n  function QR8BitByte(data) {\n    QRData.call(this, QRCodeDataType_DEFAULT_getInstance(), data);\n    this.kf_1 = encodeToByteArray(data);\n  }\n  protoOf(QR8BitByte).write = function (buffer) {\n    var inductionVariable = 0;\n    var last = this.kf_1.length - 1 | 0;\n    if (inductionVariable <= last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        buffer.put(this.kf_1[i], 8);\n      }\n       while (inductionVariable <= last);\n  };\n  protoOf(QR8BitByte).length = function () {\n    return this.kf_1.length;\n  };\n  function charCode($this, c) {\n    var tmp;\n    if (_Char___init__impl__6a9atx(48) <= c ? c <= _Char___init__impl__6a9atx(57) : false) {\n      tmp = Char__minus_impl_a2frrh(c, _Char___init__impl__6a9atx(48));\n    } else if (_Char___init__impl__6a9atx(65) <= c ? c <= _Char___init__impl__6a9atx(90) : false) {\n      tmp = Char__minus_impl_a2frrh(c, _Char___init__impl__6a9atx(65)) + 10 | 0;\n    } else {\n      var tmp_0;\n      if (c === _Char___init__impl__6a9atx(32)) {\n        tmp_0 = 36;\n      } else if (c === _Char___init__impl__6a9atx(36)) {\n        tmp_0 = 37;\n      } else if (c === _Char___init__impl__6a9atx(37)) {\n        tmp_0 = 38;\n      } else if (c === _Char___init__impl__6a9atx(42)) {\n        tmp_0 = 39;\n      } else if (c === _Char___init__impl__6a9atx(43)) {\n        tmp_0 = 40;\n      } else if (c === _Char___init__impl__6a9atx(45)) {\n        tmp_0 = 41;\n      } else if (c === _Char___init__impl__6a9atx(46)) {\n        tmp_0 = 42;\n      } else if (c === _Char___init__impl__6a9atx(47)) {\n        tmp_0 = 43;\n      } else if (c === _Char___init__impl__6a9atx(58)) {\n        tmp_0 = 44;\n      } else {\n        throw IllegalArgumentException_init_$Create$_0('Illegal character: ' + toString(c));\n      }\n      tmp = tmp_0;\n    }\n    return tmp;\n  }\n  function QRAlphaNum(data) {\n    QRData.call(this, QRCodeDataType_UPPER_ALPHA_NUM_getInstance(), data);\n  }\n  protoOf(QRAlphaNum).write = function (buffer) {\n    var i = 0;\n    var dataLength = this.data.length;\n    while ((i + 1 | 0) < dataLength) {\n      buffer.put(imul(charCode(this, charSequenceGet(this.data, i)), 45) + charCode(this, charSequenceGet(this.data, i + 1 | 0)) | 0, 11);\n      i = i + 2 | 0;\n    }\n    if (i < dataLength) {\n      buffer.put(charCode(this, charSequenceGet(this.data, i)), 6);\n    }\n  };\n  protoOf(QRAlphaNum).length = function () {\n    return this.data.length;\n  };\n  function QRNumber(data) {\n    QRData.call(this, QRCodeDataType_NUMBERS_getInstance(), data);\n  }\n  protoOf(QRNumber).write = function (buffer) {\n    var i = 0;\n    var len = this.length();\n    while ((i + 2 | 0) < len) {\n      // Inline function 'kotlin.text.substring' call\n      var this_0 = this.data;\n      var startIndex = i;\n      var endIndex = i + 3 | 0;\n      // Inline function 'kotlin.js.asDynamic' call\n      var tmp$ret$1 = this_0.substring(startIndex, endIndex);\n      var num = toInt_0(tmp$ret$1);\n      buffer.put(num, 10);\n      i = i + 3 | 0;\n    }\n    if (i < len) {\n      if ((len - i | 0) === 1) {\n        // Inline function 'kotlin.text.substring' call\n        var this_1 = this.data;\n        var startIndex_0 = i;\n        var endIndex_0 = i + 1 | 0;\n        // Inline function 'kotlin.js.asDynamic' call\n        var tmp$ret$3 = this_1.substring(startIndex_0, endIndex_0);\n        var num_0 = toInt_0(tmp$ret$3);\n        buffer.put(num_0, 4);\n      } else if ((len - i | 0) === 2) {\n        // Inline function 'kotlin.text.substring' call\n        var this_2 = this.data;\n        var startIndex_1 = i;\n        var endIndex_1 = i + 2 | 0;\n        // Inline function 'kotlin.js.asDynamic' call\n        var tmp$ret$5 = this_2.substring(startIndex_1, endIndex_1);\n        var num_1 = toInt_0(tmp$ret$5);\n        buffer.put(num_1, 7);\n      }\n    }\n  };\n  protoOf(QRNumber).length = function () {\n    return this.data.length;\n  };\n  function QRMath() {\n    QRMath_instance = this;\n    this.lf_1 = new Int32Array(256);\n    this.mf_1 = new Int32Array(256);\n    var inductionVariable = 0;\n    if (inductionVariable <= 7)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        this.lf_1[i] = 1 << i;\n      }\n       while (inductionVariable <= 7);\n    var inductionVariable_0 = 8;\n    if (inductionVariable_0 <= 255)\n      do {\n        var i_0 = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        this.lf_1[i_0] = this.lf_1[i_0 - 4 | 0] ^ this.lf_1[i_0 - 5 | 0] ^ this.lf_1[i_0 - 6 | 0] ^ this.lf_1[i_0 - 8 | 0];\n      }\n       while (inductionVariable_0 <= 255);\n    var inductionVariable_1 = 0;\n    if (inductionVariable_1 <= 254)\n      do {\n        var i_1 = inductionVariable_1;\n        inductionVariable_1 = inductionVariable_1 + 1 | 0;\n        this.mf_1[this.lf_1[i_1]] = i_1;\n      }\n       while (inductionVariable_1 <= 254);\n  }\n  protoOf(QRMath).glog = function (n) {\n    return this.mf_1[n];\n  };\n  protoOf(QRMath).gexp = function (n) {\n    var i = n;\n    while (i < 0) {\n      i = i + 255 | 0;\n    }\n    while (i >= 256) {\n      i = i - 255 | 0;\n    }\n    return this.lf_1[i];\n  };\n  protoOf(QRMath).rectsIntersect = function (x1, y1, w1, h1, x2, y2, w2, h2) {\n    var x1End = x1 + w1 | 0;\n    var y1End = y1 + h1 | 0;\n    var x2End = x2 + w2 | 0;\n    var y2End = y2 + h2 | 0;\n    return ((x1End < x2 ? true : x1 > x2End) ? true : y1End < y2) ? true : y1 > y2End;\n  };\n  var QRMath_instance;\n  function QRMath_getInstance() {\n    if (QRMath_instance == null)\n      new QRMath();\n    return QRMath_instance;\n  }\n  function isNumber_0($this, s) {\n    // Inline function 'kotlin.text.matches' call\n    return Regex_init_$Create$('^\\\\d+$').d4(s);\n  }\n  function isAlphaNum($this, s) {\n    // Inline function 'kotlin.text.matches' call\n    return Regex_init_$Create$('^[0-9A-Z $%*+\\\\-./:]+$').d4(s);\n  }\n  function getBCHDigit($this, data) {\n    var i = data;\n    var digit = 0;\n    while (!(i === 0)) {\n      digit = digit + 1 | 0;\n      i = i >>> 1 | 0;\n    }\n    return digit;\n  }\n  function QRUtil() {\n    QRUtil_instance = this;\n    var tmp = this;\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_0 = new Int32Array([]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_1 = new Int32Array([6, 18]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_2 = new Int32Array([6, 22]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_3 = new Int32Array([6, 26]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_4 = new Int32Array([6, 30]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_5 = new Int32Array([6, 34]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_6 = new Int32Array([6, 22, 38]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_7 = new Int32Array([6, 24, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_8 = new Int32Array([6, 26, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_9 = new Int32Array([6, 28, 50]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_10 = new Int32Array([6, 30, 54]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_11 = new Int32Array([6, 32, 58]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_12 = new Int32Array([6, 34, 62]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_13 = new Int32Array([6, 26, 46, 66]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_14 = new Int32Array([6, 26, 48, 70]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_15 = new Int32Array([6, 26, 50, 74]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_16 = new Int32Array([6, 30, 54, 78]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_17 = new Int32Array([6, 30, 56, 82]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_18 = new Int32Array([6, 30, 58, 86]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_19 = new Int32Array([6, 34, 62, 90]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_20 = new Int32Array([6, 28, 50, 72, 94]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_21 = new Int32Array([6, 26, 50, 74, 98]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_22 = new Int32Array([6, 30, 54, 78, 102]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_23 = new Int32Array([6, 28, 54, 80, 106]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_24 = new Int32Array([6, 32, 58, 84, 110]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_25 = new Int32Array([6, 30, 58, 86, 114]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_26 = new Int32Array([6, 34, 62, 90, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_27 = new Int32Array([6, 26, 50, 74, 98, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_28 = new Int32Array([6, 30, 54, 78, 102, 126]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_29 = new Int32Array([6, 26, 52, 78, 104, 130]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_30 = new Int32Array([6, 30, 56, 82, 108, 134]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_31 = new Int32Array([6, 34, 60, 86, 112, 138]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_32 = new Int32Array([6, 30, 58, 86, 114, 142]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_33 = new Int32Array([6, 34, 62, 90, 118, 146]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_34 = new Int32Array([6, 30, 54, 78, 102, 126, 150]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_35 = new Int32Array([6, 24, 50, 76, 102, 128, 154]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_36 = new Int32Array([6, 28, 54, 80, 106, 132, 158]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_37 = new Int32Array([6, 32, 58, 84, 110, 136, 162]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_38 = new Int32Array([6, 26, 54, 82, 110, 138, 166]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    tmp.nf_1 = [tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, tmp_11, tmp_12, tmp_13, tmp_14, tmp_15, tmp_16, tmp_17, tmp_18, tmp_19, tmp_20, tmp_21, tmp_22, tmp_23, tmp_24, tmp_25, tmp_26, tmp_27, tmp_28, tmp_29, tmp_30, tmp_31, tmp_32, tmp_33, tmp_34, tmp_35, tmp_36, tmp_37, tmp_38, new Int32Array([6, 30, 58, 86, 114, 142, 170])];\n    var tmp_39 = this;\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_40 = new Int32Array([41, 25, 17, 10]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_41 = new Int32Array([34, 20, 14, 8]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_42 = new Int32Array([27, 16, 11, 7]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_43 = [tmp_40, tmp_41, tmp_42, new Int32Array([17, 10, 7, 4])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_44 = new Int32Array([77, 47, 32, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_45 = new Int32Array([63, 38, 26, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_46 = new Int32Array([48, 29, 20, 12]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_47 = [tmp_44, tmp_45, tmp_46, new Int32Array([34, 20, 14, 8])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_48 = new Int32Array([127, 77, 53, 32]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_49 = new Int32Array([101, 61, 42, 26]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_50 = new Int32Array([77, 47, 32, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_51 = [tmp_48, tmp_49, tmp_50, new Int32Array([58, 35, 24, 15])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_52 = new Int32Array([187, 114, 78, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_53 = new Int32Array([149, 90, 62, 38]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_54 = new Int32Array([111, 67, 46, 28]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_55 = [tmp_52, tmp_53, tmp_54, new Int32Array([82, 50, 34, 21])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_56 = new Int32Array([255, 154, 106, 65]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_57 = new Int32Array([202, 122, 84, 52]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_58 = new Int32Array([144, 87, 60, 37]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_59 = [tmp_56, tmp_57, tmp_58, new Int32Array([106, 64, 44, 27])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_60 = new Int32Array([322, 195, 134, 82]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_61 = new Int32Array([255, 154, 106, 65]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_62 = new Int32Array([178, 108, 74, 45]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_63 = [tmp_60, tmp_61, tmp_62, new Int32Array([139, 84, 58, 36])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_64 = new Int32Array([370, 224, 154, 95]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_65 = new Int32Array([293, 178, 122, 75]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_66 = new Int32Array([207, 125, 86, 53]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_67 = [tmp_64, tmp_65, tmp_66, new Int32Array([154, 93, 64, 39])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_68 = new Int32Array([461, 279, 192, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_69 = new Int32Array([365, 221, 152, 93]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_70 = new Int32Array([259, 157, 108, 66]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_71 = [tmp_68, tmp_69, tmp_70, new Int32Array([202, 122, 84, 52])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_72 = new Int32Array([552, 335, 230, 141]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_73 = new Int32Array([432, 262, 180, 111]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_74 = new Int32Array([312, 189, 130, 80]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_75 = [tmp_72, tmp_73, tmp_74, new Int32Array([235, 143, 98, 60])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_76 = new Int32Array([652, 395, 271, 167]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_77 = new Int32Array([513, 311, 213, 131]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_78 = new Int32Array([364, 221, 151, 93]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_79 = [tmp_76, tmp_77, tmp_78, new Int32Array([288, 174, 119, 74])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_80 = new Int32Array([772, 468, 321, 198]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_81 = new Int32Array([604, 366, 251, 155]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_82 = new Int32Array([427, 259, 177, 109]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_83 = [tmp_80, tmp_81, tmp_82, new Int32Array([331, 200, 137, 85])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_84 = new Int32Array([883, 535, 367, 226]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_85 = new Int32Array([691, 419, 287, 177]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_86 = new Int32Array([489, 296, 203, 125]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_87 = [tmp_84, tmp_85, tmp_86, new Int32Array([374, 227, 155, 96])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_88 = new Int32Array([1022, 619, 425, 262]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_89 = new Int32Array([796, 483, 331, 204]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_90 = new Int32Array([580, 352, 241, 149]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_91 = [tmp_88, tmp_89, tmp_90, new Int32Array([427, 259, 177, 109])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_92 = new Int32Array([1101, 667, 458, 282]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_93 = new Int32Array([871, 528, 362, 223]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_94 = new Int32Array([621, 376, 258, 159]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_95 = [tmp_92, tmp_93, tmp_94, new Int32Array([468, 283, 194, 120])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_96 = new Int32Array([1250, 758, 520, 320]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_97 = new Int32Array([991, 600, 412, 254]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_98 = new Int32Array([703, 426, 292, 180]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_99 = [tmp_96, tmp_97, tmp_98, new Int32Array([530, 321, 220, 136])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_100 = new Int32Array([1408, 854, 586, 361]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_101 = new Int32Array([1082, 656, 450, 277]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_102 = new Int32Array([775, 470, 322, 198]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_103 = [tmp_100, tmp_101, tmp_102, new Int32Array([602, 365, 250, 154])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_104 = new Int32Array([1548, 938, 644, 397]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_105 = new Int32Array([1212, 734, 504, 310]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_106 = new Int32Array([876, 531, 364, 224]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_107 = [tmp_104, tmp_105, tmp_106, new Int32Array([674, 408, 280, 173])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_108 = new Int32Array([1725, 1046, 718, 442]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_109 = new Int32Array([1346, 816, 560, 345]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_110 = new Int32Array([948, 574, 394, 243]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_111 = [tmp_108, tmp_109, tmp_110, new Int32Array([746, 452, 310, 191])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_112 = new Int32Array([1903, 1153, 792, 488]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_113 = new Int32Array([1500, 909, 624, 384]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_114 = new Int32Array([1063, 644, 442, 272]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_115 = [tmp_112, tmp_113, tmp_114, new Int32Array([813, 493, 338, 208])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_116 = new Int32Array([2061, 1249, 858, 528]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_117 = new Int32Array([1600, 970, 666, 410]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_118 = new Int32Array([1159, 702, 482, 297]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_119 = [tmp_116, tmp_117, tmp_118, new Int32Array([919, 557, 382, 235])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_120 = new Int32Array([2232, 1352, 929, 572]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_121 = new Int32Array([1708, 1035, 711, 438]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_122 = new Int32Array([1224, 742, 509, 314]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_123 = [tmp_120, tmp_121, tmp_122, new Int32Array([969, 587, 403, 248])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_124 = new Int32Array([2409, 1460, 1003, 618]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_125 = new Int32Array([1872, 1134, 779, 480]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_126 = new Int32Array([1358, 823, 565, 348]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_127 = [tmp_124, tmp_125, tmp_126, new Int32Array([1056, 640, 439, 270])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_128 = new Int32Array([2620, 1588, 1091, 672]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_129 = new Int32Array([2059, 1248, 857, 528]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_130 = new Int32Array([1468, 890, 611, 376]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_131 = [tmp_128, tmp_129, tmp_130, new Int32Array([1108, 672, 461, 284])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_132 = new Int32Array([2812, 1704, 1171, 721]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_133 = new Int32Array([2188, 1326, 911, 561]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_134 = new Int32Array([1588, 963, 661, 407]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_135 = [tmp_132, tmp_133, tmp_134, new Int32Array([1228, 744, 511, 315])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_136 = new Int32Array([3057, 1853, 1273, 784]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_137 = new Int32Array([2395, 1451, 997, 614]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_138 = new Int32Array([1718, 1041, 715, 440]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_139 = [tmp_136, tmp_137, tmp_138, new Int32Array([1286, 779, 535, 330])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_140 = new Int32Array([3283, 1990, 1367, 842]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_141 = new Int32Array([2544, 1542, 1059, 652]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_142 = new Int32Array([1804, 1094, 751, 462]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_143 = [tmp_140, tmp_141, tmp_142, new Int32Array([1425, 864, 593, 365])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_144 = new Int32Array([3517, 2132, 1465, 902]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_145 = new Int32Array([2701, 1637, 1125, 692]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_146 = new Int32Array([1933, 1172, 805, 496]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_147 = [tmp_144, tmp_145, tmp_146, new Int32Array([1501, 910, 625, 385])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_148 = new Int32Array([3669, 2223, 1528, 940]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_149 = new Int32Array([2857, 1732, 1190, 732]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_150 = new Int32Array([2085, 1263, 868, 534]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_151 = [tmp_148, tmp_149, tmp_150, new Int32Array([1581, 958, 658, 405])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_152 = new Int32Array([3909, 2369, 1628, 1002]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_153 = new Int32Array([3035, 1839, 1264, 778]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_154 = new Int32Array([2181, 1322, 908, 559]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_155 = [tmp_152, tmp_153, tmp_154, new Int32Array([1677, 1016, 698, 430])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_156 = new Int32Array([4158, 2520, 1732, 1066]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_157 = new Int32Array([3289, 1994, 1370, 843]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_158 = new Int32Array([2358, 1429, 982, 604]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_159 = [tmp_156, tmp_157, tmp_158, new Int32Array([1782, 1080, 742, 457])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_160 = new Int32Array([4417, 2677, 1840, 1132]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_161 = new Int32Array([3486, 2113, 1452, 894]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_162 = new Int32Array([2473, 1499, 1030, 634]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_163 = [tmp_160, tmp_161, tmp_162, new Int32Array([1897, 1150, 790, 486])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_164 = new Int32Array([4686, 2840, 1952, 1201]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_165 = new Int32Array([3693, 2238, 1538, 947]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_166 = new Int32Array([2670, 1618, 1112, 684]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_167 = [tmp_164, tmp_165, tmp_166, new Int32Array([2022, 1226, 842, 518])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_168 = new Int32Array([4965, 3009, 2068, 1273]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_169 = new Int32Array([3909, 2369, 1628, 1002]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_170 = new Int32Array([2805, 1700, 1168, 719]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_171 = [tmp_168, tmp_169, tmp_170, new Int32Array([2157, 1307, 898, 553])];\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_172 = new Int32Array([5253, 3183, 2188, 1347]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_173 = new Int32Array([4134, 2506, 1722, 1060]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_174 = new Int32Array([2949, 1787, 1228, 756]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    tmp_39.of_1 = [tmp_43, tmp_47, tmp_51, tmp_55, tmp_59, tmp_63, tmp_67, tmp_71, tmp_75, tmp_79, tmp_83, tmp_87, tmp_91, tmp_95, tmp_99, tmp_103, tmp_107, tmp_111, tmp_115, tmp_119, tmp_123, tmp_127, tmp_131, tmp_135, tmp_139, tmp_143, tmp_147, tmp_151, tmp_155, tmp_159, tmp_163, tmp_167, tmp_171, [tmp_172, tmp_173, tmp_174, new Int32Array([2301, 1394, 958, 590])]];\n    this.pf_1 = 1335;\n    this.qf_1 = 7973;\n    this.rf_1 = 21522;\n  }\n  protoOf(QRUtil).getPatternPosition = function (typeNumber) {\n    return this.nf_1[typeNumber - 1 | 0];\n  };\n  protoOf(QRUtil).getMaxLength = function (typeNumber, dataType, errorCorrectionLevel) {\n    return this.of_1[typeNumber - 1 | 0][errorCorrectionLevel.d5_1][dataType.d5_1];\n  };\n  protoOf(QRUtil).getErrorCorrectPolynomial = function (errorCorrectLength) {\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp$ret$0 = new Int32Array([1]);\n    var a = new Polynomial(tmp$ret$0);\n    var inductionVariable = 0;\n    if (inductionVariable < errorCorrectLength)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var tmp = a;\n        // Inline function 'kotlin.intArrayOf' call\n        var tmp$ret$1 = new Int32Array([1, QRMath_getInstance().gexp(i)]);\n        a = tmp.multiply(new Polynomial(tmp$ret$1));\n      }\n       while (inductionVariable < errorCorrectLength);\n    return a;\n  };\n  protoOf(QRUtil).getMask = function (maskPattern, i, j) {\n    var tmp;\n    switch (maskPattern.d5_1) {\n      case 0:\n        tmp = ((i + j | 0) % 2 | 0) === 0;\n        break;\n      case 1:\n        tmp = (i % 2 | 0) === 0;\n        break;\n      case 2:\n        tmp = (j % 3 | 0) === 0;\n        break;\n      case 3:\n        tmp = ((i + j | 0) % 3 | 0) === 0;\n        break;\n      case 4:\n        tmp = (((i / 2 | 0) + (j / 3 | 0) | 0) % 2 | 0) === 0;\n        break;\n      case 5:\n        tmp = ((imul(i, j) % 2 | 0) + (imul(i, j) % 3 | 0) | 0) === 0;\n        break;\n      case 6:\n        tmp = (((imul(i, j) % 2 | 0) + (imul(i, j) % 3 | 0) | 0) % 2 | 0) === 0;\n        break;\n      case 7:\n        tmp = (((imul(i, j) % 3 | 0) + ((i + j | 0) % 2 | 0) | 0) % 2 | 0) === 0;\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    return tmp;\n  };\n  protoOf(QRUtil).getDataType = function (s) {\n    var tmp;\n    if (isAlphaNum(this, s)) {\n      var tmp_0;\n      if (isNumber_0(this, s)) {\n        tmp_0 = QRCodeDataType_NUMBERS_getInstance();\n      } else {\n        tmp_0 = QRCodeDataType_UPPER_ALPHA_NUM_getInstance();\n      }\n      tmp = tmp_0;\n    } else {\n      tmp = QRCodeDataType_DEFAULT_getInstance();\n    }\n    return tmp;\n  };\n  protoOf(QRUtil).getBCHTypeInfo = function (data) {\n    var d = data << 10;\n    while ((getBCHDigit(this, d) - getBCHDigit(this, 1335) | 0) >= 0) {\n      d = d ^ 1335 << (getBCHDigit(this, d) - getBCHDigit(this, 1335) | 0);\n    }\n    return (data << 10 | d) ^ 21522;\n  };\n  protoOf(QRUtil).getBCHTypeNumber = function (data) {\n    var d = data << 12;\n    while ((getBCHDigit(this, d) - getBCHDigit(this, 7973) | 0) >= 0) {\n      d = d ^ 7973 << (getBCHDigit(this, d) - getBCHDigit(this, 7973) | 0);\n    }\n    return data << 12 | d;\n  };\n  var QRUtil_instance;\n  function QRUtil_getInstance() {\n    if (QRUtil_instance == null)\n      new QRUtil();\n    return QRUtil_instance;\n  }\n  function Companion_10() {\n    Companion_instance_10 = this;\n    var tmp = this;\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_0 = new Int32Array([1, 26, 19]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_1 = new Int32Array([1, 26, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_2 = new Int32Array([1, 26, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_3 = new Int32Array([1, 26, 9]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_4 = new Int32Array([1, 44, 34]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_5 = new Int32Array([1, 44, 28]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_6 = new Int32Array([1, 44, 22]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_7 = new Int32Array([1, 44, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_8 = new Int32Array([1, 70, 55]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_9 = new Int32Array([1, 70, 44]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_10 = new Int32Array([2, 35, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_11 = new Int32Array([2, 35, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_12 = new Int32Array([1, 100, 80]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_13 = new Int32Array([2, 50, 32]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_14 = new Int32Array([2, 50, 24]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_15 = new Int32Array([4, 25, 9]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_16 = new Int32Array([1, 134, 108]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_17 = new Int32Array([2, 67, 43]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_18 = new Int32Array([2, 33, 15, 2, 34, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_19 = new Int32Array([2, 33, 11, 2, 34, 12]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_20 = new Int32Array([2, 86, 68]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_21 = new Int32Array([4, 43, 27]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_22 = new Int32Array([4, 43, 19]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_23 = new Int32Array([4, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_24 = new Int32Array([2, 98, 78]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_25 = new Int32Array([4, 49, 31]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_26 = new Int32Array([2, 32, 14, 4, 33, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_27 = new Int32Array([4, 39, 13, 1, 40, 14]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_28 = new Int32Array([2, 121, 97]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_29 = new Int32Array([2, 60, 38, 2, 61, 39]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_30 = new Int32Array([4, 40, 18, 2, 41, 19]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_31 = new Int32Array([4, 40, 14, 2, 41, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_32 = new Int32Array([2, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_33 = new Int32Array([3, 58, 36, 2, 59, 37]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_34 = new Int32Array([4, 36, 16, 4, 37, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_35 = new Int32Array([4, 36, 12, 4, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_36 = new Int32Array([2, 86, 68, 2, 87, 69]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_37 = new Int32Array([4, 69, 43, 1, 70, 44]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_38 = new Int32Array([6, 43, 19, 2, 44, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_39 = new Int32Array([6, 43, 15, 2, 44, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_40 = new Int32Array([4, 101, 81]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_41 = new Int32Array([1, 80, 50, 4, 81, 51]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_42 = new Int32Array([4, 50, 22, 4, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_43 = new Int32Array([3, 36, 12, 8, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_44 = new Int32Array([2, 116, 92, 2, 117, 93]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_45 = new Int32Array([6, 58, 36, 2, 59, 37]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_46 = new Int32Array([4, 46, 20, 6, 47, 21]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_47 = new Int32Array([7, 42, 14, 4, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_48 = new Int32Array([4, 133, 107]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_49 = new Int32Array([8, 59, 37, 1, 60, 38]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_50 = new Int32Array([8, 44, 20, 4, 45, 21]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_51 = new Int32Array([12, 33, 11, 4, 34, 12]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_52 = new Int32Array([3, 145, 115, 1, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_53 = new Int32Array([4, 64, 40, 5, 65, 41]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_54 = new Int32Array([11, 36, 16, 5, 37, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_55 = new Int32Array([11, 36, 12, 5, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_56 = new Int32Array([5, 109, 87, 1, 110, 88]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_57 = new Int32Array([5, 65, 41, 5, 66, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_58 = new Int32Array([5, 54, 24, 7, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_59 = new Int32Array([11, 36, 12, 7, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_60 = new Int32Array([5, 122, 98, 1, 123, 99]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_61 = new Int32Array([7, 73, 45, 3, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_62 = new Int32Array([15, 43, 19, 2, 44, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_63 = new Int32Array([3, 45, 15, 13, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_64 = new Int32Array([1, 135, 107, 5, 136, 108]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_65 = new Int32Array([10, 74, 46, 1, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_66 = new Int32Array([1, 50, 22, 15, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_67 = new Int32Array([2, 42, 14, 17, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_68 = new Int32Array([5, 150, 120, 1, 151, 121]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_69 = new Int32Array([9, 69, 43, 4, 70, 44]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_70 = new Int32Array([17, 50, 22, 1, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_71 = new Int32Array([2, 42, 14, 19, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_72 = new Int32Array([3, 141, 113, 4, 142, 114]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_73 = new Int32Array([3, 70, 44, 11, 71, 45]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_74 = new Int32Array([17, 47, 21, 4, 48, 22]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_75 = new Int32Array([9, 39, 13, 16, 40, 14]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_76 = new Int32Array([3, 135, 107, 5, 136, 108]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_77 = new Int32Array([3, 67, 41, 13, 68, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_78 = new Int32Array([15, 54, 24, 5, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_79 = new Int32Array([15, 43, 15, 10, 44, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_80 = new Int32Array([4, 144, 116, 4, 145, 117]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_81 = new Int32Array([17, 68, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_82 = new Int32Array([17, 50, 22, 6, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_83 = new Int32Array([19, 46, 16, 6, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_84 = new Int32Array([2, 139, 111, 7, 140, 112]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_85 = new Int32Array([17, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_86 = new Int32Array([7, 54, 24, 16, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_87 = new Int32Array([34, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_88 = new Int32Array([4, 151, 121, 5, 152, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_89 = new Int32Array([4, 75, 47, 14, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_90 = new Int32Array([11, 54, 24, 14, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_91 = new Int32Array([16, 45, 15, 14, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_92 = new Int32Array([6, 147, 117, 4, 148, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_93 = new Int32Array([6, 73, 45, 14, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_94 = new Int32Array([11, 54, 24, 16, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_95 = new Int32Array([30, 46, 16, 2, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_96 = new Int32Array([8, 132, 106, 4, 133, 107]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_97 = new Int32Array([8, 75, 47, 13, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_98 = new Int32Array([7, 54, 24, 22, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_99 = new Int32Array([22, 45, 15, 13, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_100 = new Int32Array([10, 142, 114, 2, 143, 115]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_101 = new Int32Array([19, 74, 46, 4, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_102 = new Int32Array([28, 50, 22, 6, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_103 = new Int32Array([33, 46, 16, 4, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_104 = new Int32Array([8, 152, 122, 4, 153, 123]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_105 = new Int32Array([22, 73, 45, 3, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_106 = new Int32Array([8, 53, 23, 26, 54, 24]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_107 = new Int32Array([12, 45, 15, 28, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_108 = new Int32Array([3, 147, 117, 10, 148, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_109 = new Int32Array([3, 73, 45, 23, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_110 = new Int32Array([4, 54, 24, 31, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_111 = new Int32Array([11, 45, 15, 31, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_112 = new Int32Array([7, 146, 116, 7, 147, 117]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_113 = new Int32Array([21, 73, 45, 7, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_114 = new Int32Array([1, 53, 23, 37, 54, 24]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_115 = new Int32Array([19, 45, 15, 26, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_116 = new Int32Array([5, 145, 115, 10, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_117 = new Int32Array([19, 75, 47, 10, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_118 = new Int32Array([15, 54, 24, 25, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_119 = new Int32Array([23, 45, 15, 25, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_120 = new Int32Array([13, 145, 115, 3, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_121 = new Int32Array([2, 74, 46, 29, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_122 = new Int32Array([42, 54, 24, 1, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_123 = new Int32Array([23, 45, 15, 28, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_124 = new Int32Array([17, 145, 115]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_125 = new Int32Array([10, 74, 46, 23, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_126 = new Int32Array([10, 54, 24, 35, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_127 = new Int32Array([19, 45, 15, 35, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_128 = new Int32Array([17, 145, 115, 1, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_129 = new Int32Array([14, 74, 46, 21, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_130 = new Int32Array([29, 54, 24, 19, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_131 = new Int32Array([11, 45, 15, 46, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_132 = new Int32Array([13, 145, 115, 6, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_133 = new Int32Array([14, 74, 46, 23, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_134 = new Int32Array([44, 54, 24, 7, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_135 = new Int32Array([59, 46, 16, 1, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_136 = new Int32Array([12, 151, 121, 7, 152, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_137 = new Int32Array([12, 75, 47, 26, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_138 = new Int32Array([39, 54, 24, 14, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_139 = new Int32Array([22, 45, 15, 41, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_140 = new Int32Array([6, 151, 121, 14, 152, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_141 = new Int32Array([6, 75, 47, 34, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_142 = new Int32Array([46, 54, 24, 10, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_143 = new Int32Array([2, 45, 15, 64, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_144 = new Int32Array([17, 152, 122, 4, 153, 123]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_145 = new Int32Array([29, 74, 46, 14, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_146 = new Int32Array([49, 54, 24, 10, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_147 = new Int32Array([24, 45, 15, 46, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_148 = new Int32Array([4, 152, 122, 18, 153, 123]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_149 = new Int32Array([13, 74, 46, 32, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_150 = new Int32Array([48, 54, 24, 14, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_151 = new Int32Array([42, 45, 15, 32, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_152 = new Int32Array([20, 147, 117, 4, 148, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_153 = new Int32Array([40, 75, 47, 7, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_154 = new Int32Array([43, 54, 24, 22, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_155 = new Int32Array([10, 45, 15, 67, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_156 = new Int32Array([19, 148, 118, 6, 149, 119]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_157 = new Int32Array([18, 75, 47, 31, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_158 = new Int32Array([34, 54, 24, 34, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    tmp.sf_1 = [tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, tmp_11, tmp_12, tmp_13, tmp_14, tmp_15, tmp_16, tmp_17, tmp_18, tmp_19, tmp_20, tmp_21, tmp_22, tmp_23, tmp_24, tmp_25, tmp_26, tmp_27, tmp_28, tmp_29, tmp_30, tmp_31, tmp_32, tmp_33, tmp_34, tmp_35, tmp_36, tmp_37, tmp_38, tmp_39, tmp_40, tmp_41, tmp_42, tmp_43, tmp_44, tmp_45, tmp_46, tmp_47, tmp_48, tmp_49, tmp_50, tmp_51, tmp_52, tmp_53, tmp_54, tmp_55, tmp_56, tmp_57, tmp_58, tmp_59, tmp_60, tmp_61, tmp_62, tmp_63, tmp_64, tmp_65, tmp_66, tmp_67, tmp_68, tmp_69, tmp_70, tmp_71, tmp_72, tmp_73, tmp_74, tmp_75, tmp_76, tmp_77, tmp_78, tmp_79, tmp_80, tmp_81, tmp_82, tmp_83, tmp_84, tmp_85, tmp_86, tmp_87, tmp_88, tmp_89, tmp_90, tmp_91, tmp_92, tmp_93, tmp_94, tmp_95, tmp_96, tmp_97, tmp_98, tmp_99, tmp_100, tmp_101, tmp_102, tmp_103, tmp_104, tmp_105, tmp_106, tmp_107, tmp_108, tmp_109, tmp_110, tmp_111, tmp_112, tmp_113, tmp_114, tmp_115, tmp_116, tmp_117, tmp_118, tmp_119, tmp_120, tmp_121, tmp_122, tmp_123, tmp_124, tmp_125, tmp_126, tmp_127, tmp_128, tmp_129, tmp_130, tmp_131, tmp_132, tmp_133, tmp_134, tmp_135, tmp_136, tmp_137, tmp_138, tmp_139, tmp_140, tmp_141, tmp_142, tmp_143, tmp_144, tmp_145, tmp_146, tmp_147, tmp_148, tmp_149, tmp_150, tmp_151, tmp_152, tmp_153, tmp_154, tmp_155, tmp_156, tmp_157, tmp_158, new Int32Array([20, 45, 15, 61, 46, 16])];\n  }\n  protoOf(Companion_10).getRSBlocks = function (typeNumber, errorCorrectionLevel) {\n    // Inline function 'kotlin.let' call\n    // Inline function 'kotlin.contracts.contract' call\n    // Inline function 'qrcode.internals.Companion.getRSBlocks.<anonymous>' call\n    var rsBlock = this.sf_1[imul(typeNumber - 1 | 0, 4) + errorCorrectionLevel.d5_1 | 0];\n    var tmp;\n    if (rsBlock.length === 3) {\n      var block = new RSBlock(rsBlock[1], rsBlock[2]);\n      var tmp_0 = 0;\n      var tmp_1 = rsBlock[0];\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_2 = fillArrayVal(Array(tmp_1), null);\n      while (tmp_0 < tmp_1) {\n        tmp_2[tmp_0] = block;\n        tmp_0 = tmp_0 + 1 | 0;\n      }\n      tmp = tmp_2;\n    } else {\n      var blocksSize = rsBlock[0] + rsBlock[3] | 0;\n      var firstBlock = new RSBlock(rsBlock[1], rsBlock[2]);\n      var secondBlock = new RSBlock(rsBlock[4], rsBlock[5]);\n      var tmp_3 = 0;\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_4 = fillArrayVal(Array(blocksSize), null);\n      while (tmp_3 < blocksSize) {\n        var tmp_5 = tmp_3;\n        var tmp_6;\n        if (tmp_5 < rsBlock[0]) {\n          tmp_6 = firstBlock;\n        } else {\n          tmp_6 = secondBlock;\n        }\n        tmp_4[tmp_5] = tmp_6;\n        tmp_3 = tmp_3 + 1 | 0;\n      }\n      tmp = tmp_4;\n    }\n    return tmp;\n  };\n  var Companion_instance_10;\n  function Companion_getInstance_10() {\n    if (Companion_instance_10 == null)\n      new Companion_10();\n    return Companion_instance_10;\n  }\n  function RSBlock(totalCount, dataCount) {\n    Companion_getInstance_10();\n    this.totalCount = totalCount;\n    this.dataCount = dataCount;\n  }\n  protoOf(RSBlock).tf = function (totalCount, dataCount) {\n    return new RSBlock(totalCount, dataCount);\n  };\n  protoOf(RSBlock).copy = function (totalCount, dataCount, $super) {\n    totalCount = totalCount === VOID ? this.totalCount : totalCount;\n    dataCount = dataCount === VOID ? this.dataCount : dataCount;\n    return this.tf(totalCount, dataCount);\n  };\n  protoOf(RSBlock).toString = function () {\n    return 'RSBlock(totalCount=' + this.totalCount + ', dataCount=' + this.dataCount + ')';\n  };\n  protoOf(RSBlock).hashCode = function () {\n    var result = this.totalCount;\n    result = imul(result, 31) + this.dataCount | 0;\n    return result;\n  };\n  protoOf(RSBlock).equals = function (other) {\n    if (this === other)\n      return true;\n    if (!(other instanceof RSBlock))\n      return false;\n    var tmp0_other_with_cast = other instanceof RSBlock ? other : THROW_CCE();\n    if (!(this.totalCount === tmp0_other_with_cast.totalCount))\n      return false;\n    if (!(this.dataCount === tmp0_other_with_cast.dataCount))\n      return false;\n    return true;\n  };\n  var ErrorCorrectionLevel_L_instance;\n  var ErrorCorrectionLevel_M_instance;\n  var ErrorCorrectionLevel_Q_instance;\n  var ErrorCorrectionLevel_H_instance;\n  function values_2() {\n    return [ErrorCorrectionLevel_L_getInstance(), ErrorCorrectionLevel_M_getInstance(), ErrorCorrectionLevel_Q_getInstance(), ErrorCorrectionLevel_H_getInstance()];\n  }\n  function valueOf_2(value) {\n    switch (value) {\n      case 'L':\n        return ErrorCorrectionLevel_L_getInstance();\n      case 'M':\n        return ErrorCorrectionLevel_M_getInstance();\n      case 'Q':\n        return ErrorCorrectionLevel_Q_getInstance();\n      case 'H':\n        return ErrorCorrectionLevel_H_getInstance();\n      default:\n        ErrorCorrectionLevel_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var ErrorCorrectionLevel_entriesInitialized;\n  function ErrorCorrectionLevel_initEntries() {\n    if (ErrorCorrectionLevel_entriesInitialized)\n      return Unit_instance;\n    ErrorCorrectionLevel_entriesInitialized = true;\n    ErrorCorrectionLevel_L_instance = new ErrorCorrectionLevel('L', 0, 1, 21);\n    ErrorCorrectionLevel_M_instance = new ErrorCorrectionLevel('M', 1, 0, 25);\n    ErrorCorrectionLevel_Q_instance = new ErrorCorrectionLevel('Q', 2, 3, 30);\n    ErrorCorrectionLevel_H_instance = new ErrorCorrectionLevel('H', 3, 2, 34);\n  }\n  function ErrorCorrectionLevel(name, ordinal, value, maxTypeNum) {\n    Enum.call(this, name, ordinal);\n    this.value = value;\n    this.maxTypeNum = maxTypeNum;\n  }\n  protoOf(ErrorCorrectionLevel).k2 = function () {\n    return this.value;\n  };\n  protoOf(ErrorCorrectionLevel).uf = function () {\n    return this.maxTypeNum;\n  };\n  var MaskPattern_PATTERN000_instance;\n  var MaskPattern_PATTERN001_instance;\n  var MaskPattern_PATTERN010_instance;\n  var MaskPattern_PATTERN011_instance;\n  var MaskPattern_PATTERN100_instance;\n  var MaskPattern_PATTERN101_instance;\n  var MaskPattern_PATTERN110_instance;\n  var MaskPattern_PATTERN111_instance;\n  function values_3() {\n    return [MaskPattern_PATTERN000_getInstance(), MaskPattern_PATTERN001_getInstance(), MaskPattern_PATTERN010_getInstance(), MaskPattern_PATTERN011_getInstance(), MaskPattern_PATTERN100_getInstance(), MaskPattern_PATTERN101_getInstance(), MaskPattern_PATTERN110_getInstance(), MaskPattern_PATTERN111_getInstance()];\n  }\n  function valueOf_3(value) {\n    switch (value) {\n      case 'PATTERN000':\n        return MaskPattern_PATTERN000_getInstance();\n      case 'PATTERN001':\n        return MaskPattern_PATTERN001_getInstance();\n      case 'PATTERN010':\n        return MaskPattern_PATTERN010_getInstance();\n      case 'PATTERN011':\n        return MaskPattern_PATTERN011_getInstance();\n      case 'PATTERN100':\n        return MaskPattern_PATTERN100_getInstance();\n      case 'PATTERN101':\n        return MaskPattern_PATTERN101_getInstance();\n      case 'PATTERN110':\n        return MaskPattern_PATTERN110_getInstance();\n      case 'PATTERN111':\n        return MaskPattern_PATTERN111_getInstance();\n      default:\n        MaskPattern_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var MaskPattern_entriesInitialized;\n  function MaskPattern_initEntries() {\n    if (MaskPattern_entriesInitialized)\n      return Unit_instance;\n    MaskPattern_entriesInitialized = true;\n    MaskPattern_PATTERN000_instance = new MaskPattern('PATTERN000', 0);\n    MaskPattern_PATTERN001_instance = new MaskPattern('PATTERN001', 1);\n    MaskPattern_PATTERN010_instance = new MaskPattern('PATTERN010', 2);\n    MaskPattern_PATTERN011_instance = new MaskPattern('PATTERN011', 3);\n    MaskPattern_PATTERN100_instance = new MaskPattern('PATTERN100', 4);\n    MaskPattern_PATTERN101_instance = new MaskPattern('PATTERN101', 5);\n    MaskPattern_PATTERN110_instance = new MaskPattern('PATTERN110', 6);\n    MaskPattern_PATTERN111_instance = new MaskPattern('PATTERN111', 7);\n  }\n  function MaskPattern(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  var QRCodeDataType_NUMBERS_instance;\n  var QRCodeDataType_UPPER_ALPHA_NUM_instance;\n  var QRCodeDataType_DEFAULT_instance;\n  function values_4() {\n    return [QRCodeDataType_NUMBERS_getInstance(), QRCodeDataType_UPPER_ALPHA_NUM_getInstance(), QRCodeDataType_DEFAULT_getInstance()];\n  }\n  function valueOf_4(value) {\n    switch (value) {\n      case 'NUMBERS':\n        return QRCodeDataType_NUMBERS_getInstance();\n      case 'UPPER_ALPHA_NUM':\n        return QRCodeDataType_UPPER_ALPHA_NUM_getInstance();\n      case 'DEFAULT':\n        return QRCodeDataType_DEFAULT_getInstance();\n      default:\n        QRCodeDataType_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var QRCodeDataType_entriesInitialized;\n  function QRCodeDataType_initEntries() {\n    if (QRCodeDataType_entriesInitialized)\n      return Unit_instance;\n    QRCodeDataType_entriesInitialized = true;\n    QRCodeDataType_NUMBERS_instance = new QRCodeDataType('NUMBERS', 0, 1);\n    QRCodeDataType_UPPER_ALPHA_NUM_instance = new QRCodeDataType('UPPER_ALPHA_NUM', 1, 2);\n    QRCodeDataType_DEFAULT_instance = new QRCodeDataType('DEFAULT', 2, 4);\n  }\n  function QRCodeDataType(name, ordinal, value) {\n    Enum.call(this, name, ordinal);\n    this.value = value;\n  }\n  protoOf(QRCodeDataType).k2 = function () {\n    return this.value;\n  };\n  function ErrorCorrectionLevel_L_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_L_instance;\n  }\n  function ErrorCorrectionLevel_M_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_M_instance;\n  }\n  function ErrorCorrectionLevel_Q_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_Q_instance;\n  }\n  function ErrorCorrectionLevel_H_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_H_instance;\n  }\n  function MaskPattern_PATTERN000_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN000_instance;\n  }\n  function MaskPattern_PATTERN001_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN001_instance;\n  }\n  function MaskPattern_PATTERN010_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN010_instance;\n  }\n  function MaskPattern_PATTERN011_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN011_instance;\n  }\n  function MaskPattern_PATTERN100_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN100_instance;\n  }\n  function MaskPattern_PATTERN101_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN101_instance;\n  }\n  function MaskPattern_PATTERN110_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN110_instance;\n  }\n  function MaskPattern_PATTERN111_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN111_instance;\n  }\n  function QRCodeDataType_NUMBERS_getInstance() {\n    QRCodeDataType_initEntries();\n    return QRCodeDataType_NUMBERS_instance;\n  }\n  function QRCodeDataType_UPPER_ALPHA_NUM_getInstance() {\n    QRCodeDataType_initEntries();\n    return QRCodeDataType_UPPER_ALPHA_NUM_instance;\n  }\n  function QRCodeDataType_DEFAULT_getInstance() {\n    QRCodeDataType_initEntries();\n    return QRCodeDataType_DEFAULT_instance;\n  }\n  function Companion_11() {\n    this.DEFAULT_CELL_SIZE = 25;\n    this.DEFAULT_MARGIN = 0;\n    this.zf_1 = 236;\n    this.ag_1 = 17;\n  }\n  protoOf(Companion_11).cg = function () {\n    return this.DEFAULT_CELL_SIZE;\n  };\n  protoOf(Companion_11).dg = function () {\n    return this.DEFAULT_MARGIN;\n  };\n  protoOf(Companion_11).eg = function (data, errorCorrectionLevel, dataType) {\n    var tmp;\n    switch (dataType.d5_1) {\n      case 0:\n        tmp = new QRNumber(data);\n        break;\n      case 1:\n        tmp = new QRAlphaNum(data);\n        break;\n      case 2:\n        tmp = new QR8BitByte(data);\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    var qrCodeData = tmp;\n    var dataLength = qrCodeData.length();\n    var inductionVariable = 1;\n    var last = errorCorrectionLevel.maxTypeNum;\n    if (inductionVariable < last)\n      do {\n        var typeNum = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        if (dataLength <= QRUtil_getInstance().getMaxLength(typeNum, dataType, errorCorrectionLevel)) {\n          return typeNum;\n        }\n      }\n       while (inductionVariable < last);\n    return 40;\n  };\n  protoOf(Companion_11).typeForDataAndECL = function (data, errorCorrectionLevel, dataType, $super) {\n    dataType = dataType === VOID ? QRUtil_getInstance().getDataType(data) : dataType;\n    return this.eg(data, errorCorrectionLevel, dataType);\n  };\n  var Companion_instance_11;\n  function Companion_getInstance_11() {\n    return Companion_instance_11;\n  }\n  function createData($this, type) {\n    var rsBlocks = Companion_getInstance_10().getRSBlocks(type, $this.hg_1);\n    var buffer = new BitBuffer();\n    buffer.put($this.jg_1.dataType.value, 4);\n    buffer.put($this.jg_1.length(), $this.jg_1.getLengthInBits(type));\n    $this.jg_1.write(buffer);\n    // Inline function 'kotlin.collections.sumOf' call\n    var sum = 0;\n    var inductionVariable = 0;\n    var last = rsBlocks.length;\n    while (inductionVariable < last) {\n      var element = rsBlocks[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      var tmp = sum;\n      // Inline function 'qrcode.raw.QRCodeProcessor.createData.<anonymous>' call\n      sum = tmp + element.dataCount | 0;\n    }\n    var tmp$ret$1 = sum;\n    var totalDataCount = imul(tmp$ret$1, 8);\n    if (buffer.lengthInBits > totalDataCount) {\n      throw IllegalArgumentException_init_$Create$_0('Code length overflow (' + buffer.lengthInBits + ' > ' + totalDataCount + ')');\n    }\n    if ((buffer.lengthInBits + 4 | 0) <= totalDataCount) {\n      buffer.put(0, 4);\n    }\n    while (!((buffer.lengthInBits % 8 | 0) === 0)) {\n      buffer.putBit(false);\n    }\n    $l$loop_0: while (buffer.lengthInBits < totalDataCount) {\n      buffer.put(236, 8);\n      if (buffer.lengthInBits >= totalDataCount) {\n        break;\n      }\n      buffer.put(17, 8);\n    }\n    return createBytes($this, buffer, rsBlocks);\n  }\n  function createBytes($this, buffer, rsBlocks) {\n    var offset = 0;\n    var maxDcCount = 0;\n    var maxEcCount = 0;\n    var totalCodeCount = 0;\n    var tmp = 0;\n    var tmp_0 = rsBlocks.length;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_1 = fillArrayVal(Array(tmp_0), null);\n    while (tmp < tmp_0) {\n      tmp_1[tmp] = new Int32Array(0);\n      tmp = tmp + 1 | 0;\n    }\n    var dcData = tmp_1;\n    var tmp_2 = 0;\n    var tmp_3 = rsBlocks.length;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_4 = fillArrayVal(Array(tmp_3), null);\n    while (tmp_2 < tmp_3) {\n      tmp_4[tmp_2] = new Int32Array(0);\n      tmp_2 = tmp_2 + 1 | 0;\n    }\n    var ecData = tmp_4;\n    // Inline function 'kotlin.collections.forEachIndexed' call\n    var index = 0;\n    var inductionVariable = 0;\n    var last = rsBlocks.length;\n    while (inductionVariable < last) {\n      var item = rsBlocks[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      // Inline function 'qrcode.raw.QRCodeProcessor.createBytes.<anonymous>' call\n      var tmp1 = index;\n      index = tmp1 + 1 | 0;\n      var dcCount = item.dataCount;\n      var ecCount = item.totalCount - dcCount | 0;\n      totalCodeCount = totalCodeCount + item.totalCount | 0;\n      maxDcCount = coerceAtLeast(maxDcCount, dcCount);\n      maxEcCount = coerceAtLeast(maxEcCount, ecCount);\n      var tmp_5 = 0;\n      var tmp_6 = new Int32Array(dcCount);\n      while (tmp_5 < dcCount) {\n        var tmp_7 = tmp_5;\n        tmp_6[tmp_7] = 255 & buffer.buffer[tmp_7 + offset | 0];\n        tmp_5 = tmp_5 + 1 | 0;\n      }\n      dcData[tmp1] = tmp_6;\n      offset = offset + dcCount | 0;\n      var rsPoly = QRUtil_getInstance().getErrorCorrectPolynomial(ecCount);\n      var rawPoly = new Polynomial(dcData[tmp1], rsPoly.len() - 1 | 0);\n      var modPoly = rawPoly.mod(rsPoly);\n      var ecDataSize = rsPoly.len() - 1 | 0;\n      var tmp_8 = 0;\n      var tmp_9 = new Int32Array(ecDataSize);\n      while (tmp_8 < ecDataSize) {\n        var tmp_10 = tmp_8;\n        var modIndex = (tmp_10 + modPoly.len() | 0) - ecDataSize | 0;\n        tmp_9[tmp_10] = modIndex >= 0 ? modPoly.get(modIndex) : 0;\n        tmp_8 = tmp_8 + 1 | 0;\n      }\n      ecData[tmp1] = tmp_9;\n    }\n    var index_0 = 0;\n    var data = new Int32Array(totalCodeCount);\n    var inductionVariable_0 = 0;\n    var last_0 = maxDcCount;\n    if (inductionVariable_0 < last_0)\n      do {\n        var i = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        var inductionVariable_1 = 0;\n        var last_1 = rsBlocks.length - 1 | 0;\n        if (inductionVariable_1 <= last_1)\n          do {\n            var r = inductionVariable_1;\n            inductionVariable_1 = inductionVariable_1 + 1 | 0;\n            if (i < dcData[r].length) {\n              var tmp2 = index_0;\n              index_0 = tmp2 + 1 | 0;\n              data[tmp2] = dcData[r][i];\n            }\n          }\n           while (inductionVariable_1 <= last_1);\n      }\n       while (inductionVariable_0 < last_0);\n    var inductionVariable_2 = 0;\n    var last_2 = maxEcCount;\n    if (inductionVariable_2 < last_2)\n      do {\n        var i_0 = inductionVariable_2;\n        inductionVariable_2 = inductionVariable_2 + 1 | 0;\n        var inductionVariable_3 = 0;\n        var last_3 = rsBlocks.length - 1 | 0;\n        if (inductionVariable_3 <= last_3)\n          do {\n            var r_0 = inductionVariable_3;\n            inductionVariable_3 = inductionVariable_3 + 1 | 0;\n            if (i_0 < ecData[r_0].length) {\n              var tmp5 = index_0;\n              index_0 = tmp5 + 1 | 0;\n              data[tmp5] = ecData[r_0][i_0];\n            }\n          }\n           while (inductionVariable_3 <= last_3);\n      }\n       while (inductionVariable_2 < last_2);\n    return data;\n  }\n  function QRCodeProcessor$render$lambda($cellSize, $darkColor, $brightColor, $margin, $marginColor) {\n    return function (x, y, cellData, graphics) {\n      var tmp;\n      if (!cellData.squareInfo.type.equals(QRCodeSquareType_MARGIN_getInstance())) {\n        var tmp_0;\n        if (cellData.dark) {\n          graphics.fillRect(x, y, $cellSize, $cellSize, $darkColor);\n          tmp_0 = Unit_instance;\n        } else {\n          graphics.fillRect(x, y, $cellSize, $cellSize, $brightColor);\n          tmp_0 = Unit_instance;\n        }\n        tmp = tmp_0;\n      } else {\n        graphics.fillRect(x, y, $margin, $margin, $marginColor);\n        tmp = Unit_instance;\n      }\n      return Unit_instance;\n    };\n  }\n  function QRCodeProcessor(data, errorCorrectionLevel, dataType, graphicsFactory) {\n    errorCorrectionLevel = errorCorrectionLevel === VOID ? ErrorCorrectionLevel_M_getInstance() : errorCorrectionLevel;\n    dataType = dataType === VOID ? QRUtil_getInstance().getDataType(data) : dataType;\n    graphicsFactory = graphicsFactory === VOID ? new QRCodeGraphicsFactory() : graphicsFactory;\n    this.gg_1 = data;\n    this.hg_1 = errorCorrectionLevel;\n    this.ig_1 = dataType;\n    this.graphicsFactory = graphicsFactory;\n    var tmp = this;\n    var tmp_0;\n    switch (this.ig_1.d5_1) {\n      case 0:\n        tmp_0 = new QRNumber(this.gg_1);\n        break;\n      case 1:\n        tmp_0 = new QRAlphaNum(this.gg_1);\n        break;\n      case 2:\n        tmp_0 = new QR8BitByte(this.gg_1);\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    tmp.jg_1 = tmp_0;\n  }\n  protoOf(QRCodeProcessor).s6 = function () {\n    return this.graphicsFactory;\n  };\n  protoOf(QRCodeProcessor).kg = function (cellSize, margin, rawData) {\n    return this.computeImageSize(cellSize, margin, rawData.length);\n  };\n  protoOf(QRCodeProcessor).computeImageSizeFromRawData = function (cellSize, margin, rawData, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    margin = margin === VOID ? 0 : margin;\n    rawData = rawData === VOID ? this.encode() : rawData;\n    return this.kg(cellSize, margin, rawData);\n  };\n  protoOf(QRCodeProcessor).lg = function (cellSize, margin, size) {\n    return imul(size, cellSize) + imul(margin, 2) | 0;\n  };\n  protoOf(QRCodeProcessor).computeImageSize = function (cellSize, margin, size, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    margin = margin === VOID ? 0 : margin;\n    return this.lg(cellSize, margin, size);\n  };\n  protoOf(QRCodeProcessor).mg = function (cellSize, margin, brightColor, darkColor, marginColor) {\n    return this.renderComputed(cellSize, margin, this.encode(), VOID, brightColor, darkColor, marginColor);\n  };\n  protoOf(QRCodeProcessor).render = function (cellSize, margin, brightColor, darkColor, marginColor, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    margin = margin === VOID ? 0 : margin;\n    var tmp;\n    if (brightColor === VOID) {\n      tmp = -1;\n    } else {\n      tmp = brightColor;\n    }\n    brightColor = tmp;\n    var tmp_0;\n    if (darkColor === VOID) {\n      tmp_0 = -16777216;\n    } else {\n      tmp_0 = darkColor;\n    }\n    darkColor = tmp_0;\n    var tmp_1;\n    if (marginColor === VOID) {\n      tmp_1 = -1;\n    } else {\n      tmp_1 = marginColor;\n    }\n    marginColor = tmp_1;\n    return this.mg(cellSize, margin, brightColor, darkColor, marginColor);\n  };\n  protoOf(QRCodeProcessor).ng = function (cellSize, margin, rawData, qrCodeGraphics, brightColor, darkColor, marginColor) {\n    return this.renderShaded(cellSize, margin, rawData, qrCodeGraphics, QRCodeProcessor$render$lambda(cellSize, darkColor, brightColor, margin, marginColor));\n  };\n  protoOf(QRCodeProcessor).renderComputed = function (cellSize, margin, rawData, qrCodeGraphics, brightColor, darkColor, marginColor, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    margin = margin === VOID ? 0 : margin;\n    rawData = rawData === VOID ? this.encode() : rawData;\n    qrCodeGraphics = qrCodeGraphics === VOID ? this.graphicsFactory.newGraphicsSquare(this.computeImageSizeFromRawData(cellSize, margin, rawData)) : qrCodeGraphics;\n    var tmp;\n    if (brightColor === VOID) {\n      tmp = -1;\n    } else {\n      tmp = brightColor;\n    }\n    brightColor = tmp;\n    var tmp_0;\n    if (darkColor === VOID) {\n      tmp_0 = -16777216;\n    } else {\n      tmp_0 = darkColor;\n    }\n    darkColor = tmp_0;\n    var tmp_1;\n    if (marginColor === VOID) {\n      tmp_1 = -1;\n    } else {\n      tmp_1 = marginColor;\n    }\n    marginColor = tmp_1;\n    return this.ng(cellSize, margin, rawData, qrCodeGraphics, brightColor, darkColor, marginColor);\n  };\n  protoOf(QRCodeProcessor).og = function (cellSize, margin, rawData, qrCodeGraphics, renderer) {\n    if (margin > 0) {\n      var marginSquare = new QRCodeSquare(false, 0, 0, rawData.length, Companion_instance_9.cf());\n      renderer(marginSquare.absoluteX(margin), marginSquare.absoluteY(margin), marginSquare, qrCodeGraphics);\n    }\n    // Inline function 'kotlin.collections.forEach' call\n    var inductionVariable = 0;\n    var last = rawData.length;\n    while (inductionVariable < last) {\n      var element = rawData[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      // Inline function 'qrcode.raw.QRCodeProcessor.renderShaded.<anonymous>' call\n      // Inline function 'kotlin.collections.forEach' call\n      var inductionVariable_0 = 0;\n      var last_0 = element.length;\n      while (inductionVariable_0 < last_0) {\n        var element_0 = element[inductionVariable_0];\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        // Inline function 'qrcode.raw.QRCodeProcessor.renderShaded.<anonymous>.<anonymous>' call\n        if (!element_0.rendered) {\n          renderer(element_0.absoluteX(cellSize) + margin | 0, element_0.absoluteY(cellSize) + margin | 0, element_0, qrCodeGraphics);\n          element_0.rendered = true;\n        }\n      }\n    }\n    return qrCodeGraphics;\n  };\n  protoOf(QRCodeProcessor).renderShaded = function (cellSize, margin, rawData, qrCodeGraphics, renderer, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    margin = margin === VOID ? 0 : margin;\n    rawData = rawData === VOID ? this.encode() : rawData;\n    qrCodeGraphics = qrCodeGraphics === VOID ? this.graphicsFactory.newGraphicsSquare(this.computeImageSizeFromRawData(cellSize, margin, rawData)) : qrCodeGraphics;\n    return this.og(cellSize, margin, rawData, qrCodeGraphics, renderer);\n  };\n  protoOf(QRCodeProcessor).pg = function (type, maskPattern) {\n    var moduleCount = imul(type, 4) + 17 | 0;\n    var tmp = 0;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_0 = fillArrayVal(Array(moduleCount), null);\n    while (tmp < moduleCount) {\n      var tmp_1 = tmp;\n      var tmp_2 = 0;\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_3 = fillArrayVal(Array(moduleCount), null);\n      while (tmp_2 < moduleCount) {\n        tmp_3[tmp_2] = null;\n        tmp_2 = tmp_2 + 1 | 0;\n      }\n      tmp_0[tmp_1] = tmp_3;\n      tmp = tmp + 1 | 0;\n    }\n    var modules = tmp_0;\n    QRCodeSetup_instance.setupTopLeftPositionProbePattern(modules);\n    QRCodeSetup_instance.setupTopRightPositionProbePattern(modules);\n    QRCodeSetup_instance.setupBottomLeftPositionProbePattern(modules);\n    QRCodeSetup_instance.setupPositionAdjustPattern(type, modules);\n    QRCodeSetup_instance.setupTimingPattern(moduleCount, modules);\n    QRCodeSetup_instance.setupTypeInfo(this.hg_1, maskPattern, moduleCount, modules);\n    if (type >= 7) {\n      QRCodeSetup_instance.setupTypeNumber(type, moduleCount, modules);\n    }\n    var data = createData(this, type);\n    QRCodeSetup_instance.applyMaskPattern(data, maskPattern, moduleCount, modules);\n    var tmp_4 = 0;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_5 = fillArrayVal(Array(moduleCount), null);\n    while (tmp_4 < moduleCount) {\n      var tmp_6 = tmp_4;\n      var tmp_7 = 0;\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_8 = fillArrayVal(Array(moduleCount), null);\n      while (tmp_7 < moduleCount) {\n        var tmp_9 = tmp_7;\n        var tmp0_elvis_lhs = modules[tmp_6][tmp_9];\n        tmp_8[tmp_9] = tmp0_elvis_lhs == null ? new QRCodeSquare(false, tmp_6, tmp_9, moduleCount) : tmp0_elvis_lhs;\n        tmp_7 = tmp_7 + 1 | 0;\n      }\n      tmp_5[tmp_6] = tmp_8;\n      tmp_4 = tmp_4 + 1 | 0;\n    }\n    return tmp_5;\n  };\n  protoOf(QRCodeProcessor).encode = function (type, maskPattern, $super) {\n    type = type === VOID ? Companion_instance_11.typeForDataAndECL(this.gg_1, this.hg_1) : type;\n    maskPattern = maskPattern === VOID ? MaskPattern_PATTERN000_getInstance() : maskPattern;\n    return this.pg(type, maskPattern);\n  };\n  protoOf(QRCodeProcessor).toString = function () {\n    return 'QRCode(data=' + this.gg_1 + (', errorCorrectionLevel=' + this.hg_1) + (', dataType=' + this.ig_1) + (', qrCodeData=' + getKClassFromExpression(this.jg_1).o2()) + ')';\n  };\n  function QRCodeGraphicsFactory() {\n  }\n  protoOf(QRCodeGraphicsFactory).newGraphicsSquare = function (size) {\n    return this.newGraphics(size, size);\n  };\n  protoOf(QRCodeGraphicsFactory).newGraphics = function (width, height) {\n    return new QRCodeGraphics(width, height);\n  };\n  function Companion_12() {\n  }\n  protoOf(Companion_12).defaultRadius = function (squareSize) {\n    return roundToInt(squareSize / 1.75);\n  };\n  protoOf(Companion_12).defaultInnerSpace = function (squareSize) {\n    return roundToInt(squareSize * 0.05);\n  };\n  var Companion_instance_12;\n  function Companion_getInstance_12() {\n    return Companion_instance_12;\n  }\n  function CircleShapeFunction(squareSize, innerSpace) {\n    var tmp;\n    if (squareSize === VOID) {\n      tmp = 25;\n    } else {\n      tmp = squareSize;\n    }\n    squareSize = tmp;\n    innerSpace = innerSpace === VOID ? Companion_instance_12.defaultInnerSpace(squareSize) : innerSpace;\n    RoundSquaresShapeFunction.call(this, squareSize, squareSize, innerSpace);\n  }\n  function drawSquaresLine($this, x, y, amount, skip, color, canvas) {\n    var progression = step(until(0, amount), skip);\n    var inductionVariable = progression.n4_1;\n    var last = progression.o4_1;\n    var step_0 = progression.p4_1;\n    if ((step_0 > 0 ? inductionVariable <= last : false) ? true : step_0 < 0 ? last <= inductionVariable : false)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + step_0 | 0;\n        $this.fillRect((x + imul($this.squareSize, i) | 0) + $this.qg_1 | 0, y + $this.qg_1 | 0, $this.squareSize - imul($this.qg_1, 2) | 0, $this.squareSize - imul($this.qg_1, 2) | 0, color, canvas);\n      }\n       while (!(i === last));\n  }\n  function DefaultShapeFunction(squareSize, innerSpace) {\n    var tmp;\n    if (squareSize === VOID) {\n      tmp = 25;\n    } else {\n      tmp = squareSize;\n    }\n    squareSize = tmp;\n    innerSpace = innerSpace === VOID ? 1 : innerSpace;\n    this.squareSize = squareSize;\n    this.qg_1 = coerceIn(innerSpace, numberRangeToNumber(0, this.squareSize / 2 | 0));\n  }\n  protoOf(DefaultShapeFunction).o6 = function () {\n    return this.squareSize;\n  };\n  protoOf(DefaultShapeFunction).renderSquare = function (x, y, colorFn, square, canvas, qrCode) {\n    var bg = colorFn.bg(square.row, square.col, qrCode, canvas);\n    var fg = colorFn.fg(square.row, square.col, qrCode, canvas);\n    if (square.squareInfo.type.equals(QRCodeSquareType_MARGIN_getInstance())) {\n      var margin = colorFn.margin(square.row, square.col, qrCode, canvas);\n      canvas.fill(margin);\n    } else {\n      var color = square.dark ? fg : bg;\n      this.fillRect(x + this.qg_1 | 0, y + this.qg_1 | 0, this.squareSize - imul(this.qg_1, 2) | 0, this.squareSize - imul(this.qg_1, 2) | 0, color, canvas);\n    }\n  };\n  protoOf(DefaultShapeFunction).renderControlSquare = function (xOffset, yOffset, colorFn, square, canvas, qrCode) {\n    var bg = colorFn.bg(square.row, square.col, qrCode, canvas);\n    var fg = colorFn.fg(square.row, square.col, qrCode, canvas);\n    var size = imul(this.squareSize, square.rowSize);\n    var startX = xOffset + square.absoluteX(this.squareSize) | 0;\n    var startY = yOffset + square.absoluteY(this.squareSize) | 0;\n    if (square.squareInfo.type.d5_1 === 0) {\n      var margin = colorFn.margin(square.row, square.col, qrCode, canvas);\n      canvas.fillRect(startX, startY, size + imul(this.squareSize, 2) | 0, size + imul(this.squareSize, 2) | 0, margin);\n      this.drawRect((startX + this.squareSize | 0) + this.qg_1 | 0, (startY + this.squareSize | 0) + this.qg_1 | 0, size - imul(this.qg_1, 2) | 0, size - imul(this.qg_1, 2) | 0, fg, this.squareSize, canvas);\n      this.fillRect((startX + this.squareSize | 0) + imul(this.squareSize, 2) | 0, (startY + this.squareSize | 0) + imul(this.squareSize, 2) | 0, size - imul(this.squareSize, 4) | 0, size - imul(this.squareSize, 4) | 0, fg, canvas);\n    } else {\n      canvas.fillRect(startX, startY, size, size, bg);\n      drawSquaresLine(this, startX, startY, 5, 1, fg, canvas);\n      drawSquaresLine(this, startX, startY + this.squareSize | 0, 5, 4, fg, canvas);\n      drawSquaresLine(this, startX, startY + imul(this.squareSize, 2) | 0, 5, 2, fg, canvas);\n      drawSquaresLine(this, startX, startY + imul(this.squareSize, 3) | 0, 5, 4, fg, canvas);\n      drawSquaresLine(this, startX, startY + imul(this.squareSize, 4) | 0, 5, 1, fg, canvas);\n    }\n  };\n  protoOf(DefaultShapeFunction).fillRect = function (x, y, width, height, color, canvas) {\n    canvas.fillRect(x, y, width, height, color);\n  };\n  protoOf(DefaultShapeFunction).drawRect = function (x, y, width, height, color, thickness, canvas) {\n    canvas.drawRect(x, y, width, height, color, thickness);\n  };\n  function QRCodeShapeFunction() {\n  }\n  function Companion_13() {\n  }\n  protoOf(Companion_13).defaultRadius = function (squareSize) {\n    return roundToInt(squareSize / 1.75);\n  };\n  protoOf(Companion_13).defaultInnerSpace = function (squareSize) {\n    return roundToInt(squareSize * 0.05);\n  };\n  var Companion_instance_13;\n  function Companion_getInstance_13() {\n    return Companion_instance_13;\n  }\n  function RoundSquaresShapeFunction(squareSize, radius, innerSpace) {\n    var tmp;\n    if (squareSize === VOID) {\n      tmp = 25;\n    } else {\n      tmp = squareSize;\n    }\n    squareSize = tmp;\n    radius = radius === VOID ? Companion_instance_13.defaultRadius(squareSize) : radius;\n    innerSpace = innerSpace === VOID ? Companion_instance_13.defaultInnerSpace(squareSize) : innerSpace;\n    DefaultShapeFunction.call(this, squareSize, innerSpace);\n    this.sg_1 = radius;\n  }\n  protoOf(RoundSquaresShapeFunction).fillRect = function (x, y, width, height, color, canvas) {\n    canvas.fillRoundRect(x, y, width, height, this.sg_1, color);\n  };\n  protoOf(RoundSquaresShapeFunction).drawRect = function (x, y, width, height, color, thickness, canvas) {\n    canvas.drawRoundRect(x, y, width, height, this.sg_1, color, thickness);\n  };\n  function Companion_14() {\n    this.tg_1 = 'Canvas seems to not be supported :(';\n    this.ug_1 = 6.283185307179586;\n  }\n  var Companion_instance_14;\n  function Companion_getInstance_14() {\n    return Companion_instance_14;\n  }\n  function rgba($this, color) {\n    var r = color >> 16 & 255;\n    var g = color >> 8 & 255;\n    var b = color >> 0 & 255;\n    var a = (color >> 24 & 255) / 255.0;\n    return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n  }\n  function draw_0($this, color, action) {\n    $this.wg_1 = true;\n    var context = tryGet($this, QRCodeGraphics$draw$lambda($this));\n    var colorString = rgba($this, color);\n    context.fillStyle = colorString;\n    context.strokeStyle = colorString;\n    var lineWidth = context.lineWidth;\n    action(context);\n    context.lineWidth = lineWidth;\n  }\n  function tryGet($this, what) {\n    var tmp;\n    try {\n      tmp = what();\n    } catch ($p) {\n      var tmp_0;\n      if ($p instanceof Error) {\n        var t = $p;\n        throw Error_init_$Create$_0('Canvas seems to not be supported :(', t);\n      } else {\n        throw $p;\n      }\n    }\n    return tmp;\n  }\n  function QRCodeGraphics$lambda() {\n    var tmp = document.createElement('canvas');\n    return tmp instanceof HTMLCanvasElement ? tmp : THROW_CCE();\n  }\n  function QRCodeGraphics$draw$lambda(this$0) {\n    return function () {\n      var tmp = this$0.vg_1.getContext('2d');\n      return tmp instanceof CanvasRenderingContext2D ? tmp : THROW_CCE();\n    };\n  }\n  function QRCodeGraphics$reset$lambda(this$0) {\n    return function ($this$draw) {\n      $this$draw.clearRect(0.0, 0.0, this$0.width, this$0.height);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawLine$lambda($x1, $y1, $x2, $y2) {\n    return function ($this$draw) {\n      $this$draw.moveTo($x1, $y1);\n      $this$draw.lineTo($x2, $y2);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawRect$lambda($thickness, $x, $y, $width, $height) {\n    return function ($this$draw) {\n      $this$draw.lineWidth = $thickness;\n      var halfThickness = $thickness / 2.0;\n      $this$draw.strokeRect($x + halfThickness, $y + halfThickness, $width - $thickness, $height - $thickness);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$fillRect$lambda($x, $y, $width, $height) {\n    return function ($this$draw) {\n      $this$draw.fillRect($x, $y, $width, $height);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawEllipse$lambda($width, $height, $thickness, $x, $y) {\n    return function ($this$draw) {\n      var radiusX = $width / 2.0;\n      var radiusY = $height / 2.0;\n      $this$draw.lineWidth = $thickness;\n      $this$draw.beginPath();\n      $this$draw.ellipse(radiusX + $x, radiusY + $y, radiusX, radiusY, 0.0, 0.0, 6.283185307179586, false);\n      $this$draw.stroke();\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$fillEllipse$lambda($width, $height, $x, $y) {\n    return function ($this$draw) {\n      var radiusX = $width / 2.0;\n      var radiusY = $height / 2.0;\n      $this$draw.beginPath();\n      $this$draw.ellipse(radiusX + $x, radiusY + $y, radiusX, radiusY, 0.0, 0.0, 6.283185307179586, false);\n      $this$draw.fill();\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawImage$lambda($rawData, this$0, $x, $y) {\n    return function ($this$draw) {\n      var imageData = new ImageData(new Uint8ClampedArray(toTypedArray($rawData)), this$0.width);\n      $this$draw.putImageData(imageData, $x, $y);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics(width, height) {\n    this.width = width;\n    this.height = height;\n    this.wg_1 = false;\n    var canvas = tryGet(this, QRCodeGraphics$lambda);\n    canvas.width = this.width;\n    canvas.height = this.height;\n    this.vg_1 = canvas;\n  }\n  protoOf(QRCodeGraphics).xg = function () {\n    return this.width;\n  };\n  protoOf(QRCodeGraphics).yg = function () {\n    return this.height;\n  };\n  protoOf(QRCodeGraphics).changed = function () {\n    return this.wg_1;\n  };\n  protoOf(QRCodeGraphics).reset = function () {\n    if (this.wg_1) {\n      this.wg_1 = false;\n      draw_0(this, 0, QRCodeGraphics$reset$lambda(this));\n    }\n  };\n  protoOf(QRCodeGraphics).dimensions = function () {\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return [this.width, this.height];\n  };\n  protoOf(QRCodeGraphics).zg = function (format) {\n    return this.vg_1.toDataURL(format);\n  };\n  protoOf(QRCodeGraphics).toDataURL = function (format, $super) {\n    format = format === VOID ? 'png' : format;\n    return this.zg(format);\n  };\n  protoOf(QRCodeGraphics).toBlob = function (callback) {\n    return this.vg_1.toBlob(callback);\n  };\n  protoOf(QRCodeGraphics).getBytes = function () {\n    return this.getBytesForFormat('png');\n  };\n  protoOf(QRCodeGraphics).getBytesForFormat = function (format) {\n    return encodeToByteArray(this.vg_1.toDataURL(format));\n  };\n  protoOf(QRCodeGraphics).availableFormats = function () {\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return ['png'];\n  };\n  protoOf(QRCodeGraphics).nativeImage = function () {\n    return this.vg_1;\n  };\n  protoOf(QRCodeGraphics).drawLine = function (x1, y1, x2, y2, color, thickness) {\n    draw_0(this, color, QRCodeGraphics$drawLine$lambda(x1, y1, x2, y2));\n  };\n  protoOf(QRCodeGraphics).drawRect = function (x, y, width, height, color, thickness) {\n    draw_0(this, color, QRCodeGraphics$drawRect$lambda(thickness, x, y, width, height));\n  };\n  protoOf(QRCodeGraphics).fillRect = function (x, y, width, height, color) {\n    draw_0(this, color, QRCodeGraphics$fillRect$lambda(x, y, width, height));\n  };\n  protoOf(QRCodeGraphics).fill = function (color) {\n    this.fillRect(0, 0, this.width, this.height, color);\n  };\n  protoOf(QRCodeGraphics).drawRoundRect = function (x, y, width, height, borderRadius, color, thickness) {\n    this.drawRect(x, y, width, height, color, 1.0);\n  };\n  protoOf(QRCodeGraphics).fillRoundRect = function (x, y, width, height, borderRadius, color) {\n    this.fillRect(x, y, width, height, color);\n  };\n  protoOf(QRCodeGraphics).drawEllipse = function (x, y, width, height, color, thickness) {\n    draw_0(this, color, QRCodeGraphics$drawEllipse$lambda(width, height, thickness, x, y));\n  };\n  protoOf(QRCodeGraphics).fillEllipse = function (x, y, width, height, color) {\n    draw_0(this, color, QRCodeGraphics$fillEllipse$lambda(width, height, x, y));\n  };\n  protoOf(QRCodeGraphics).drawImageFromBytes = function (rawData, x, y) {\n    var tmp;\n    if (!(rawData == null)) {\n      // Inline function 'kotlin.collections.isNotEmpty' call\n      // Inline function 'kotlin.collections.isEmpty' call\n      tmp = !(rawData.length === 0);\n    } else {\n      tmp = false;\n    }\n    if (tmp) {\n      draw_0(this, 0, QRCodeGraphics$drawImage$lambda(rawData, this, x, y));\n    }\n  };\n  //region block: post-declaration\n  protoOf(InternalHashMap).g1 = containsAllEntries;\n  defineProp(protoOf(QRCodeShapesEnum), 'name', protoOf(QRCodeShapesEnum).e5);\n  defineProp(protoOf(QRCodeShapesEnum), 'ordinal', protoOf(QRCodeShapesEnum).f5);\n  protoOf(DefaultColorFunction).colorFn = colorFn;\n  protoOf(DefaultColorFunction).beforeRender = beforeRender;\n  protoOf(LinearGradientColorFunction).colorFn = colorFn;\n  protoOf(LinearGradientColorFunction).beforeRender = beforeRender;\n  defineProp(protoOf(QRCodeSquareType), 'name', protoOf(QRCodeSquareType).e5);\n  defineProp(protoOf(QRCodeSquareType), 'ordinal', protoOf(QRCodeSquareType).f5);\n  defineProp(protoOf(QRCodeRegion), 'name', protoOf(QRCodeRegion).e5);\n  defineProp(protoOf(QRCodeRegion), 'ordinal', protoOf(QRCodeRegion).f5);\n  defineProp(protoOf(ErrorCorrectionLevel), 'name', protoOf(ErrorCorrectionLevel).e5);\n  defineProp(protoOf(ErrorCorrectionLevel), 'ordinal', protoOf(ErrorCorrectionLevel).f5);\n  defineProp(protoOf(MaskPattern), 'name', protoOf(MaskPattern).e5);\n  defineProp(protoOf(MaskPattern), 'ordinal', protoOf(MaskPattern).f5);\n  defineProp(protoOf(QRCodeDataType), 'name', protoOf(QRCodeDataType).e5);\n  defineProp(protoOf(QRCodeDataType), 'ordinal', protoOf(QRCodeDataType).f5);\n  protoOf(DefaultShapeFunction).beforeRender = beforeRender_0;\n  //endregion\n  //region block: init\n  Unit_instance = new Unit();\n  IntCompanionObject_instance = new IntCompanionObject();\n  Companion_instance = new Companion();\n  Companion_instance_2 = new Companion_2();\n  Companion_instance_4 = new Companion_4();\n  Companion_instance_5 = new Companion_5();\n  EmptyIterator_instance = new EmptyIterator();\n  Companion_instance_7 = new Companion_7();\n  Colors_instance = new Colors();\n  QRCodeSetup_instance = new QRCodeSetup();\n  Companion_instance_9 = new Companion_9();\n  Companion_instance_11 = new Companion_11();\n  Companion_instance_12 = new Companion_12();\n  Companion_instance_13 = new Companion_13();\n  Companion_instance_14 = new Companion_14();\n  //endregion\n  //region block: exports\n  function $jsExportAll$(_) {\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    $qrcode.QRCode = QRCode;\n    defineProp($qrcode.QRCode, 'Companion', Companion_getInstance_8);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    $qrcode.QRCodeBuilder = QRCodeBuilder;\n    $qrcode.QRCodeBuilder.QRCodeShapesEnum = QRCodeShapesEnum;\n    $qrcode.QRCodeBuilder.QRCodeShapesEnum.values = values;\n    $qrcode.QRCodeBuilder.QRCodeShapesEnum.valueOf = valueOf;\n    defineProp($qrcode.QRCodeBuilder.QRCodeShapesEnum, 'SQUARE', QRCodeShapesEnum_SQUARE_getInstance);\n    defineProp($qrcode.QRCodeBuilder.QRCodeShapesEnum, 'CIRCLE', QRCodeShapesEnum_CIRCLE_getInstance);\n    defineProp($qrcode.QRCodeBuilder.QRCodeShapesEnum, 'ROUNDED_SQUARE', QRCodeShapesEnum_ROUNDED_SQUARE_getInstance);\n    defineProp($qrcode.QRCodeBuilder.QRCodeShapesEnum, 'CUSTOM', QRCodeShapesEnum_CUSTOM_getInstance);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    defineProp($qrcode$color, 'Colors', Colors_getInstance);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    $qrcode$color.DefaultColorFunction = DefaultColorFunction;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    $qrcode$color.LinearGradientColorFunction = LinearGradientColorFunction;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$internals = $qrcode.internals || ($qrcode.internals = {});\n    $qrcode$internals.QRCodeSquare = QRCodeSquare;\n    $qrcode$internals.QRCodeSquareInfo = QRCodeSquareInfo;\n    defineProp($qrcode$internals.QRCodeSquareInfo, 'Companion', Companion_getInstance_9);\n    $qrcode$internals.QRCodeSquareType = QRCodeSquareType;\n    $qrcode$internals.QRCodeSquareType.values = values_0;\n    $qrcode$internals.QRCodeSquareType.valueOf = valueOf_0;\n    defineProp($qrcode$internals.QRCodeSquareType, 'POSITION_PROBE', QRCodeSquareType_POSITION_PROBE_getInstance);\n    defineProp($qrcode$internals.QRCodeSquareType, 'POSITION_ADJUST', QRCodeSquareType_POSITION_ADJUST_getInstance);\n    defineProp($qrcode$internals.QRCodeSquareType, 'TIMING_PATTERN', QRCodeSquareType_TIMING_PATTERN_getInstance);\n    defineProp($qrcode$internals.QRCodeSquareType, 'DEFAULT', QRCodeSquareType_DEFAULT_getInstance);\n    defineProp($qrcode$internals.QRCodeSquareType, 'MARGIN', QRCodeSquareType_MARGIN_getInstance);\n    $qrcode$internals.QRCodeRegion = QRCodeRegion;\n    $qrcode$internals.QRCodeRegion.values = values_1;\n    $qrcode$internals.QRCodeRegion.valueOf = valueOf_1;\n    defineProp($qrcode$internals.QRCodeRegion, 'TOP_LEFT_CORNER', QRCodeRegion_TOP_LEFT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'TOP_RIGHT_CORNER', QRCodeRegion_TOP_RIGHT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'TOP_MID', QRCodeRegion_TOP_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'LEFT_MID', QRCodeRegion_LEFT_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'RIGHT_MID', QRCodeRegion_RIGHT_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'CENTER', QRCodeRegion_CENTER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'BOTTOM_LEFT_CORNER', QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'BOTTOM_RIGHT_CORNER', QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'BOTTOM_MID', QRCodeRegion_BOTTOM_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'MARGIN', QRCodeRegion_MARGIN_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'UNKNOWN', QRCodeRegion_UNKNOWN_getInstance);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$raw = $qrcode.raw || ($qrcode.raw = {});\n    $qrcode$raw.ErrorCorrectionLevel = ErrorCorrectionLevel;\n    $qrcode$raw.ErrorCorrectionLevel.values = values_2;\n    $qrcode$raw.ErrorCorrectionLevel.valueOf = valueOf_2;\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'L', ErrorCorrectionLevel_L_getInstance);\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'M', ErrorCorrectionLevel_M_getInstance);\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'Q', ErrorCorrectionLevel_Q_getInstance);\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'H', ErrorCorrectionLevel_H_getInstance);\n    $qrcode$raw.MaskPattern = MaskPattern;\n    $qrcode$raw.MaskPattern.values = values_3;\n    $qrcode$raw.MaskPattern.valueOf = valueOf_3;\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN000', MaskPattern_PATTERN000_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN001', MaskPattern_PATTERN001_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN010', MaskPattern_PATTERN010_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN011', MaskPattern_PATTERN011_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN100', MaskPattern_PATTERN100_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN101', MaskPattern_PATTERN101_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN110', MaskPattern_PATTERN110_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN111', MaskPattern_PATTERN111_getInstance);\n    $qrcode$raw.QRCodeDataType = QRCodeDataType;\n    $qrcode$raw.QRCodeDataType.values = values_4;\n    $qrcode$raw.QRCodeDataType.valueOf = valueOf_4;\n    defineProp($qrcode$raw.QRCodeDataType, 'NUMBERS', QRCodeDataType_NUMBERS_getInstance);\n    defineProp($qrcode$raw.QRCodeDataType, 'UPPER_ALPHA_NUM', QRCodeDataType_UPPER_ALPHA_NUM_getInstance);\n    defineProp($qrcode$raw.QRCodeDataType, 'DEFAULT', QRCodeDataType_DEFAULT_getInstance);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$raw = $qrcode.raw || ($qrcode.raw = {});\n    $qrcode$raw.QRCodeProcessor = QRCodeProcessor;\n    defineProp($qrcode$raw.QRCodeProcessor, 'Companion', Companion_getInstance_11);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$render = $qrcode.render || ($qrcode.render = {});\n    $qrcode$render.QRCodeGraphicsFactory = QRCodeGraphicsFactory;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    $qrcode$shape.CircleShapeFunction = CircleShapeFunction;\n    defineProp($qrcode$shape.CircleShapeFunction, 'Companion', Companion_getInstance_12);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    $qrcode$shape.DefaultShapeFunction = DefaultShapeFunction;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    $qrcode$shape.RoundSquaresShapeFunction = RoundSquaresShapeFunction;\n    defineProp($qrcode$shape.RoundSquaresShapeFunction, 'Companion', Companion_getInstance_13);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$render = $qrcode.render || ($qrcode.render = {});\n    $qrcode$render.QRCodeGraphics = QRCodeGraphics;\n    defineProp($qrcode$render.QRCodeGraphics, 'Companion', Companion_getInstance_14);\n  }\n  $jsExportAll$(_);\n  //endregion\n  return _;\n}));\n\n//# sourceMappingURL=qrcode-kotlin.js.map\n"
  },
  {
    "path": "examples/kotlin/build.gradle.kts",
    "content": "plugins {\n    kotlin(\"jvm\")\n}\n\nrepositories {\n    mavenLocal()\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"io.github.g0dkar:qrcode-kotlin:4.5.0\")\n    implementation(\"org.jfree:org.jfree.svg:5.0.5\")\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example00-Simple.kt",
    "content": "import qrcode.QRCode\nimport java.io.FileOutputStream\n\nfun main() {\n    val simpleQRCode = QRCode.ofSquares()\n        .build(\"https://qrcodekotlin.com\")\n    val simplePngData = simpleQRCode.renderToBytes()\n\n    FileOutputStream(\"examples/kotlin/examples-results/example00-simple.png\").use { it.write(simplePngData) }\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example01-Shapes.kt",
    "content": "import qrcode.QRCode\nimport qrcode.color.Colors\nimport qrcode.raw.QRCodeProcessor\nimport qrcode.render.QRCodeGraphics\nimport qrcode.shape.DefaultShapeFunction\nimport qrcode.shape.QRCodeShapeFunction\nimport java.awt.Color\nimport java.awt.Polygon\nimport java.io.FileOutputStream\n\nfun main() {\n    // All supported platforms\n    // -----------------------\n    // Squares (default)\n    val squareQRCode = QRCode.ofSquares() // <- See Here\n        .build(\"Hello, Squares!\")\n    val squarePngData = squareQRCode.renderToBytes()\n\n    // Circles\n    val circleQRCode = QRCode.ofCircles() // <- See Here\n        .build(\"Hello, Circles!\")\n    val circlePngData = circleQRCode.renderToBytes()\n\n    // Rounded Squares\n    val roundedSquareQRCode = QRCode.ofRoundedSquares() // <- See Here\n        .build(\"Hello, Rounded Squares!\")\n    val roundedSquarePngData = roundedSquareQRCode.renderToBytes()\n\n    // Custom Shape\n    // WARNING: For demonstration purposes only. My phone camera couldn't read it.\n    val customShapeQRCode = QRCode.ofCustomShape(TriangleShapeFunction()) // <- See Here\n        .build(\"Hello, Triangles!\")\n    val customShapePngData = customShapeQRCode.renderToBytes()\n\n    // Custom Shape - JVM-specific implementation\n    // WARNING: For demonstration purposes only. My phone camera couldn't read it.\n    val customShapeQRCodeJVM = QRCode.ofCustomShape(JVMTriangleShapeFunction()) // <- See Here\n        .build(\"Hello, Triangles... from the JVM!\")\n    val customShapePngDataJVM = customShapeQRCodeJVM.renderToBytes()\n\n    // -----------------------\n    // JVM-only code (saves the PNG Bytes to a file)\n    FileOutputStream(\"examples/kotlin/examples-results/example01-squares.png\").use { it.write(squarePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example01-circles.png\").use { it.write(circlePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example01-rounded-squares.png\").use { it.write(roundedSquarePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example01-custom.png\").use { it.write(customShapePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example01-custom-jvm.png\").use { it.write(customShapePngDataJVM) }\n}\n\nclass TriangleShapeFunction(\n    squareSize: Int = QRCodeProcessor.DEFAULT_CELL_SIZE,\n    innerSpace: Int = 1,\n) : DefaultShapeFunction(squareSize, innerSpace) {\n    override fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int, canvas: QRCodeGraphics) {\n        val topCenterX = x + width / 2\n        val topCenterY = y\n        val bottomLeftX = x\n        val bottomLeftY = y + height\n        val bottomRightX = x + width\n        val bottomRightY = y + height\n\n        // Line from top-center to bottom-left\n        canvas.drawLine(topCenterX, topCenterY, bottomLeftX, bottomLeftY, color, 1.0)\n        // Line from top-center to bottom-right\n        canvas.drawLine(topCenterX, topCenterY, bottomRightX, bottomRightY, color, 1.0)\n        // Line from bottom-left to bottom-right\n        canvas.drawLine(bottomLeftX, bottomLeftY, bottomRightX, bottomRightY, color, 1.0)\n    }\n}\n\n/**\n * Simple [QRCodeShapeFunction] that draws filled triangles instead of squares using AWT's Polygon + Graphics2D fill().\n */\nclass JVMTriangleShapeFunction(\n    squareSize: Int = QRCodeProcessor.DEFAULT_CELL_SIZE,\n    innerSpace: Int = 1,\n) : DefaultShapeFunction(squareSize, innerSpace) {\n    override fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int, canvas: QRCodeGraphics) {\n        val topCenterX = x + width / 2\n        val topCenterY = y\n        val bottomLeftX = x\n        val bottomLeftY = y + height\n        val bottomRightX = x + width\n        val bottomRightY = y + height\n\n        canvas.directDraw { // JVM only. We'll receive a raw Graphics2D object to draw on.\n            val triangle = Polygon()\n            triangle.addPoint(topCenterX, topCenterY)\n            triangle.addPoint(bottomLeftX, bottomLeftY)\n            triangle.addPoint(bottomRightX, bottomRightY)\n            triangle.addPoint(topCenterX, topCenterY)\n\n            val (r, g, b, a) = Colors.getRGBA(color)\n\n            it.paint = Color(r, g, b, a)\n\n            it.fill(triangle)\n        }\n    }\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example02-Colors.kt",
    "content": "import qrcode.QRCode\nimport qrcode.color.Colors\nimport java.io.FileOutputStream\n\nfun main() {\n    // All supported platforms\n    // -----------------------\n    // Plain color\n    val orangeQRCode = QRCode.ofSquares()\n        .withColor(Colors.ORANGE) // <- See Here\n        .build(\"Orange\")\n    val orangePngData = orangeQRCode.renderToBytes()\n\n    // Changing both background and foreground\n    val darkModeQRCode = QRCode.ofSquares()\n        .withColor(Colors.css(\"#43454a\"))           // <- See Here\n        .withBackgroundColor(Colors.css(\"#1e1f22\")) // <- See Here\n        .build(\"Dark Mode QRCode\")\n    val darkModePngData = darkModeQRCode.renderToBytes()\n\n    // Have the squares be a linear gradient from a color to another\n    val gradientQRCode = QRCode.ofSquares()\n        .withGradientColor(Colors.BISQUE, Colors.BLUE) // <- See Here\n        .build(\"Weird gradient colors, but I think it's nice\")\n    val gradientPngData = gradientQRCode.renderToBytes()\n\n    // Use \"transparent\" as a background color (meaning basically no background)\n    val transparentQRCode = QRCode.ofSquares()\n        .withBackgroundColor(Colors.TRANSPARENT)\n        .build(\"You can put this on top of pretty much anything :)\")\n    val transparentPngData = transparentQRCode.renderToBytes()\n\n    // -----------------------\n    // JVM-only code (saves the PNG Bytes to a file)\n    FileOutputStream(\"examples/kotlin/examples-results/example02-color.png\").use { it.write(orangePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example02-dark-mode.png\").use { it.write(darkModePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example02-gradient.png\").use { it.write(gradientPngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example02-transparent.png\").use { it.write(transparentPngData) }\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example03-Logo.kt",
    "content": "import qrcode.QRCode\nimport java.io.FileOutputStream\n\nfun main() {\n    // Examples written around the time of the 2023 Halloween. So why not have some fun?\n    // -----------------------\n    // JVM-only code: For our platform-independent code we just need a ByteArray of the PNG logo :)\n    val logoBytes = ClassLoader.getSystemResourceAsStream(\"ghost.png\")?.readBytes() ?: ByteArray(0)\n\n    // All supported platforms\n    // -----------------------\n    // Simply add a logo image\n    val logoQRCode = QRCode.ofCircles()\n        .withLogo(logoBytes, 150, 150) // <- See Here --- Default: Will hide cells behind logo\n        .build(\"BOO!!! Happy Halloween!\")\n    val logoQRCodePngData = logoQRCode.renderToBytes()\n\n    // Simply add a logo image\n    val transparentQRCode = QRCode.ofCircles()\n        .withLogo(logoBytes, 150, 150, clearLogoArea = false) // <- See Here --- Keep cells behind logo\n        .build(\"BOO!!! Happy Halloween!\")\n    val transparentQRCodePngData = transparentQRCode.renderToBytes()\n\n    // ---------------------------\n    // JVM-only code (saves the PNG Bytes to a file)\n    FileOutputStream(\"examples/kotlin/examples-results/example03-logo.png\").use { it.write(logoQRCodePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example03-logo-with-cells.png\").use { it.write(transparentQRCodePngData) }\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example04-SVG.kt",
    "content": "import qrcode.QRCode\nimport svg.SVGGraphicsFactory\nimport java.io.FileOutputStream\n\nfun main() {\n    // This example needs an external library to work, the awesome JFree SVG (check the build.gradle.kts)\n    // Check it out: https://github.com/jfree/jfreesvg (highly recommended if you need SVGs)\n    //\n    // All examples here are the same of the Example01-Shapes.kt file\n    // -----------------------\n    // Squares (default)\n    val squareQRCode = QRCode.ofSquares()\n        .withGraphicsFactory(SVGGraphicsFactory()) // <- See Here --- Feel free to copy/paste and use these classes ^^\n        .build(\"Hello, Squares! (you are reading an SVG!)\")\n    val squarePngData = squareQRCode.renderToBytes()\n\n    // Circles\n    val circleQRCode = QRCode.ofCircles()\n        .withGraphicsFactory(SVGGraphicsFactory()) // <- See Here --- Feel free to copy/paste and use these classes ^^\n        .build(\"Hello, Circles! (you are reading an SVG!)\")\n    val circlePngData = circleQRCode.renderToBytes()\n\n    // Rounded Squares\n    val roundedSquareQRCode = QRCode.ofRoundedSquares()\n        .withGraphicsFactory(SVGGraphicsFactory()) // <- See Here --- Feel free to copy/paste and use these classes ^^\n        .build(\"Hello, Rounded Squares! (you are reading an SVG!)\")\n    val roundedSquarePngData = roundedSquareQRCode.renderToBytes()\n\n    // -----------------------\n    // JVM-only code (saves the PNG Bytes to a file)\n    FileOutputStream(\"examples/kotlin/examples-results/example04-squares.svg\").use { it.write(squarePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example04-circles.svg\").use { it.write(circlePngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example04-rounded-squares.svg\").use { it.write(roundedSquarePngData) }\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example05-BackwardsCompat.kt",
    "content": "import qrcode.QRCode\nimport java.awt.image.BufferedImage\nimport java.io.FileOutputStream\nimport javax.imageio.ImageIO\n\nfun main() {\n    // All supported platforms\n    // -----------------------\n    // Default rendering\n    val defaultRenderQRCode = QRCode(\"Hello, processor!\").render()\n    val defaultRenderPngData = defaultRenderQRCode.nativeImage() as BufferedImage\n\n    // -----------------------\n    // JVM-only code (saves the PNG Bytes to a file)\n    ImageIO.write(defaultRenderPngData, \"PNG\", FileOutputStream(\"examples/kotlin/examples-results/example05-defaults.png\"))\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example06-ECL.kt",
    "content": "import qrcode.QRCode\nimport qrcode.raw.ErrorCorrectionLevel\nimport java.io.FileOutputStream\n\nfun main() {\n    // Example inspired by this issue: https://github.com/g0dkar/qrcode-kotlin/issues/141\n    // Showcase how the same QRCode looks given the same data but different ECL values\n    // Thanks to @dgmltn (https://github.com/dgmltn) for the idea for the example!\n    // If you're interested in know more: https://github.com/g0dkar/qrcode-kotlin/issues/141#issuecomment-2703976980\n\n    // All supported platforms\n    // -----------------------\n    val qrCodeData = \"Hello, world.\"\n\n    val eclLowQRCode = QRCode.ofSquares()\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.LOW) // <- See Here\n        .withInformationDensity(1) // <- Setting this to >= 1 will make the code NOT compute a value\n        .build(qrCodeData)\n        .also { println(\"[Low] ECL: ${it.errorCorrectionLevel}, Information Density: ${it.informationDensity}\") }\n    val eclLowPngData = eclLowQRCode.renderToBytes()\n\n    val eclMediumQRCode = QRCode.ofSquares()\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.MEDIUM) // <- See Here\n        .withInformationDensity(1) // <- Setting this to >= 1 will make the code NOT compute a value\n        .build(qrCodeData)\n        .also { println(\"[Medium] ECL: ${it.errorCorrectionLevel}, Information Density: ${it.informationDensity}\") }\n    val eclMediumPngData = eclMediumQRCode.renderToBytes()\n\n    // ECL High: we need to add +1 to the information density because of the extra data added by the ECL\n    val eclHighQRCode = QRCode.ofSquares()\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.HIGH) // <- See Here\n        .withInformationDensity(2) // <- Setting this to >= 1 will make the code NOT compute a value\n        .build(qrCodeData)\n        .also { println(\"[High] ECL: ${it.errorCorrectionLevel}, Information Density: ${it.informationDensity}\") }\n    val eclHighPngData = eclHighQRCode.renderToBytes()\n\n    // ECL Very High: we need to add +1 to the information density because of the extra data added by the ECL\n    val eclVeryHighQRCode = QRCode.ofSquares()\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.VERY_HIGH) // <- See Here\n        .withInformationDensity(2) // <- Setting this to >= 1 will make the code NOT compute a value\n        .build(qrCodeData)\n        .also { println(\"[Very High] ECL: ${it.errorCorrectionLevel}, Information Density: ${it.informationDensity}\") }\n    val eclVeryHighPngData = eclVeryHighQRCode.renderToBytes()\n\n    // Default: ECL Very High + auto computed information density\n    val eclDefaultQRCode = QRCode.ofSquares()\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.VERY_HIGH)\n        .build(qrCodeData)\n        .also { println(\"[Default] ECL: ${it.errorCorrectionLevel}, Information Density (computed): ${it.informationDensity}\") }\n    val eclDefaultPngData = eclDefaultQRCode.renderToBytes()\n\n    // Default: ECL LOW + auto computed information density\n    val eclDefaultLowQRCode = QRCode.ofSquares()\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.HIGH)\n        .build(qrCodeData)\n        .also { println(\"[Default - ECL High] ECL: ${it.errorCorrectionLevel}, Information Density (computed): ${it.informationDensity}\") }\n    val eclDefaultLowPngData = eclDefaultLowQRCode.renderToBytes()\n\n    // ECL Very High + Info Density: Using the maximum values to showcase how the QRCode grows given these parameters\n    val denseQRCode = QRCode.ofSquares()\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.VERY_HIGH) // <- See Here\n        .withInformationDensity(40) // <- Maximum value\n        .build(qrCodeData)\n        .also { println(\"[Dense] ECL: ${it.errorCorrectionLevel}, Information Density: ${it.informationDensity}\") }\n    val densePngData = denseQRCode.renderToBytes()\n\n    // -----------------------\n    // JVM-only code (saves the PNG Bytes to a file)\n    FileOutputStream(\"examples/kotlin/examples-results/example06-ecl-low.png\").use { it.write(eclLowPngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example06-ecl-medium.png\").use { it.write(eclMediumPngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example06-ecl-high.png\").use { it.write(eclHighPngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example06-ecl-very-high.png\").use { it.write(eclVeryHighPngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example06-ecl-default.png\").use { it.write(eclDefaultPngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example06-ecl-default-high.png\").use { it.write(eclDefaultLowPngData) }\n    FileOutputStream(\"examples/kotlin/examples-results/example06-dense.png\").use { it.write(densePngData) }\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/Example07-MaskPattern.kt",
    "content": "import qrcode.QRCode\nimport qrcode.raw.MaskPattern\nimport java.io.FileOutputStream\n\nfun main() {\n    // This example shows that the same data can be encoded with many different patterns.\n    // The default (000) is no pattern at all :)\n    // As far as I know, this is only for aesthetics.\n    // For more info: https://www.thonky.com/qr-code-tutorial/mask-patterns (accessed 03/2025)\n\n    // All supported platforms\n    // -----------------------\n    MaskPattern.entries.forEachIndexed { index, entry ->\n        val number = index.toString(2).padStart(3, '0')\n        qrcodeForMaskPattern(number, entry)\n    }\n}\n\nprivate fun qrcodeForMaskPattern(number: String, maskPattern: MaskPattern) {\n    val qrCodeData = \"Hello, Mask Pattern.\"\n\n    val maskPatternQRCode = QRCode.ofSquares()\n        .withMaskPattern(maskPattern)\n        .build(qrCodeData)\n    val maskPatternPngData = maskPatternQRCode.renderToBytes()\n\n    FileOutputStream(\"examples/kotlin/examples-results/example07-mask-pattern-$number.png\").use { it.write(maskPatternPngData) }\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/ProjectLogo.kt",
    "content": "import qrcode.QRCode\nimport qrcode.color.Colors\nimport qrcode.color.Colors.css\nimport qrcode.raw.ErrorCorrectionLevel\nimport java.awt.Color\nimport java.awt.MultipleGradientPaint.CycleMethod.NO_CYCLE\nimport java.awt.RadialGradientPaint\nimport java.awt.geom.Point2D\nimport java.io.FileOutputStream\n\nfun main() {\n    // Get the Kotlin Logo\n    val logoBytes = ClassLoader.getSystemResourceAsStream(\"kotlin-logo.png\")?.readBytes() ?: ByteArray(0)\n\n    val squareSize = 13\n\n    // Let's build a transparent QRCode with Kotlin's logo and a lightly transparent white as the color\n    val qrCode = QRCode.ofCircles()\n        .withSize(squareSize)\n        .withColor(Colors.rgba(255, 255, 255, 180))\n        .withBackgroundColor(Colors.TRANSPARENT)\n        .withLogo(logoBytes, 150, 150)\n        .withInformationDensity(6)\n        .withErrorCorrectionLevel(ErrorCorrectionLevel.VERY_HIGH)\n        .withMargin(squareSize)\n        .build(\"https://qrcodekotlin.com\")\n\n    // Before drawing the QRCode, draw our gradient as the background\n    qrCode.graphics.directDraw {\n        it.paint = kotlinGradient(qrCode.canvasSize)\n        it.fillRect(0, 0, qrCode.canvasSize, qrCode.canvasSize)\n    }\n\n    // And render the QRCode on top of the Gradient :)\n    val qrCodeLogoPngData = qrCode.renderToBytes()\n\n    // Now to create the Banner...\n    // We reset all the rendering done so far\n    qrCode.reset()\n\n    // Create a new 1280x640 image\n    val w = 1280\n    val h = 640\n    val banner = qrCode.graphicsFactory.newGraphics(w, h)\n\n    banner.directDraw {\n        it.paint = kotlinGradient(w)\n        it.fillRect(0, 0, w, h)\n    }\n\n    // Draw the QRCode on our banner canvas\n    qrCode.render(banner, (w - qrCode.canvasSize) / 2 + squareSize, (h - qrCode.canvasSize) / 2 + squareSize)\n\n    // Get the bytes to save it to a file :)\n    val pngData = banner.getBytes()\n\n    // -----------------------\n    // JVM-only code (saves the PNG Bytes to a file)\n    FileOutputStream(\"examples/kotlin/project-banner.png\").use { it.write(pngData) }\n    FileOutputStream(\"examples/kotlin/project-logo.png\").use { it.write(qrCodeLogoPngData) }\n}\n\nprivate fun kotlinGradient(width: Int): RadialGradientPaint {\n    val gradientCenter = Point2D.Float(0.0f, width.toFloat())\n    // Distances and colors taken from the official Kotlin website\n    val dist = floatArrayOf(0.0f, 0.1758f, 0.5031f, 0.9703f)\n    val colors = arrayOf(Color(css(\"#ef4857\")), Color(css(\"#de4970\")), Color(css(\"#b44db0\")), Color(css(\"#7f52ff\")))\n    return RadialGradientPaint(\n        gradientCenter, width.toFloat(), gradientCenter,\n        dist, colors,\n        NO_CYCLE,\n    )\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/svg/SVGGraphicsFactory.kt",
    "content": "package svg\n\nimport qrcode.render.QRCodeGraphics\nimport qrcode.render.QRCodeGraphicsFactory\n\n/**\n * Class that'll create the [SVGQRCodeGraphics] instances that'll be used to draw the QRCode\n */\nclass SVGGraphicsFactory : QRCodeGraphicsFactory() {\n    override fun newGraphics(width: Int, height: Int): QRCodeGraphics =\n        SVGQRCodeGraphics(width, height)\n}\n"
  },
  {
    "path": "examples/kotlin/src/main/kotlin/svg/SVGQRCodeGraphics.kt",
    "content": "package svg\n\nimport org.jfree.svg.SVGGraphics2D\nimport qrcode.render.QRCodeGraphics\nimport java.awt.Graphics2D\nimport java.io.OutputStream\nimport java.io.OutputStreamWriter\nimport java.nio.charset.StandardCharsets\n\nclass SVGQRCodeGraphics(width: Int, height: Int) : QRCodeGraphics(width, height) {\n    private val svgGraphics2D = SVGGraphics2D(width.toDouble(), height.toDouble())\n\n    override fun createGraphics(): Graphics2D = svgGraphics2D\n\n    override fun nativeImage(): Any = svgGraphics2D\n\n    override fun writeImage(destination: OutputStream, format: String) {\n        OutputStreamWriter(destination, StandardCharsets.UTF_8).use {\n            it.write(svgGraphics2D.svgDocument)\n        }\n    }\n}\n"
  },
  {
    "path": "examples/spring-web/.gitignore",
    "content": "HELP.md\n.gradle\nbuild/\n!gradle/wrapper/gradle-wrapper.jar\n!**/src/main/**/build/\n!**/src/test/**/build/\n\n### STS ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n.sts4-cache\nbin/\n!**/src/main/**/bin/\n!**/src/test/**/bin/\n\n### IntelliJ IDEA ###\n.idea\n*.iws\n*.iml\n*.ipr\nout/\n!**/src/main/**/out/\n!**/src/test/**/out/\n\n### NetBeans ###\n/nbproject/private/\n/nbbuild/\n/dist/\n/nbdist/\n/.nb-gradle/\n\n### VS Code ###\n.vscode/\n\n### Kotlin ###\n.kotlin\n"
  },
  {
    "path": "examples/spring-web/build.gradle.kts",
    "content": "plugins {\n    kotlin(\"jvm\")\n    kotlin(\"plugin.spring\") version \"1.9.25\"\n    id(\"org.springframework.boot\") version \"3.4.3\"\n    id(\"io.spring.dependency-management\") version \"1.1.7\"\n}\n\ngroup = \"io.github.g0dkar.qrcode\"\nversion = \"1.0\"\n\njava {\n    toolchain {\n        languageVersion = JavaLanguageVersion.of(17)\n    }\n}\n\nrepositories {\n    mavenLocal()\n    mavenCentral()\n}\n\ndependencies {\n    implementation(kotlin(\"reflect\"))\n\n    // Spring Web\n    implementation(\"org.springframework.boot:spring-boot-starter-web\")\n\n    // Jackson Kotlin Support\n    implementation(\"com.fasterxml.jackson.module:jackson-module-kotlin\")\n\n    // o11y\n    implementation(\"org.springframework.boot:spring-boot-starter-actuator\")\n\n    // QRCode-Kotlin\n    implementation(\"io.github.g0dkar:qrcode-kotlin:4.5.0\")\n\n    // Tests\n    // testImplementation(\"org.springframework.boot:spring-boot-starter-test\")\n}\n\nkotlin {\n    compilerOptions {\n        freeCompilerArgs.addAll(\"-Xjsr305=strict\")\n    }\n}\n\ntasks.withType<Test> {\n    useJUnitPlatform()\n}\n"
  },
  {
    "path": "examples/spring-web/src/main/kotlin/io/github/g0dkar/qrcode/springWebExample/Launcher.kt",
    "content": "package io.github.g0dkar.qrcode.springWebExample\n\nimport org.springframework.boot.autoconfigure.SpringBootApplication\nimport org.springframework.boot.runApplication\n\n@SpringBootApplication\nclass SpringWebApplication\n\nfun main(args: Array<String>) {\n    runApplication<SpringWebApplication>(*args)\n}\n"
  },
  {
    "path": "examples/spring-web/src/main/kotlin/io/github/g0dkar/qrcode/springWebExample/QRCodeController.kt",
    "content": "package io.github.g0dkar.qrcode.springWebExample\n\nimport org.springframework.core.io.ByteArrayResource\nimport org.springframework.http.HttpHeaders\nimport org.springframework.http.MediaType.IMAGE_PNG_VALUE\nimport org.springframework.http.ResponseEntity\nimport org.springframework.web.bind.annotation.GetMapping\nimport org.springframework.web.bind.annotation.RequestParam\nimport org.springframework.web.bind.annotation.RestController\nimport qrcode.QRCodeShapesEnum\nimport qrcode.raw.ErrorCorrectionLevel\n\n/**\n * A sample controller to create QRCodes with QRCode-Kotlin.\n *\n * @author Rafael Lins - https://github.com/g0dkar\n */\n@RestController\nclass QRCodeController(\n    private val qrCodeService: QRCodeService,\n) {\n    /**\n     * A simple GET to create QRCodes with QRCode-Kotlin.\n     *\n     * @param data What will be encoded as a QRCode. **REQUIRED.**\n     * @param shape Shape of each element of the QRCode. Default: `square`. See [QRCodeShapesEnum].\n     * @param spacing How many pixels between each cell. Default: 1 for `square`, 5% of the radius for the others.\n     * @param ecl Error Correction Level. Default: `medium`. See [ErrorCorrectionLevel].\n     * @param informationDensity **GET param: `id`** - Information Density. Higher values means you can encode more data. Default: 0 (meaning the actual value is computed from data + ecl by the library itself).\n     * @param fileName File name to use for the downloaded file (applicable only for Web Browsers). Default: `qrcode` (which means the file will be called `qrcode.png`)\n     */\n    @GetMapping(\"/qrcode\", produces = [IMAGE_PNG_VALUE])\n    fun generateQRCode(\n        @RequestParam(required = true) data: String,\n        @RequestParam(required = false, defaultValue = \"SQUARE\") shape: String,\n        @RequestParam(required = false) spacing: Int?,\n        @RequestParam(required = false, defaultValue = \"LOW\") ecl: String,\n        @RequestParam(required = false, defaultValue = \"0\") informationDensity: Int,\n        @RequestParam(required = false, defaultValue = \"qrcode\") fileName: String,\n    ): ResponseEntity<ByteArrayResource> {\n        val shapeEnum = try {\n            QRCodeShapesEnum.valueOf(shape.uppercase())\n        } catch (_: Exception) {\n            QRCodeShapesEnum.SQUARE\n        }\n        val eclEnum = try {\n            ErrorCorrectionLevel.valueOf(ecl.uppercase())\n        } catch (_: Exception) {\n            ErrorCorrectionLevel.LOW\n        }\n\n        val pngData =\n            qrCodeService.qrCode(data, spacing, shapeEnum, eclEnum, informationDensity)\n        val resource = ByteArrayResource(pngData, IMAGE_PNG_VALUE)\n\n        return ResponseEntity.ok()\n            .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"$fileName.png\\\"\")\n            .body(resource)\n    }\n}\n"
  },
  {
    "path": "examples/spring-web/src/main/kotlin/io/github/g0dkar/qrcode/springWebExample/QRCodeService.kt",
    "content": "package io.github.g0dkar.qrcode.springWebExample\n\nimport org.springframework.stereotype.Service\nimport qrcode.QRCodeBuilder\nimport qrcode.QRCodeShapesEnum\nimport qrcode.QRCodeShapesEnum.SQUARE\nimport qrcode.raw.ErrorCorrectionLevel\nimport qrcode.raw.ErrorCorrectionLevel.MEDIUM\n\n@Service\nclass QRCodeService {\n    fun qrCode(\n        data: String,\n        spacing: Int? = null,\n        shape: QRCodeShapesEnum = SQUARE,\n        ecl: ErrorCorrectionLevel = MEDIUM,\n        informationDensity: Int = 0,\n    ): ByteArray =\n        QRCodeBuilder(shape)\n            .withErrorCorrectionLevel(ecl)\n            .withInformationDensity(informationDensity)\n            .also {\n                if (spacing != null && spacing >= 0) {\n                    it.withInnerSpacing(spacing)\n                }\n            }\n            .build(data)\n            .render()\n            .getBytes()\n}\n"
  },
  {
    "path": "examples/spring-web/src/main/resources/application.yml",
    "content": "spring:\n  application:\n    name: QRCodeKotlinExample\n"
  },
  {
    "path": "gradle/libs.versions.toml",
    "content": "[versions]\nannotation = \"1.9.1\"\nkotlin = \"2.1.21\"\ndokka = \"2.0.0\"\nkotest = \"6.0.0.M3\"\nlifecycleLivedataKtx = \"2.9.1\"\nlifecycleViewmodelKtx = \"2.9.1\"\nmavenNexus = \"2.0.0\"\nandroidPlugin = \"8.10.1\"\nnpmPublish = \"3.5.3\"\ncore-ktx = \"1.16.0\"\nappcompat = \"1.7.0\"\nmaterial = \"1.12.0\"\nconstraintlayout = \"2.2.1\"\nnavigation-fragment-ktx = \"2.9.0\"\nnavigation-ui-ktx = \"2.9.0\"\nandroidx-compose = \"1.8.2\"\nkotlinx-browser = \"0.3\"\n\n[libraries]\nandroidx-annotation = { module = \"androidx.annotation:annotation\", version.ref = \"annotation\" }\nandroidx-foundation = { module = \"androidx.compose.foundation:foundation\" }\nandroidx-lifecycle-livedata-ktx = { module = \"androidx.lifecycle:lifecycle-livedata-ktx\", version.ref = \"lifecycleLivedataKtx\" }\nandroidx-lifecycle-viewmodel-ktx = { module = \"androidx.lifecycle:lifecycle-viewmodel-ktx\", version.ref = \"lifecycleViewmodelKtx\" }\nkotlin-gradle-plugin = { module = \"org.jetbrains.kotlin:kotlin-gradle-plugin\", version.ref = \"kotlin\" }\nkotest-assertions-core = { module = \"io.kotest:kotest-assertions-core\", version.ref = \"kotest\" }\nkotest-framework-engine = { module = \"io.kotest:kotest-framework-engine\", version.ref = \"kotest\" }\nkotest-runner-junit5 = { module = \"io.kotest:kotest-runner-junit5\", version.ref = \"kotest\" }\ncore-ktx = { group = \"androidx.core\", name = \"core-ktx\", version.ref = \"core-ktx\" }\nappcompat = { group = \"androidx.appcompat\", name = \"appcompat\", version.ref = \"appcompat\" }\nmaterial = { group = \"com.google.android.material\", name = \"material\", version.ref = \"material\" }\nconstraintlayout = { group = \"androidx.constraintlayout\", name = \"constraintlayout\", version.ref = \"constraintlayout\" }\nnavigation-fragment-ktx = { group = \"androidx.navigation\", name = \"navigation-fragment-ktx\", version.ref = \"navigation-fragment-ktx\" }\nnavigation-ui-ktx = { group = \"androidx.navigation\", name = \"navigation-ui-ktx\", version.ref = \"navigation-ui-ktx\" }\nandroidx-compose-ui = { group = \"androidx.compose.ui\", name = \"ui\", version.ref = \"androidx-compose\" }\nkotlinx-browser = { module = \"org.jetbrains.kotlinx:kotlinx-browser\", version.ref = \"kotlinx-browser\" }\n\n[plugins]\ndokka = { id = \"org.jetbrains.dokka\", version.ref = \"dokka\" }\nkotlin-multiplatform = { id = \"org.jetbrains.kotlin.multiplatform\", version.ref = \"kotlin\" }\nkotest-multiplatform = { id = \"io.kotest.multiplatform\", version.ref = \"kotest\" }\nandroid-library = { id = \"com.android.library\", version.ref = \"androidPlugin\" }\nnexus = { id = \"io.github.gradle-nexus.publish-plugin\", version.ref = \"mavenNexus\" }\nnpmPublish = { id = \"dev.petuska.npm.publish\", version.ref = \"npmPublish\" }\nandroid-application = { id = \"com.android.application\", version.ref = \"androidPlugin\" }\nkotlin-android = { id = \"org.jetbrains.kotlin.android\", version.ref = \"kotlin\" }\ncompose-compiler = { id = \"org.jetbrains.kotlin.plugin.compose\", version.ref = \"kotlin\" }\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.14.1-bin.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "version=4.5.0\nkotlin.code.style=official\n\n# JS\nkotlin.js.generate.executable.default=false\nkotlin.js.ir.output.granularity=whole-program\n\n# Android\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n\n# MPP\nkotlin.native.cacheKind=none\nkotlin.native.ignoreDisabledTargets=true\nkotlin.mpp.stability.nowarn=true\nkotlin.mpp.enableCInteropCommonization=true\nkotlin.mpp.androidSourceSetLayoutVersion=2\n\n# Dokka\norg.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled\norg.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=\"\\\\\\\"\\\\\\\"\"\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        -jar \"$APP_HOME/gradle/wrapper/gradle-wrapper.jar\" \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n@rem SPDX-License-Identifier: Apache-2.0\r\n@rem\r\n\r\n@if \"%DEBUG%\"==\"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\r\n@rem This is normally unused\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif %ERRORLEVEL% equ 0 goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=\r\n\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" -jar \"%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\" %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif %ERRORLEVEL% equ 0 goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nset EXIT_CODE=%ERRORLEVEL%\r\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\r\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\r\nexit /b %EXIT_CODE%\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"qrcode-kotlin\",\n  \"version\": \"4.3.0\",\n  \"description\": \"Generate Beautiful QRCodes in pure JS (actually, Kotlin)\",\n  \"main\": \"index.js\",\n  \"directories\": {\n    \"example\": \"examples\"\n  },\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/g0dkar/qrcode-kotlin.git\"\n  },\n  \"keywords\": [\n    \"qrcode\",\n    \"kotlin\"\n  ],\n  \"author\": \"Rafael Lins\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/g0dkar/qrcode-kotlin/issues\"\n  },\n  \"homepage\": \"https://github.com/g0dkar/qrcode-kotlin#readme\"\n}\n"
  },
  {
    "path": "release/qrcode-kotlin.d.ts",
    "content": "type Nullable<T> = T | null | undefined\nexport declare namespace qrcode {\n    class QRCode {\n        constructor(data: string, squareSize?: number, canvasSize?: number, xOffset?: number, yOffset?: number, colorFn?: qrcode.color.QRCodeColorFunction, shapeFn?: qrcode.shape.QRCodeShapeFunction, graphicsFactory?: qrcode.render.QRCodeGraphicsFactory, errorCorrectionLevel?: qrcode.raw.ErrorCorrectionLevel, informationDensity?: number, maskPattern?: qrcode.raw.MaskPattern, doBefore?: (p0: qrcode.QRCode, p1: qrcode.render.QRCodeGraphics, p2: number, p3: number) => void, doAfter?: (p0: qrcode.QRCode, p1: qrcode.render.QRCodeGraphics, p2: number, p3: number) => void);\n        get data(): string;\n        get xOffset(): number;\n        get yOffset(): number;\n        get colorFn(): qrcode.color.QRCodeColorFunction;\n        get shapeFn(): qrcode.shape.QRCodeShapeFunction;\n        get graphicsFactory(): qrcode.render.QRCodeGraphicsFactory;\n        set graphicsFactory(value: qrcode.render.QRCodeGraphicsFactory);\n        get errorCorrectionLevel(): qrcode.raw.ErrorCorrectionLevel;\n        get informationDensity(): number;\n        get maskPattern(): qrcode.raw.MaskPattern;\n        get squareSize(): number;\n        set squareSize(value: number);\n        get qrCodeProcessor(): qrcode.raw.QRCodeProcessor;\n        /** @deprecated Please use informationDensity instead. */\n        get typeNum(): number;\n        get rawData(): Array<Array<qrcode.internals.QRCodeSquare>>;\n        get canvasSize(): number;\n        set canvasSize(value: number);\n        /** @deprecated Please use canvasSize instead. */\n        get computedSize(): number;\n        get graphics(): qrcode.render.QRCodeGraphics;\n        set graphics(value: qrcode.render.QRCodeGraphics);\n        resize(size: number): qrcode.QRCode;\n        fitIntoArea(width: number, height: number): qrcode.QRCode;\n        render(qrCodeGraphics?: qrcode.render.QRCodeGraphics, xOffset?: number, yOffset?: number): qrcode.render.QRCodeGraphics;\n        renderToBytes(qrCodeGraphics?: qrcode.render.QRCodeGraphics, xOffset?: number, yOffset?: number, format?: string): Int8Array;\n        reset(): void;\n        toString(): string;\n        static get Companion(): {\n            get DEFAULT_SQUARE_SIZE(): number;\n            get DEFAULT_QRCODE_SIZE(): number;\n            get DEFAULT_X_OFFSET(): number;\n            get DEFAULT_Y_OFFSET(): number;\n            ofSquares(): qrcode.QRCodeBuilder;\n            ofCircles(): qrcode.QRCodeBuilder;\n            ofRoundedSquares(): qrcode.QRCodeBuilder;\n            ofCustomShape(customShapeFunction: qrcode.shape.QRCodeShapeFunction): qrcode.QRCodeBuilder;\n        };\n    }\n}\nexport declare namespace qrcode {\n    class QRCodeBuilder {\n        constructor(shape: any/* qrcode.QRCodeShapesEnum */, customShapeFunction?: Nullable<qrcode.shape.QRCodeShapeFunction>);\n        withShape(shape: any/* qrcode.QRCodeShapesEnum */): qrcode.QRCodeBuilder;\n        withSize(size: number): qrcode.QRCodeBuilder;\n        withColor(color: number): qrcode.QRCodeBuilder;\n        withBackgroundColor(bgColor: number): qrcode.QRCodeBuilder;\n        withGradientColor(startColor: number, endColor: Nullable<number>, vertical?: boolean): qrcode.QRCodeBuilder;\n        withRadius(radius: number): qrcode.QRCodeBuilder;\n        withInnerSpacing(innerSpacing?: Nullable<number>): qrcode.QRCodeBuilder;\n        withLogo(logo: Nullable<Int8Array>, width: number, height: number, clearLogoArea?: boolean): qrcode.QRCodeBuilder;\n        withAfterRenderAction(action: (p0: qrcode.QRCode, p1: qrcode.render.QRCodeGraphics) => void): qrcode.QRCodeBuilder;\n        withBeforeRenderAction(action: (p0: qrcode.QRCode, p1: qrcode.render.QRCodeGraphics) => void): qrcode.QRCodeBuilder;\n        withGraphicsFactory(factory: qrcode.render.QRCodeGraphicsFactory): qrcode.QRCodeBuilder;\n        withCustomColorFunction(colorFn: Nullable<qrcode.color.QRCodeColorFunction>): qrcode.QRCodeBuilder;\n        withCustomShapeFunction(shapeFn: Nullable<qrcode.shape.QRCodeShapeFunction>): qrcode.QRCodeBuilder;\n        withErrorCorrectionLevel(ecl: qrcode.raw.ErrorCorrectionLevel): qrcode.QRCodeBuilder;\n        withInformationDensity(informationDensity: number): qrcode.QRCodeBuilder;\n        withMaskPattern(maskPattern: qrcode.raw.MaskPattern): qrcode.QRCodeBuilder;\n        withCanvasSize(size: number): qrcode.QRCodeBuilder;\n        withXOffset(xOffset: number): qrcode.QRCodeBuilder;\n        withYOffset(yOffset: number): qrcode.QRCodeBuilder;\n        withMargin(margin: number): qrcode.QRCodeBuilder;\n        build(data: string): qrcode.QRCode;\n    }\n}\nexport declare namespace qrcode.color {\n    const Colors: {\n        css(str: string): number;\n        rgba(r: number, g: number, b: number, a?: number): number;\n        getRGBA(color: number): Int32Array;\n        getRGBAPercentages(color: number, maxValue?: number): Float64Array;\n        withAlpha(color: number, alpha: number): number;\n        get TRANSPARENT(): number;\n        get ALICE_BLUE(): number;\n        get ANTIQUE_WHITE(): number;\n        get AQUA(): number;\n        get AQUAMARINE(): number;\n        get AZURE(): number;\n        get BEIGE(): number;\n        get BISQUE(): number;\n        get BLACK(): number;\n        get BLANCHED_ALMOND(): number;\n        get BLUE(): number;\n        get BLUE_VIOLET(): number;\n        get BROWN(): number;\n        get BURLY_WOOD(): number;\n        get CADET_BLUE(): number;\n        get CHARTREUSE(): number;\n        get CHOCOLATE(): number;\n        get CORAL(): number;\n        get CORNFLOWER_BLUE(): number;\n        get CORNSILK(): number;\n        get CRIMSON(): number;\n        get CYAN(): number;\n        get DARK_BLUE(): number;\n        get DARK_CYAN(): number;\n        get DARK_GOLDEN_ROD(): number;\n        get DARK_GRAY(): number;\n        get DARK_GREY(): number;\n        get DARK_GREEN(): number;\n        get DARK_KHAKI(): number;\n        get DARK_MAGENTA(): number;\n        get DARK_OLIVE_GREEN(): number;\n        get DARK_ORANGE(): number;\n        get DARK_ORCHID(): number;\n        get DARK_RED(): number;\n        get DARK_SALMON(): number;\n        get DARK_SEA_GREEN(): number;\n        get DARK_SLATE_BLUE(): number;\n        get DARK_SLATE_GRAY(): number;\n        get DARK_SLATE_GREY(): number;\n        get DARK_TURQUOISE(): number;\n        get DARK_VIOLET(): number;\n        get DEEP_PINK(): number;\n        get DEEP_SKY_BLUE(): number;\n        get DIM_GRAY(): number;\n        get DIM_GREY(): number;\n        get DODGER_BLUE(): number;\n        get FIRE_BRICK(): number;\n        get FLORAL_WHITE(): number;\n        get FOREST_GREEN(): number;\n        get FUCHSIA(): number;\n        get GAINSBORO(): number;\n        get GHOST_WHITE(): number;\n        get GOLD(): number;\n        get GOLDEN_ROD(): number;\n        get GRAY(): number;\n        get GREY(): number;\n        get GREEN(): number;\n        get GREEN_YELLOW(): number;\n        get HONEY_DEW(): number;\n        get HOT_PINK(): number;\n        get INDIAN_RED(): number;\n        get INDIGO(): number;\n        get IVORY(): number;\n        get KHAKI(): number;\n        get LAVENDER(): number;\n        get LAVENDER_BLUSH(): number;\n        get LAWN_GREEN(): number;\n        get LEMON_CHIFFON(): number;\n        get LIGHT_BLUE(): number;\n        get LIGHT_CORAL(): number;\n        get LIGHT_CYAN(): number;\n        get LIGHT_GOLDEN_ROD_YELLOW(): number;\n        get LIGHT_GRAY(): number;\n        get LIGHT_GREY(): number;\n        get LIGHT_GREEN(): number;\n        get LIGHT_PINK(): number;\n        get LIGHT_SALMON(): number;\n        get LIGHT_SEA_GREEN(): number;\n        get LIGHT_SKY_BLUE(): number;\n        get LIGHT_SLATE_GRAY(): number;\n        get LIGHT_SLATE_GREY(): number;\n        get LIGHT_STEEL_BLUE(): number;\n        get LIGHT_YELLOW(): number;\n        get LIME(): number;\n        get LIME_GREEN(): number;\n        get LINEN(): number;\n        get MAGENTA(): number;\n        get MAROON(): number;\n        get MEDIUM_AQUA_MARINE(): number;\n        get MEDIUM_BLUE(): number;\n        get MEDIUM_ORCHID(): number;\n        get MEDIUM_PURPLE(): number;\n        get MEDIUM_SEA_GREEN(): number;\n        get MEDIUM_SLATE_BLUE(): number;\n        get MEDIUM_SPRING_GREEN(): number;\n        get MEDIUM_TURQUOISE(): number;\n        get MEDIUM_VIOLET_RED(): number;\n        get MIDNIGHT_BLUE(): number;\n        get MINT_CREAM(): number;\n        get MISTY_ROSE(): number;\n        get MOCCASIN(): number;\n        get NAVAJO_WHITE(): number;\n        get NAVY(): number;\n        get OLD_LACE(): number;\n        get OLIVE(): number;\n        get OLIVE_DRAB(): number;\n        get ORANGE(): number;\n        get ORANGE_RED(): number;\n        get ORCHID(): number;\n        get PALE_GOLDEN_ROD(): number;\n        get PALE_GREEN(): number;\n        get PALE_TURQUOISE(): number;\n        get PALE_VIOLET_RED(): number;\n        get PAPAYA_WHIP(): number;\n        get PEACH_PUFF(): number;\n        get PERU(): number;\n        get PINK(): number;\n        get PLUM(): number;\n        get POWDER_BLUE(): number;\n        get PURPLE(): number;\n        get REBECCA_PURPLE(): number;\n        get RED(): number;\n        get ROSY_BROWN(): number;\n        get ROYAL_BLUE(): number;\n        get SADDLE_BROWN(): number;\n        get SALMON(): number;\n        get SANDY_BROWN(): number;\n        get SEA_GREEN(): number;\n        get SEA_SHELL(): number;\n        get SIENNA(): number;\n        get SILVER(): number;\n        get SKY_BLUE(): number;\n        get SLATE_BLUE(): number;\n        get SLATE_GRAY(): number;\n        get SLATE_GREY(): number;\n        get SNOW(): number;\n        get SPRING_GREEN(): number;\n        get STEEL_BLUE(): number;\n        get TAN(): number;\n        get TEAL(): number;\n        get THISTLE(): number;\n        get TOMATO(): number;\n        get TURQUOISE(): number;\n        get VIOLET(): number;\n        get WHEAT(): number;\n        get WHITE(): number;\n        get WHITE_SMOKE(): number;\n        get YELLOW(): number;\n        get YELLOW_GREEN(): number;\n    };\n}\nexport declare namespace qrcode.color {\n    class DefaultColorFunction implements qrcode.color.QRCodeColorFunction {\n        constructor(foreground?: number, background?: number);\n        fg(row: number, col: number, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        bg(row: number, col: number, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        colorFn(square: qrcode.internals.QRCodeSquare, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        beforeRender(qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): void;\n        readonly __doNotUseOrImplementIt: qrcode.color.QRCodeColorFunction[\"__doNotUseOrImplementIt\"];\n    }\n}\nexport declare namespace qrcode.color {\n    class LinearGradientColorFunction implements qrcode.color.QRCodeColorFunction {\n        constructor(startForegroundColor: number, endForegroundColor: number, backgroundColor?: number, vertical?: boolean);\n        get startForegroundColor(): number;\n        get endForegroundColor(): number;\n        get backgroundColor(): number;\n        get vertical(): boolean;\n        set vertical(value: boolean);\n        fg(row: number, col: number, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        bg(row: number, col: number, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        colorFn(square: qrcode.internals.QRCodeSquare, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        beforeRender(qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): void;\n        readonly __doNotUseOrImplementIt: qrcode.color.QRCodeColorFunction[\"__doNotUseOrImplementIt\"];\n    }\n}\nexport declare namespace qrcode.color {\n    interface QRCodeColorFunction {\n        colorFn(square: qrcode.internals.QRCodeSquare, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        beforeRender(qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): void;\n        fg(row: number, col: number, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        bg(row: number, col: number, qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): number;\n        readonly __doNotUseOrImplementIt: {\n            readonly \"qrcode.color.QRCodeColorFunction\": unique symbol;\n        };\n    }\n}\nexport declare namespace qrcode.internals {\n    class QRCodeSquare {\n        constructor(dark: boolean, row: number, col: number, moduleSize: number, squareInfo?: qrcode.internals.QRCodeSquareInfo, rowSize?: number, colSize?: number, parent?: Nullable<qrcode.internals.QRCodeSquare>);\n        get dark(): boolean;\n        set dark(value: boolean);\n        get row(): number;\n        get col(): number;\n        get moduleSize(): number;\n        get squareInfo(): qrcode.internals.QRCodeSquareInfo;\n        get rowSize(): number;\n        get colSize(): number;\n        get parent(): Nullable<qrcode.internals.QRCodeSquare>;\n        get rendered(): boolean;\n        set rendered(value: boolean);\n        absoluteX(cellSize?: number): number;\n        absoluteY(cellSize?: number): number;\n        equals(other: Nullable<any>): boolean;\n        hashCode(): number;\n        copy(dark?: boolean, row?: number, col?: number, moduleSize?: number, squareInfo?: qrcode.internals.QRCodeSquareInfo, rowSize?: number, colSize?: number, parent?: Nullable<qrcode.internals.QRCodeSquare>): qrcode.internals.QRCodeSquare;\n        toString(): string;\n    }\n    class QRCodeSquareInfo {\n        constructor(type: qrcode.internals.QRCodeSquareType, region: qrcode.internals.QRCodeRegion);\n        get type(): qrcode.internals.QRCodeSquareType;\n        get region(): qrcode.internals.QRCodeRegion;\n        copy(type?: qrcode.internals.QRCodeSquareType, region?: qrcode.internals.QRCodeRegion): qrcode.internals.QRCodeSquareInfo;\n        toString(): string;\n        hashCode(): number;\n        equals(other: Nullable<any>): boolean;\n    }\n    abstract class QRCodeSquareType {\n        private constructor();\n        static get POSITION_PROBE(): qrcode.internals.QRCodeSquareType & {\n            get name(): \"POSITION_PROBE\";\n            get ordinal(): 0;\n        };\n        static get POSITION_ADJUST(): qrcode.internals.QRCodeSquareType & {\n            get name(): \"POSITION_ADJUST\";\n            get ordinal(): 1;\n        };\n        static get TIMING_PATTERN(): qrcode.internals.QRCodeSquareType & {\n            get name(): \"TIMING_PATTERN\";\n            get ordinal(): 2;\n        };\n        static get DEFAULT(): qrcode.internals.QRCodeSquareType & {\n            get name(): \"DEFAULT\";\n            get ordinal(): 3;\n        };\n        get name(): \"POSITION_PROBE\" | \"POSITION_ADJUST\" | \"TIMING_PATTERN\" | \"DEFAULT\";\n        get ordinal(): 0 | 1 | 2 | 3;\n        static values(): Array<qrcode.internals.QRCodeSquareType>;\n        static valueOf(value: string): qrcode.internals.QRCodeSquareType;\n    }\n    abstract class QRCodeRegion {\n        private constructor();\n        static get TOP_LEFT_CORNER(): qrcode.internals.QRCodeRegion & {\n            get name(): \"TOP_LEFT_CORNER\";\n            get ordinal(): 0;\n        };\n        static get TOP_RIGHT_CORNER(): qrcode.internals.QRCodeRegion & {\n            get name(): \"TOP_RIGHT_CORNER\";\n            get ordinal(): 1;\n        };\n        static get TOP_MID(): qrcode.internals.QRCodeRegion & {\n            get name(): \"TOP_MID\";\n            get ordinal(): 2;\n        };\n        static get LEFT_MID(): qrcode.internals.QRCodeRegion & {\n            get name(): \"LEFT_MID\";\n            get ordinal(): 3;\n        };\n        static get RIGHT_MID(): qrcode.internals.QRCodeRegion & {\n            get name(): \"RIGHT_MID\";\n            get ordinal(): 4;\n        };\n        static get CENTER(): qrcode.internals.QRCodeRegion & {\n            get name(): \"CENTER\";\n            get ordinal(): 5;\n        };\n        static get BOTTOM_LEFT_CORNER(): qrcode.internals.QRCodeRegion & {\n            get name(): \"BOTTOM_LEFT_CORNER\";\n            get ordinal(): 6;\n        };\n        static get BOTTOM_RIGHT_CORNER(): qrcode.internals.QRCodeRegion & {\n            get name(): \"BOTTOM_RIGHT_CORNER\";\n            get ordinal(): 7;\n        };\n        static get BOTTOM_MID(): qrcode.internals.QRCodeRegion & {\n            get name(): \"BOTTOM_MID\";\n            get ordinal(): 8;\n        };\n        static get MARGIN(): qrcode.internals.QRCodeRegion & {\n            get name(): \"MARGIN\";\n            get ordinal(): 9;\n        };\n        static get UNKNOWN(): qrcode.internals.QRCodeRegion & {\n            get name(): \"UNKNOWN\";\n            get ordinal(): 10;\n        };\n        get name(): \"TOP_LEFT_CORNER\" | \"TOP_RIGHT_CORNER\" | \"TOP_MID\" | \"LEFT_MID\" | \"RIGHT_MID\" | \"CENTER\" | \"BOTTOM_LEFT_CORNER\" | \"BOTTOM_RIGHT_CORNER\" | \"BOTTOM_MID\" | \"MARGIN\" | \"UNKNOWN\";\n        get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;\n        static values(): Array<qrcode.internals.QRCodeRegion>;\n        static valueOf(value: string): qrcode.internals.QRCodeRegion;\n    }\n}\nexport declare namespace qrcode.raw {\n    abstract class ErrorCorrectionLevel {\n        private constructor();\n        static get LOW(): qrcode.raw.ErrorCorrectionLevel & {\n            get name(): \"LOW\";\n            get ordinal(): 0;\n        };\n        static get MEDIUM(): qrcode.raw.ErrorCorrectionLevel & {\n            get name(): \"MEDIUM\";\n            get ordinal(): 1;\n        };\n        static get HIGH(): qrcode.raw.ErrorCorrectionLevel & {\n            get name(): \"HIGH\";\n            get ordinal(): 2;\n        };\n        static get VERY_HIGH(): qrcode.raw.ErrorCorrectionLevel & {\n            get name(): \"VERY_HIGH\";\n            get ordinal(): 3;\n        };\n        get name(): \"LOW\" | \"MEDIUM\" | \"HIGH\" | \"VERY_HIGH\";\n        get ordinal(): 0 | 1 | 2 | 3;\n        get value(): number;\n        get maxTypeNum(): number;\n        static values(): Array<qrcode.raw.ErrorCorrectionLevel>;\n        static valueOf(value: string): qrcode.raw.ErrorCorrectionLevel;\n    }\n    abstract class MaskPattern {\n        private constructor();\n        static get PATTERN000(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN000\";\n            get ordinal(): 0;\n        };\n        static get PATTERN001(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN001\";\n            get ordinal(): 1;\n        };\n        static get PATTERN010(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN010\";\n            get ordinal(): 2;\n        };\n        static get PATTERN011(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN011\";\n            get ordinal(): 3;\n        };\n        static get PATTERN100(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN100\";\n            get ordinal(): 4;\n        };\n        static get PATTERN101(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN101\";\n            get ordinal(): 5;\n        };\n        static get PATTERN110(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN110\";\n            get ordinal(): 6;\n        };\n        static get PATTERN111(): qrcode.raw.MaskPattern & {\n            get name(): \"PATTERN111\";\n            get ordinal(): 7;\n        };\n        get name(): \"PATTERN000\" | \"PATTERN001\" | \"PATTERN010\" | \"PATTERN011\" | \"PATTERN100\" | \"PATTERN101\" | \"PATTERN110\" | \"PATTERN111\";\n        get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;\n        static values(): Array<qrcode.raw.MaskPattern>;\n        static valueOf(value: string): qrcode.raw.MaskPattern;\n    }\n    abstract class QRCodeDataType {\n        private constructor();\n        static get NUMBERS(): qrcode.raw.QRCodeDataType & {\n            get name(): \"NUMBERS\";\n            get ordinal(): 0;\n        };\n        static get UPPER_ALPHA_NUM(): qrcode.raw.QRCodeDataType & {\n            get name(): \"UPPER_ALPHA_NUM\";\n            get ordinal(): 1;\n        };\n        static get DEFAULT(): qrcode.raw.QRCodeDataType & {\n            get name(): \"DEFAULT\";\n            get ordinal(): 2;\n        };\n        get name(): \"NUMBERS\" | \"UPPER_ALPHA_NUM\" | \"DEFAULT\";\n        get ordinal(): 0 | 1 | 2;\n        get value(): number;\n        static values(): Array<qrcode.raw.QRCodeDataType>;\n        static valueOf(value: string): qrcode.raw.QRCodeDataType;\n    }\n}\nexport declare namespace qrcode.raw {\n    class QRCodeProcessor {\n        constructor(data: string, errorCorrectionLevel?: qrcode.raw.ErrorCorrectionLevel, dataType?: qrcode.raw.QRCodeDataType, graphicsFactory?: qrcode.render.QRCodeGraphicsFactory);\n        get graphicsFactory(): qrcode.render.QRCodeGraphicsFactory;\n        computeImageSizeFromRawData(cellSize?: number, rawData?: Array<Array<qrcode.internals.QRCodeSquare>>): number;\n        computeImageSize(cellSize: number | undefined, size: number): number;\n        render(cellSize?: number, brightColor?: number, darkColor?: number): qrcode.render.QRCodeGraphics;\n        renderComputed(cellSize?: number, rawData?: Array<Array<qrcode.internals.QRCodeSquare>>, qrCodeGraphics?: qrcode.render.QRCodeGraphics, brightColor?: number, darkColor?: number): qrcode.render.QRCodeGraphics;\n        renderShaded(cellSize: number | undefined, rawData: Array<Array<qrcode.internals.QRCodeSquare>> | undefined, qrCodeGraphics: qrcode.render.QRCodeGraphics | undefined, renderer: (p0: number, p1: number, p2: qrcode.internals.QRCodeSquare, p3: qrcode.render.QRCodeGraphics) => void): qrcode.render.QRCodeGraphics;\n        encode(type?: number, maskPattern?: qrcode.raw.MaskPattern): Array<Array<qrcode.internals.QRCodeSquare>>;\n        toString(): string;\n        static get Companion(): {\n            get DEFAULT_CELL_SIZE(): number;\n            get MAXIMUM_INFO_DENSITY(): number;\n            infoDensityForDataAndECL(data: string, errorCorrectionLevel: qrcode.raw.ErrorCorrectionLevel, dataType?: qrcode.raw.QRCodeDataType): number;\n        };\n    }\n}\nexport declare namespace qrcode.render {\n    class QRCodeGraphicsFactory {\n        constructor();\n        newGraphicsSquare(size: number): qrcode.render.QRCodeGraphics;\n        newGraphics(width: number, height: number): qrcode.render.QRCodeGraphics;\n    }\n}\nexport declare namespace qrcode.shape {\n    /* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */\n    class CircleShapeFunction extends qrcode.shape.RoundSquaresShapeFunction {\n        constructor(squareSize?: number, innerSpace?: number);\n        beforeRender(qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): void;\n        static get Companion(): {\n            defaultRadius(squareSize: number): number;\n            defaultInnerSpace(squareSize: number): number;\n        };\n    }\n}\nexport declare namespace qrcode.shape {\n    class DefaultShapeFunction implements qrcode.shape.QRCodeShapeFunction {\n        constructor(squareSize?: number, innerSpace?: number);\n        get innerSpace(): number;\n        get squareSize(): number;\n        set squareSize(value: number);\n        resize(newSquareSize: number): void;\n        renderSquare(x: number, y: number, colorFn: qrcode.color.QRCodeColorFunction, square: qrcode.internals.QRCodeSquare, canvas: qrcode.render.QRCodeGraphics, qrCode: qrcode.QRCode): void;\n        renderControlSquare(xOffset: number, yOffset: number, colorFn: qrcode.color.QRCodeColorFunction, square: qrcode.internals.QRCodeSquare, canvas: qrcode.render.QRCodeGraphics, qrCode: qrcode.QRCode): void;\n        fillRect(x: number, y: number, width: number, height: number, color: number, canvas: qrcode.render.QRCodeGraphics): void;\n        drawRect(x: number, y: number, width: number, height: number, color: number, thickness: number, canvas: qrcode.render.QRCodeGraphics): void;\n        beforeRender(qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): void;\n        readonly __doNotUseOrImplementIt: qrcode.shape.QRCodeShapeFunction[\"__doNotUseOrImplementIt\"];\n    }\n}\nexport declare namespace qrcode.shape {\n    interface QRCodeShapeFunction {\n        resize(newSquareSize: number): void;\n        beforeRender(qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): void;\n        renderSquare(x: number, y: number, colorFn: qrcode.color.QRCodeColorFunction, square: qrcode.internals.QRCodeSquare, canvas: qrcode.render.QRCodeGraphics, qrCode: qrcode.QRCode): void;\n        renderControlSquare(xOffset: number, yOffset: number, colorFn: qrcode.color.QRCodeColorFunction, square: qrcode.internals.QRCodeSquare, canvas: qrcode.render.QRCodeGraphics, qrCode: qrcode.QRCode): void;\n        readonly __doNotUseOrImplementIt: {\n            readonly \"qrcode.shape.QRCodeShapeFunction\": unique symbol;\n        };\n    }\n}\nexport declare namespace qrcode.shape {\n    /* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */\n    class RoundSquaresShapeFunction extends qrcode.shape.DefaultShapeFunction {\n        constructor(squareSize?: number, radius?: number, innerSpace?: number);\n        fillRect(x: number, y: number, width: number, height: number, color: number, canvas: qrcode.render.QRCodeGraphics): void;\n        drawRect(x: number, y: number, width: number, height: number, color: number, thickness: number, canvas: qrcode.render.QRCodeGraphics): void;\n        beforeRender(qrCode: qrcode.QRCode, qrCodeGraphics: qrcode.render.QRCodeGraphics): void;\n        static get Companion(): {\n            defaultRadius(squareSize: number): number;\n            defaultInnerSpace(squareSize: number): number;\n        };\n    }\n}\nexport declare namespace qrcode.render {\n    class QRCodeGraphics {\n        constructor(width: number, height: number);\n        get width(): number;\n        get height(): number;\n        changed(): boolean;\n        reset(): void;\n        dimensions(): Array<number>;\n        toDataURL(format?: string): string;\n        toBlob(callback: (p0: Nullable<Blob>) => void): void;\n        getBytes(): Int8Array;\n        getBytesForFormat(format: string): Int8Array;\n        availableFormats(): Array<string>;\n        nativeImage(): any;\n        drawLine(x1: number, y1: number, x2: number, y2: number, color: number, thickness: number): void;\n        drawRect(x: number, y: number, width: number, height: number, color: number, thickness: number): void;\n        fillRect(x: number, y: number, width: number, height: number, color: number): void;\n        fill(color: number): void;\n        drawRoundRect(x: number, y: number, width: number, height: number, borderRadius: number, color: number, thickness: number): void;\n        fillRoundRect(x: number, y: number, width: number, height: number, borderRadius: number, color: number): void;\n        drawEllipse(x: number, y: number, width: number, height: number, color: number, thickness: number): void;\n        fillEllipse(x: number, y: number, width: number, height: number, color: number): void;\n        drawImageFromBytes(rawData: Nullable<Int8Array>, x: number, y: number): void;\n        static get Companion(): {\n        };\n    }\n}\nexport as namespace io_github_g0dkar_qrcode_kotlin;"
  },
  {
    "path": "release/qrcode-kotlin.js",
    "content": "//region block: polyfills\n(function () {\n  if (typeof globalThis === 'object')\n    return;\n  Object.defineProperty(Object.prototype, '__magic__', {get: function () {\n    return this;\n  }, configurable: true});\n  __magic__.globalThis = __magic__;\n  delete Object.prototype.__magic__;\n}());\nif (typeof Math.imul === 'undefined') {\n  Math.imul = function imul(a, b) {\n    return (a & 4.29490176E9) * (b & 65535) + (a & 65535) * (b | 0) | 0;\n  };\n}\nif (typeof ArrayBuffer.isView === 'undefined') {\n  ArrayBuffer.isView = function (a) {\n    return a != null && a.__proto__ != null && a.__proto__.__proto__ === Int8Array.prototype.__proto__;\n  };\n}\nif (typeof Array.prototype.fill === 'undefined') {\n  // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill\n  Object.defineProperty(Array.prototype, 'fill', {value: function (value) {\n    // Steps 1-2.\n    if (this == null) {\n      throw new TypeError('this is null or not defined');\n    }\n    var O = Object(this); // Steps 3-5.\n    var len = O.length >>> 0; // Steps 6-7.\n    var start = arguments[1];\n    var relativeStart = start >> 0; // Step 8.\n    var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); // Steps 9-10.\n    var end = arguments[2];\n    var relativeEnd = end === undefined ? len : end >> 0; // Step 11.\n    var finalValue = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); // Step 12.\n    while (k < finalValue) {\n      O[k] = value;\n      k++;\n    }\n    ; // Step 13.\n    return O;\n  }});\n}\n[Int8Array, Int16Array, Uint16Array, Int32Array, Float32Array, Float64Array].forEach(function (TypedArray) {\n  if (typeof TypedArray.prototype.fill === 'undefined') {\n    Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill});\n  }\n});\nif (typeof Math.clz32 === 'undefined') {\n  Math.clz32 = function (log, LN2) {\n    return function (x) {\n      var asUint = x >>> 0;\n      if (asUint === 0) {\n        return 32;\n      }\n      return 31 - (log(asUint) / LN2 | 0) | 0; // the \"| 0\" acts like math.floor\n    };\n  }(Math.log, Math.LN2);\n}\n//endregion\n(function (factory) {\n  if (typeof define === 'function' && define.amd)\n    define(['exports'], factory);\n  else if (typeof exports === 'object')\n    factory(module.exports);\n  else\n    globalThis['io.github.g0dkar:qrcode-kotlin'] = factory(typeof globalThis['io.github.g0dkar:qrcode-kotlin'] === 'undefined' ? {} : globalThis['io.github.g0dkar:qrcode-kotlin']);\n}(function (_) {\n  'use strict';\n  //region block: imports\n  var imul = Math.imul;\n  var isView = ArrayBuffer.isView;\n  var clz32 = Math.clz32;\n  //endregion\n  //region block: pre-declaration\n  initMetadataForInterface(CharSequence, 'CharSequence');\n  initMetadataForClass(Number_0, 'Number');\n  initMetadataForClass(Char, 'Char');\n  initMetadataForInterface(Collection, 'Collection');\n  initMetadataForInterface(KtList, 'List', VOID, VOID, [Collection]);\n  initMetadataForInterface(KtSet, 'Set', VOID, VOID, [Collection]);\n  initMetadataForInterface(Entry, 'Entry');\n  initMetadataForInterface(KtMap, 'Map');\n  initMetadataForCompanion(Companion);\n  initMetadataForClass(Enum, 'Enum');\n  initMetadataForCompanion(Companion_0);\n  initMetadataForClass(Long, 'Long', VOID, Number_0);\n  initMetadataForInterface(FunctionAdapter, 'FunctionAdapter');\n  initMetadataForObject(Digit, 'Digit');\n  initMetadataForInterface(Comparator, 'Comparator');\n  initMetadataForObject(Unit, 'Unit');\n  initMetadataForClass(AbstractCollection, 'AbstractCollection', VOID, VOID, [Collection]);\n  initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [AbstractCollection, Collection]);\n  initMetadataForClass(AbstractMutableSet, 'AbstractMutableSet', VOID, AbstractMutableCollection, [AbstractMutableCollection, Collection, KtSet]);\n  initMetadataForClass(HashSet, 'HashSet', HashSet_init_$Create$, AbstractMutableSet, [AbstractMutableSet, Collection, KtSet]);\n  initMetadataForCompanion(Companion_1);\n  initMetadataForClass(Itr, 'Itr');\n  initMetadataForClass(KeysItr, 'KeysItr', VOID, Itr);\n  initMetadataForClass(EntriesItr, 'EntriesItr', VOID, Itr);\n  initMetadataForClass(EntryRef, 'EntryRef', VOID, VOID, [Entry]);\n  function containsAllEntries(m) {\n    var tmp$ret$0;\n    $l$block_0: {\n      // Inline function 'kotlin.collections.all' call\n      var tmp;\n      if (isInterface(m, Collection)) {\n        tmp = m.k();\n      } else {\n        tmp = false;\n      }\n      if (tmp) {\n        tmp$ret$0 = true;\n        break $l$block_0;\n      }\n      var _iterator__ex2g4s = m.e();\n      while (_iterator__ex2g4s.f()) {\n        var element = _iterator__ex2g4s.g();\n        // Inline function 'kotlin.js.unsafeCast' call\n        // Inline function 'kotlin.js.asDynamic' call\n        var entry = element;\n        var tmp_0;\n        if (!(entry == null) ? isInterface(entry, Entry) : false) {\n          tmp_0 = this.p3(entry);\n        } else {\n          tmp_0 = false;\n        }\n        if (!tmp_0) {\n          tmp$ret$0 = false;\n          break $l$block_0;\n        }\n      }\n      tmp$ret$0 = true;\n    }\n    return tmp$ret$0;\n  }\n  initMetadataForInterface(InternalMap, 'InternalMap');\n  initMetadataForClass(InternalHashMap, 'InternalHashMap', InternalHashMap_init_$Create$, VOID, [InternalMap]);\n  initMetadataForClass(LinkedHashSet, 'LinkedHashSet', LinkedHashSet_init_$Create$, HashSet, [HashSet, Collection, KtSet]);\n  initMetadataForClass(Exception, 'Exception', Exception_init_$Create$, Error);\n  initMetadataForClass(RuntimeException, 'RuntimeException', RuntimeException_init_$Create$, Exception);\n  initMetadataForClass(IllegalArgumentException, 'IllegalArgumentException', IllegalArgumentException_init_$Create$, RuntimeException);\n  initMetadataForClass(IllegalStateException, 'IllegalStateException', IllegalStateException_init_$Create$, RuntimeException);\n  initMetadataForClass(UnsupportedOperationException, 'UnsupportedOperationException', UnsupportedOperationException_init_$Create$, RuntimeException);\n  initMetadataForClass(NoSuchElementException, 'NoSuchElementException', NoSuchElementException_init_$Create$, RuntimeException);\n  initMetadataForClass(Error_0, 'Error', Error_init_$Create$, Error);\n  initMetadataForClass(IndexOutOfBoundsException, 'IndexOutOfBoundsException', IndexOutOfBoundsException_init_$Create$, RuntimeException);\n  initMetadataForClass(NumberFormatException, 'NumberFormatException', NumberFormatException_init_$Create$, IllegalArgumentException);\n  initMetadataForClass(ConcurrentModificationException, 'ConcurrentModificationException', ConcurrentModificationException_init_$Create$, RuntimeException);\n  initMetadataForClass(NullPointerException, 'NullPointerException', NullPointerException_init_$Create$, RuntimeException);\n  initMetadataForClass(NoWhenBranchMatchedException, 'NoWhenBranchMatchedException', NoWhenBranchMatchedException_init_$Create$, RuntimeException);\n  initMetadataForClass(ClassCastException, 'ClassCastException', ClassCastException_init_$Create$, RuntimeException);\n  initMetadataForInterface(KClass, 'KClass');\n  initMetadataForClass(KClassImpl, 'KClassImpl', VOID, VOID, [KClass]);\n  initMetadataForObject(NothingKClassImpl, 'NothingKClassImpl', VOID, KClassImpl);\n  initMetadataForClass(ErrorKClass, 'ErrorKClass', ErrorKClass, VOID, [KClass]);\n  initMetadataForClass(PrimitiveKClassImpl, 'PrimitiveKClassImpl', VOID, KClassImpl);\n  initMetadataForClass(SimpleKClassImpl, 'SimpleKClassImpl', VOID, KClassImpl);\n  initMetadataForObject(PrimitiveClasses, 'PrimitiveClasses');\n  initMetadataForClass(CharacterCodingException, 'CharacterCodingException', CharacterCodingException_init_$Create$, Exception);\n  initMetadataForClass(StringBuilder, 'StringBuilder', StringBuilder_init_$Create$_0, VOID, [CharSequence]);\n  initMetadataForCompanion(Companion_2);\n  initMetadataForClass(Regex, 'Regex');\n  initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);\n  initMetadataForCompanion(Companion_3);\n  initMetadataForCompanion(Companion_4);\n  initMetadataForObject(EmptyIterator, 'EmptyIterator');\n  initMetadataForClass(IntIterator, 'IntIterator');\n  initMetadataForObject(EmptySet, 'EmptySet', VOID, VOID, [KtSet]);\n  initMetadataForCompanion(Companion_5);\n  initMetadataForClass(IntProgression, 'IntProgression');\n  function isEmpty() {\n    return compareTo(this.m(), this.l()) > 0;\n  }\n  initMetadataForInterface(ClosedRange, 'ClosedRange');\n  initMetadataForClass(IntRange, 'IntRange', VOID, IntProgression, [IntProgression, ClosedRange]);\n  initMetadataForClass(IntProgressionIterator, 'IntProgressionIterator', VOID, IntIterator);\n  initMetadataForCompanion(Companion_6);\n  function isEmpty_0() {\n    return !this.r(this.m(), this.l());\n  }\n  initMetadataForInterface(ClosedFloatingPointRange, 'ClosedFloatingPointRange', VOID, VOID, [ClosedRange]);\n  initMetadataForCompanion(Companion_7);\n  initMetadataForClass(QRCode, 'QRCode');\n  initMetadataForClass(QRCodeBuilder, 'QRCodeBuilder');\n  initMetadataForClass(QRCodeShapesEnum, 'QRCodeShapesEnum', VOID, Enum);\n  initMetadataForObject(Colors, 'Colors');\n  function colorFn(square, qrCode, qrCodeGraphics) {\n    return square.dark === true ? this.fg(square.row, square.col, qrCode, qrCodeGraphics) : this.bg(square.row, square.col, qrCode, qrCodeGraphics);\n  }\n  function beforeRender(qrCode, qrCodeGraphics) {\n  }\n  initMetadataForInterface(QRCodeColorFunction, 'QRCodeColorFunction');\n  initMetadataForClass(DefaultColorFunction, 'DefaultColorFunction', DefaultColorFunction, VOID, [QRCodeColorFunction]);\n  initMetadataForClass(LinearGradientColorFunction, 'LinearGradientColorFunction', VOID, VOID, [QRCodeColorFunction]);\n  initMetadataForClass(InsufficientInformationDensityException, 'InsufficientInformationDensityException', InsufficientInformationDensityException, IllegalArgumentException);\n  initMetadataForClass(BitBuffer, 'BitBuffer', BitBuffer);\n  initMetadataForClass(Polynomial, 'Polynomial');\n  initMetadataForObject(QRCodeSetup, 'QRCodeSetup');\n  initMetadataForClass(QRCodeSquare, 'QRCodeSquare');\n  initMetadataForClass(QRCodeSquareInfo, 'QRCodeSquareInfo');\n  initMetadataForClass(QRCodeSquareType, 'QRCodeSquareType', VOID, Enum);\n  initMetadataForClass(QRCodeRegion, 'QRCodeRegion', VOID, Enum);\n  initMetadataForClass(QRData, 'QRData');\n  initMetadataForClass(QR8BitByte, 'QR8BitByte', VOID, QRData);\n  initMetadataForClass(QRAlphaNum, 'QRAlphaNum', VOID, QRData);\n  initMetadataForClass(QRNumber, 'QRNumber', VOID, QRData);\n  initMetadataForObject(QRMath, 'QRMath');\n  initMetadataForObject(QRUtil, 'QRUtil');\n  initMetadataForCompanion(Companion_8);\n  initMetadataForClass(RSBlock, 'RSBlock');\n  initMetadataForClass(ErrorCorrectionLevel, 'ErrorCorrectionLevel', VOID, Enum);\n  initMetadataForClass(MaskPattern, 'MaskPattern', VOID, Enum);\n  initMetadataForClass(QRCodeDataType, 'QRCodeDataType', VOID, Enum);\n  initMetadataForCompanion(Companion_9);\n  initMetadataForClass(QRCodeProcessor, 'QRCodeProcessor');\n  initMetadataForClass(QRCodeGraphicsFactory, 'QRCodeGraphicsFactory', QRCodeGraphicsFactory);\n  initMetadataForCompanion(Companion_10);\n  function beforeRender_0(qrCode, qrCodeGraphics) {\n  }\n  initMetadataForInterface(QRCodeShapeFunction, 'QRCodeShapeFunction');\n  initMetadataForClass(DefaultShapeFunction, 'DefaultShapeFunction', DefaultShapeFunction, VOID, [QRCodeShapeFunction]);\n  initMetadataForClass(RoundSquaresShapeFunction, 'RoundSquaresShapeFunction', RoundSquaresShapeFunction, DefaultShapeFunction);\n  initMetadataForClass(CircleShapeFunction, 'CircleShapeFunction', CircleShapeFunction, RoundSquaresShapeFunction);\n  initMetadataForCompanion(Companion_11);\n  initMetadataForCompanion(Companion_12);\n  initMetadataForClass(QRCodeGraphics, 'QRCodeGraphics');\n  //endregion\n  function CharSequence() {\n  }\n  function Number_0() {\n  }\n  function toCollection(_this__u8e3s4, destination) {\n    var inductionVariable = 0;\n    var last = _this__u8e3s4.length;\n    while (inductionVariable < last) {\n      var item = _this__u8e3s4[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      destination.c(item);\n    }\n    return destination;\n  }\n  function joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n    separator = separator === VOID ? ', ' : separator;\n    prefix = prefix === VOID ? '' : prefix;\n    postfix = postfix === VOID ? '' : postfix;\n    limit = limit === VOID ? -1 : limit;\n    truncated = truncated === VOID ? '...' : truncated;\n    transform = transform === VOID ? null : transform;\n    return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n  }\n  function joinTo(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n    separator = separator === VOID ? ', ' : separator;\n    prefix = prefix === VOID ? '' : prefix;\n    postfix = postfix === VOID ? '' : postfix;\n    limit = limit === VOID ? -1 : limit;\n    truncated = truncated === VOID ? '...' : truncated;\n    transform = transform === VOID ? null : transform;\n    buffer.d(prefix);\n    var count = 0;\n    var _iterator__ex2g4s = _this__u8e3s4.e();\n    $l$loop: while (_iterator__ex2g4s.f()) {\n      var element = _iterator__ex2g4s.g();\n      count = count + 1 | 0;\n      if (count > 1) {\n        buffer.d(separator);\n      }\n      if (limit < 0 || count <= limit) {\n        appendElement(buffer, element, transform);\n      } else\n        break $l$loop;\n    }\n    if (limit >= 0 && count > limit) {\n      buffer.d(truncated);\n    }\n    buffer.d(postfix);\n    return buffer;\n  }\n  function toSet(_this__u8e3s4) {\n    if (isInterface(_this__u8e3s4, Collection)) {\n      var tmp;\n      switch (_this__u8e3s4.h()) {\n        case 0:\n          tmp = emptySet();\n          break;\n        case 1:\n          var tmp_0;\n          if (isInterface(_this__u8e3s4, KtList)) {\n            tmp_0 = _this__u8e3s4.i(0);\n          } else {\n            tmp_0 = _this__u8e3s4.e().g();\n          }\n\n          tmp = setOf(tmp_0);\n          break;\n        default:\n          tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_0(mapCapacity(_this__u8e3s4.h())));\n          break;\n      }\n      return tmp;\n    }\n    return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$()));\n  }\n  function toCollection_0(_this__u8e3s4, destination) {\n    var _iterator__ex2g4s = _this__u8e3s4.e();\n    while (_iterator__ex2g4s.f()) {\n      var item = _iterator__ex2g4s.g();\n      destination.c(item);\n    }\n    return destination;\n  }\n  function until(_this__u8e3s4, to) {\n    if (to <= -2147483648)\n      return Companion_getInstance_5().j_1;\n    return numberRangeToNumber(_this__u8e3s4, to - 1 | 0);\n  }\n  function coerceAtLeast(_this__u8e3s4, minimumValue) {\n    return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4;\n  }\n  function coerceIn(_this__u8e3s4, range) {\n    if (isInterface(range, ClosedFloatingPointRange)) {\n      return coerceIn_0(_this__u8e3s4, range);\n    }\n    if (range.k())\n      throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: ' + toString_1(range) + '.');\n    return _this__u8e3s4 < range.m() ? range.m() : _this__u8e3s4 > range.l() ? range.l() : _this__u8e3s4;\n  }\n  function step(_this__u8e3s4, step) {\n    checkStepIsPositive(step > 0, step);\n    return Companion_instance_6.q(_this__u8e3s4.n_1, _this__u8e3s4.o_1, _this__u8e3s4.p_1 > 0 ? step : -step | 0);\n  }\n  function coerceIn_0(_this__u8e3s4, range) {\n    if (range.k())\n      throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: ' + toString_1(range) + '.');\n    return range.r(_this__u8e3s4, range.m()) && !range.r(range.m(), _this__u8e3s4) ? range.m() : range.r(range.l(), _this__u8e3s4) && !range.r(_this__u8e3s4, range.l()) ? range.l() : _this__u8e3s4;\n  }\n  function coerceAtMost(_this__u8e3s4, maximumValue) {\n    return _this__u8e3s4 > maximumValue ? maximumValue : _this__u8e3s4;\n  }\n  function _Char___init__impl__6a9atx(value) {\n    return value;\n  }\n  function _get_value__a43j40($this) {\n    return $this;\n  }\n  function _Char___init__impl__6a9atx_0(code) {\n    // Inline function 'kotlin.UShort.toInt' call\n    var tmp$ret$0 = _UShort___get_data__impl__g0245(code) & 65535;\n    return _Char___init__impl__6a9atx(tmp$ret$0);\n  }\n  function Char__compareTo_impl_ypi4mb($this, other) {\n    return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n  }\n  function Char__minus_impl_a2frrh($this, other) {\n    return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n  }\n  function Char__toInt_impl_vasixd($this) {\n    return _get_value__a43j40($this);\n  }\n  function toString($this) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return String.fromCharCode(_get_value__a43j40($this));\n  }\n  function Char() {\n  }\n  function KtList() {\n  }\n  function Collection() {\n  }\n  function KtSet() {\n  }\n  function Entry() {\n  }\n  function KtMap() {\n  }\n  function Companion() {\n  }\n  var Companion_instance;\n  function Companion_getInstance() {\n    return Companion_instance;\n  }\n  function Enum(name, ordinal) {\n    this.x_1 = name;\n    this.y_1 = ordinal;\n  }\n  protoOf(Enum).z = function () {\n    return this.x_1;\n  };\n  protoOf(Enum).a1 = function () {\n    return this.y_1;\n  };\n  protoOf(Enum).b1 = function (other) {\n    return compareTo(this.y_1, other.y_1);\n  };\n  protoOf(Enum).c1 = function (other) {\n    return this.b1(other instanceof Enum ? other : THROW_CCE());\n  };\n  protoOf(Enum).equals = function (other) {\n    return this === other;\n  };\n  protoOf(Enum).hashCode = function () {\n    return identityHashCode(this);\n  };\n  protoOf(Enum).toString = function () {\n    return this.x_1;\n  };\n  function toString_0(_this__u8e3s4) {\n    var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : toString_1(_this__u8e3s4);\n    return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs;\n  }\n  function Companion_0() {\n    Companion_instance_0 = this;\n    this.d1_1 = new Long(0, -2147483648);\n    this.e1_1 = new Long(-1, 2147483647);\n    this.f1_1 = 8;\n    this.g1_1 = 64;\n  }\n  var Companion_instance_0;\n  function Companion_getInstance_0() {\n    if (Companion_instance_0 == null)\n      new Companion_0();\n    return Companion_instance_0;\n  }\n  function Long(low, high) {\n    Companion_getInstance_0();\n    Number_0.call(this);\n    this.h1_1 = low;\n    this.i1_1 = high;\n  }\n  protoOf(Long).j1 = function (other) {\n    return compare(this, other);\n  };\n  protoOf(Long).c1 = function (other) {\n    return this.j1(other instanceof Long ? other : THROW_CCE());\n  };\n  protoOf(Long).k1 = function (other) {\n    return add(this, other);\n  };\n  protoOf(Long).l1 = function (other) {\n    return divide(this, other);\n  };\n  protoOf(Long).m1 = function () {\n    return this.n1().k1(new Long(1, 0));\n  };\n  protoOf(Long).n1 = function () {\n    return new Long(~this.h1_1, ~this.i1_1);\n  };\n  protoOf(Long).o1 = function () {\n    return this.h1_1;\n  };\n  protoOf(Long).p1 = function () {\n    return toNumber(this);\n  };\n  protoOf(Long).toString = function () {\n    return toStringImpl(this, 10);\n  };\n  protoOf(Long).equals = function (other) {\n    var tmp;\n    if (other instanceof Long) {\n      tmp = equalsLong(this, other);\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(Long).hashCode = function () {\n    return hashCode_0(this);\n  };\n  protoOf(Long).valueOf = function () {\n    return this.p1();\n  };\n  function implement(interfaces) {\n    var maxSize = 1;\n    var masks = [];\n    var inductionVariable = 0;\n    var last = interfaces.length;\n    while (inductionVariable < last) {\n      var i = interfaces[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      var currentSize = maxSize;\n      var tmp0_elvis_lhs = i.prototype.$imask$;\n      var imask = tmp0_elvis_lhs == null ? i.$imask$ : tmp0_elvis_lhs;\n      if (!(imask == null)) {\n        masks.push(imask);\n        currentSize = imask.length;\n      }\n      var iid = i.$metadata$.iid;\n      var tmp;\n      if (iid == null) {\n        tmp = null;\n      } else {\n        // Inline function 'kotlin.let' call\n        tmp = bitMaskWith(iid);\n      }\n      var iidImask = tmp;\n      if (!(iidImask == null)) {\n        masks.push(iidImask);\n        currentSize = Math.max(currentSize, iidImask.length);\n      }\n      if (currentSize > maxSize) {\n        maxSize = currentSize;\n      }\n    }\n    return compositeBitMask(maxSize, masks);\n  }\n  function bitMaskWith(activeBit) {\n    var numberIndex = activeBit >> 5;\n    var intArray = new Int32Array(numberIndex + 1 | 0);\n    var positionInNumber = activeBit & 31;\n    var numberWithSettledBit = 1 << positionInNumber;\n    intArray[numberIndex] = intArray[numberIndex] | numberWithSettledBit;\n    return intArray;\n  }\n  function compositeBitMask(capacity, masks) {\n    var tmp = 0;\n    var tmp_0 = new Int32Array(capacity);\n    while (tmp < capacity) {\n      var tmp_1 = tmp;\n      var result = 0;\n      var inductionVariable = 0;\n      var last = masks.length;\n      while (inductionVariable < last) {\n        var mask = masks[inductionVariable];\n        inductionVariable = inductionVariable + 1 | 0;\n        if (tmp_1 < mask.length) {\n          result = result | mask[tmp_1];\n        }\n      }\n      tmp_0[tmp_1] = result;\n      tmp = tmp + 1 | 0;\n    }\n    return tmp_0;\n  }\n  function isBitSet(_this__u8e3s4, possibleActiveBit) {\n    var numberIndex = possibleActiveBit >> 5;\n    if (numberIndex > _this__u8e3s4.length)\n      return false;\n    var positionInNumber = possibleActiveBit & 31;\n    var numberWithSettledBit = 1 << positionInNumber;\n    return !((_this__u8e3s4[numberIndex] & numberWithSettledBit) === 0);\n  }\n  function FunctionAdapter() {\n  }\n  function get_buf() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return buf;\n  }\n  var buf;\n  function get_bufFloat64() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return bufFloat64;\n  }\n  var bufFloat64;\n  var bufFloat32;\n  function get_bufInt32() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return bufInt32;\n  }\n  var bufInt32;\n  function get_lowIndex() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return lowIndex;\n  }\n  var lowIndex;\n  function get_highIndex() {\n    _init_properties_bitUtils_kt__nfcg4k();\n    return highIndex;\n  }\n  var highIndex;\n  function getNumberHashCode(obj) {\n    _init_properties_bitUtils_kt__nfcg4k();\n    // Inline function 'kotlin.js.jsBitwiseOr' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    if ((obj | 0) === obj) {\n      return numberToInt(obj);\n    }\n    get_bufFloat64()[0] = obj;\n    return imul(get_bufInt32()[get_highIndex()], 31) + get_bufInt32()[get_lowIndex()] | 0;\n  }\n  var properties_initialized_bitUtils_kt_i2bo3e;\n  function _init_properties_bitUtils_kt__nfcg4k() {\n    if (!properties_initialized_bitUtils_kt_i2bo3e) {\n      properties_initialized_bitUtils_kt_i2bo3e = true;\n      buf = new ArrayBuffer(8);\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      bufFloat64 = new Float64Array(get_buf());\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      bufFloat32 = new Float32Array(get_buf());\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      bufInt32 = new Int32Array(get_buf());\n      // Inline function 'kotlin.run' call\n      get_bufFloat64()[0] = -1.0;\n      lowIndex = !(get_bufInt32()[0] === 0) ? 1 : 0;\n      highIndex = 1 - get_lowIndex() | 0;\n    }\n  }\n  function charSequenceGet(a, index) {\n    var tmp;\n    if (isString(a)) {\n      // Inline function 'kotlin.js.asDynamic' call\n      // Inline function 'kotlin.js.unsafeCast' call\n      var tmp$ret$1 = a.charCodeAt(index);\n      tmp = numberToChar(tmp$ret$1);\n    } else {\n      tmp = a.b(index);\n    }\n    return tmp;\n  }\n  function isString(a) {\n    return typeof a === 'string';\n  }\n  function charSequenceLength(a) {\n    var tmp;\n    if (isString(a)) {\n      // Inline function 'kotlin.js.asDynamic' call\n      // Inline function 'kotlin.js.unsafeCast' call\n      tmp = a.length;\n    } else {\n      tmp = a.a();\n    }\n    return tmp;\n  }\n  function compareTo(a, b) {\n    var tmp;\n    switch (typeof a) {\n      case 'number':\n        var tmp_0;\n        if (typeof b === 'number') {\n          tmp_0 = doubleCompareTo(a, b);\n        } else {\n          if (b instanceof Long) {\n            tmp_0 = doubleCompareTo(a, b.p1());\n          } else {\n            tmp_0 = primitiveCompareTo(a, b);\n          }\n        }\n\n        tmp = tmp_0;\n        break;\n      case 'string':\n      case 'boolean':\n        tmp = primitiveCompareTo(a, b);\n        break;\n      default:\n        tmp = compareToDoNotIntrinsicify(a, b);\n        break;\n    }\n    return tmp;\n  }\n  function doubleCompareTo(a, b) {\n    var tmp;\n    if (a < b) {\n      tmp = -1;\n    } else if (a > b) {\n      tmp = 1;\n    } else if (a === b) {\n      var tmp_0;\n      if (a !== 0) {\n        tmp_0 = 0;\n      } else {\n        // Inline function 'kotlin.js.asDynamic' call\n        var ia = 1 / a;\n        var tmp_1;\n        // Inline function 'kotlin.js.asDynamic' call\n        if (ia === 1 / b) {\n          tmp_1 = 0;\n        } else {\n          if (ia < 0) {\n            tmp_1 = -1;\n          } else {\n            tmp_1 = 1;\n          }\n        }\n        tmp_0 = tmp_1;\n      }\n      tmp = tmp_0;\n    } else if (a !== a) {\n      tmp = b !== b ? 0 : 1;\n    } else {\n      tmp = -1;\n    }\n    return tmp;\n  }\n  function primitiveCompareTo(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n  }\n  function compareToDoNotIntrinsicify(a, b) {\n    return a.c1(b);\n  }\n  function identityHashCode(obj) {\n    return getObjectHashCode(obj);\n  }\n  function getObjectHashCode(obj) {\n    // Inline function 'kotlin.js.jsIn' call\n    if (!('kotlinHashCodeValue$' in obj)) {\n      var hash = calculateRandomHash();\n      var descriptor = new Object();\n      descriptor.value = hash;\n      descriptor.enumerable = false;\n      Object.defineProperty(obj, 'kotlinHashCodeValue$', descriptor);\n    }\n    // Inline function 'kotlin.js.unsafeCast' call\n    return obj['kotlinHashCodeValue$'];\n  }\n  function calculateRandomHash() {\n    // Inline function 'kotlin.js.jsBitwiseOr' call\n    return Math.random() * 4.294967296E9 | 0;\n  }\n  function defineProp(obj, name, getter, setter) {\n    return Object.defineProperty(obj, name, {configurable: true, get: getter, set: setter});\n  }\n  function objectCreate(proto) {\n    proto = proto === VOID ? null : proto;\n    return Object.create(proto);\n  }\n  function toString_1(o) {\n    var tmp;\n    if (o == null) {\n      tmp = 'null';\n    } else if (isArrayish(o)) {\n      tmp = '[...]';\n    } else if (!(typeof o.toString === 'function')) {\n      tmp = anyToString(o);\n    } else {\n      // Inline function 'kotlin.js.unsafeCast' call\n      tmp = o.toString();\n    }\n    return tmp;\n  }\n  function anyToString(o) {\n    return Object.prototype.toString.call(o);\n  }\n  function hashCode(obj) {\n    if (obj == null)\n      return 0;\n    var typeOf = typeof obj;\n    var tmp;\n    switch (typeOf) {\n      case 'object':\n        tmp = 'function' === typeof obj.hashCode ? obj.hashCode() : getObjectHashCode(obj);\n        break;\n      case 'function':\n        tmp = getObjectHashCode(obj);\n        break;\n      case 'number':\n        tmp = getNumberHashCode(obj);\n        break;\n      case 'boolean':\n        // Inline function 'kotlin.js.unsafeCast' call\n\n        tmp = getBooleanHashCode(obj);\n        break;\n      case 'string':\n        tmp = getStringHashCode(String(obj));\n        break;\n      case 'bigint':\n        tmp = getBigIntHashCode(obj);\n        break;\n      case 'symbol':\n        tmp = getSymbolHashCode(obj);\n        break;\n      default:\n        tmp = function () {\n          throw new Error('Unexpected typeof `' + typeOf + '`');\n        }();\n        break;\n    }\n    return tmp;\n  }\n  function getBooleanHashCode(value) {\n    return value ? 1231 : 1237;\n  }\n  function getStringHashCode(str) {\n    var hash = 0;\n    var length = str.length;\n    var inductionVariable = 0;\n    var last = length - 1 | 0;\n    if (inductionVariable <= last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        // Inline function 'kotlin.js.asDynamic' call\n        var code = str.charCodeAt(i);\n        hash = imul(hash, 31) + code | 0;\n      }\n       while (!(i === last));\n    return hash;\n  }\n  function getBigIntHashCode(value) {\n    var shiftNumber = BigInt(32);\n    var MASK = BigInt(4.294967295E9);\n    var bigNumber = value < 0 ? -value : value;\n    var hashCode = 0;\n    var signum = value < 0 ? -1 : 1;\n    while (bigNumber != 0) {\n      // Inline function 'kotlin.js.unsafeCast' call\n      var chunk = Number(bigNumber & MASK);\n      hashCode = imul(31, hashCode) + chunk | 0;\n      bigNumber = bigNumber >> shiftNumber;\n    }\n    return imul(hashCode, signum);\n  }\n  function getSymbolHashCode(value) {\n    var hashCodeMap = symbolIsSharable(value) ? getSymbolMap() : getSymbolWeakMap();\n    var cachedHashCode = hashCodeMap.get(value);\n    if (cachedHashCode !== VOID)\n      return cachedHashCode;\n    var hash = calculateRandomHash();\n    hashCodeMap.set(value, hash);\n    return hash;\n  }\n  function symbolIsSharable(symbol) {\n    return Symbol.keyFor(symbol) != VOID;\n  }\n  function getSymbolMap() {\n    if (symbolMap === VOID) {\n      symbolMap = new Map();\n    }\n    return symbolMap;\n  }\n  function getSymbolWeakMap() {\n    if (symbolWeakMap === VOID) {\n      symbolWeakMap = new WeakMap();\n    }\n    return symbolWeakMap;\n  }\n  var symbolMap;\n  var symbolWeakMap;\n  function equals(obj1, obj2) {\n    if (obj1 == null) {\n      return obj2 == null;\n    }\n    if (obj2 == null) {\n      return false;\n    }\n    if (typeof obj1 === 'object' && typeof obj1.equals === 'function') {\n      return obj1.equals(obj2);\n    }\n    if (obj1 !== obj1) {\n      return obj2 !== obj2;\n    }\n    if (typeof obj1 === 'number' && typeof obj2 === 'number') {\n      var tmp;\n      if (obj1 === obj2) {\n        var tmp_0;\n        if (obj1 !== 0) {\n          tmp_0 = true;\n        } else {\n          // Inline function 'kotlin.js.asDynamic' call\n          var tmp_1 = 1 / obj1;\n          // Inline function 'kotlin.js.asDynamic' call\n          tmp_0 = tmp_1 === 1 / obj2;\n        }\n        tmp = tmp_0;\n      } else {\n        tmp = false;\n      }\n      return tmp;\n    }\n    return obj1 === obj2;\n  }\n  function unboxIntrinsic(x) {\n    var message = 'Should be lowered';\n    throw IllegalStateException_init_$Create$_0(toString_1(message));\n  }\n  function captureStack(instance, constructorFunction) {\n    if (Error.captureStackTrace != null) {\n      Error.captureStackTrace(instance, constructorFunction);\n    } else {\n      // Inline function 'kotlin.js.asDynamic' call\n      instance.stack = (new Error()).stack;\n    }\n  }\n  function protoOf(constructor) {\n    return constructor.prototype;\n  }\n  function extendThrowable(this_, message, cause) {\n    Error.call(this_);\n    setPropertiesToThrowableInstance(this_, message, cause);\n  }\n  function setPropertiesToThrowableInstance(this_, message, cause) {\n    var errorInfo = calculateErrorInfo(Object.getPrototypeOf(this_));\n    if ((errorInfo & 1) === 0) {\n      var tmp;\n      if (message == null) {\n        var tmp_0;\n        if (!(message === null)) {\n          var tmp1_elvis_lhs = cause == null ? null : cause.toString();\n          tmp_0 = tmp1_elvis_lhs == null ? VOID : tmp1_elvis_lhs;\n        } else {\n          tmp_0 = VOID;\n        }\n        tmp = tmp_0;\n      } else {\n        tmp = message;\n      }\n      this_.message = tmp;\n    }\n    if ((errorInfo & 2) === 0) {\n      this_.cause = cause;\n    }\n    this_.name = Object.getPrototypeOf(this_).constructor.name;\n  }\n  function ensureNotNull(v) {\n    var tmp;\n    if (v == null) {\n      THROW_NPE();\n    } else {\n      tmp = v;\n    }\n    return tmp;\n  }\n  function THROW_NPE() {\n    throw NullPointerException_init_$Create$();\n  }\n  function noWhenBranchMatchedException() {\n    throw NoWhenBranchMatchedException_init_$Create$();\n  }\n  function THROW_CCE() {\n    throw ClassCastException_init_$Create$();\n  }\n  function THROW_IAE(msg) {\n    throw IllegalArgumentException_init_$Create$_0(msg);\n  }\n  function get_ZERO() {\n    _init_properties_longJs_kt__elc2w5();\n    return ZERO;\n  }\n  var ZERO;\n  function get_ONE() {\n    _init_properties_longJs_kt__elc2w5();\n    return ONE;\n  }\n  var ONE;\n  function get_NEG_ONE() {\n    _init_properties_longJs_kt__elc2w5();\n    return NEG_ONE;\n  }\n  var NEG_ONE;\n  function get_MAX_VALUE() {\n    _init_properties_longJs_kt__elc2w5();\n    return MAX_VALUE;\n  }\n  var MAX_VALUE;\n  function get_MIN_VALUE() {\n    _init_properties_longJs_kt__elc2w5();\n    return MIN_VALUE;\n  }\n  var MIN_VALUE;\n  function get_TWO_PWR_24_() {\n    _init_properties_longJs_kt__elc2w5();\n    return TWO_PWR_24_;\n  }\n  var TWO_PWR_24_;\n  function compare(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    if (equalsLong(_this__u8e3s4, other)) {\n      return 0;\n    }\n    var thisNeg = isNegative(_this__u8e3s4);\n    var otherNeg = isNegative(other);\n    return thisNeg && !otherNeg ? -1 : !thisNeg && otherNeg ? 1 : isNegative(subtract(_this__u8e3s4, other)) ? -1 : 1;\n  }\n  function add(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    var a48 = _this__u8e3s4.i1_1 >>> 16 | 0;\n    var a32 = _this__u8e3s4.i1_1 & 65535;\n    var a16 = _this__u8e3s4.h1_1 >>> 16 | 0;\n    var a00 = _this__u8e3s4.h1_1 & 65535;\n    var b48 = other.i1_1 >>> 16 | 0;\n    var b32 = other.i1_1 & 65535;\n    var b16 = other.h1_1 >>> 16 | 0;\n    var b00 = other.h1_1 & 65535;\n    var c48 = 0;\n    var c32 = 0;\n    var c16 = 0;\n    var c00 = 0;\n    c00 = c00 + (a00 + b00 | 0) | 0;\n    c16 = c16 + (c00 >>> 16 | 0) | 0;\n    c00 = c00 & 65535;\n    c16 = c16 + (a16 + b16 | 0) | 0;\n    c32 = c32 + (c16 >>> 16 | 0) | 0;\n    c16 = c16 & 65535;\n    c32 = c32 + (a32 + b32 | 0) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c48 = c48 + (a48 + b48 | 0) | 0;\n    c48 = c48 & 65535;\n    return new Long(c16 << 16 | c00, c48 << 16 | c32);\n  }\n  function subtract(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    return add(_this__u8e3s4, other.m1());\n  }\n  function multiply(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    if (isZero(_this__u8e3s4)) {\n      return get_ZERO();\n    } else if (isZero(other)) {\n      return get_ZERO();\n    }\n    if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n      return isOdd(other) ? get_MIN_VALUE() : get_ZERO();\n    } else if (equalsLong(other, get_MIN_VALUE())) {\n      return isOdd(_this__u8e3s4) ? get_MIN_VALUE() : get_ZERO();\n    }\n    if (isNegative(_this__u8e3s4)) {\n      var tmp;\n      if (isNegative(other)) {\n        tmp = multiply(negate(_this__u8e3s4), negate(other));\n      } else {\n        tmp = negate(multiply(negate(_this__u8e3s4), other));\n      }\n      return tmp;\n    } else if (isNegative(other)) {\n      return negate(multiply(_this__u8e3s4, negate(other)));\n    }\n    if (lessThan(_this__u8e3s4, get_TWO_PWR_24_()) && lessThan(other, get_TWO_PWR_24_())) {\n      return fromNumber(toNumber(_this__u8e3s4) * toNumber(other));\n    }\n    var a48 = _this__u8e3s4.i1_1 >>> 16 | 0;\n    var a32 = _this__u8e3s4.i1_1 & 65535;\n    var a16 = _this__u8e3s4.h1_1 >>> 16 | 0;\n    var a00 = _this__u8e3s4.h1_1 & 65535;\n    var b48 = other.i1_1 >>> 16 | 0;\n    var b32 = other.i1_1 & 65535;\n    var b16 = other.h1_1 >>> 16 | 0;\n    var b00 = other.h1_1 & 65535;\n    var c48 = 0;\n    var c32 = 0;\n    var c16 = 0;\n    var c00 = 0;\n    c00 = c00 + imul(a00, b00) | 0;\n    c16 = c16 + (c00 >>> 16 | 0) | 0;\n    c00 = c00 & 65535;\n    c16 = c16 + imul(a16, b00) | 0;\n    c32 = c32 + (c16 >>> 16 | 0) | 0;\n    c16 = c16 & 65535;\n    c16 = c16 + imul(a00, b16) | 0;\n    c32 = c32 + (c16 >>> 16 | 0) | 0;\n    c16 = c16 & 65535;\n    c32 = c32 + imul(a32, b00) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c32 = c32 + imul(a16, b16) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c32 = c32 + imul(a00, b32) | 0;\n    c48 = c48 + (c32 >>> 16 | 0) | 0;\n    c32 = c32 & 65535;\n    c48 = c48 + (((imul(a48, b00) + imul(a32, b16) | 0) + imul(a16, b32) | 0) + imul(a00, b48) | 0) | 0;\n    c48 = c48 & 65535;\n    return new Long(c16 << 16 | c00, c48 << 16 | c32);\n  }\n  function divide(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    if (isZero(other)) {\n      throw Exception_init_$Create$_0('division by zero');\n    } else if (isZero(_this__u8e3s4)) {\n      return get_ZERO();\n    }\n    if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n      if (equalsLong(other, get_ONE()) || equalsLong(other, get_NEG_ONE())) {\n        return get_MIN_VALUE();\n      } else if (equalsLong(other, get_MIN_VALUE())) {\n        return get_ONE();\n      } else {\n        var halfThis = shiftRight(_this__u8e3s4, 1);\n        var approx = shiftLeft(halfThis.l1(other), 1);\n        if (equalsLong(approx, get_ZERO())) {\n          return isNegative(other) ? get_ONE() : get_NEG_ONE();\n        } else {\n          var rem = subtract(_this__u8e3s4, multiply(other, approx));\n          return add(approx, rem.l1(other));\n        }\n      }\n    } else if (equalsLong(other, get_MIN_VALUE())) {\n      return get_ZERO();\n    }\n    if (isNegative(_this__u8e3s4)) {\n      var tmp;\n      if (isNegative(other)) {\n        tmp = negate(_this__u8e3s4).l1(negate(other));\n      } else {\n        tmp = negate(negate(_this__u8e3s4).l1(other));\n      }\n      return tmp;\n    } else if (isNegative(other)) {\n      return negate(_this__u8e3s4.l1(negate(other)));\n    }\n    var res = get_ZERO();\n    var rem_0 = _this__u8e3s4;\n    while (greaterThanOrEqual(rem_0, other)) {\n      var approxDouble = toNumber(rem_0) / toNumber(other);\n      var approx2 = Math.max(1.0, Math.floor(approxDouble));\n      var log2 = Math.ceil(Math.log(approx2) / Math.LN2);\n      var delta = log2 <= 48 ? 1.0 : Math.pow(2.0, log2 - 48);\n      var approxRes = fromNumber(approx2);\n      var approxRem = multiply(approxRes, other);\n      while (isNegative(approxRem) || greaterThan(approxRem, rem_0)) {\n        approx2 = approx2 - delta;\n        approxRes = fromNumber(approx2);\n        approxRem = multiply(approxRes, other);\n      }\n      if (isZero(approxRes)) {\n        approxRes = get_ONE();\n      }\n      res = add(res, approxRes);\n      rem_0 = subtract(rem_0, approxRem);\n    }\n    return res;\n  }\n  function shiftLeft(_this__u8e3s4, numBits) {\n    _init_properties_longJs_kt__elc2w5();\n    var numBits_0 = numBits & 63;\n    if (numBits_0 === 0) {\n      return _this__u8e3s4;\n    } else {\n      if (numBits_0 < 32) {\n        return new Long(_this__u8e3s4.h1_1 << numBits_0, _this__u8e3s4.i1_1 << numBits_0 | (_this__u8e3s4.h1_1 >>> (32 - numBits_0 | 0) | 0));\n      } else {\n        return new Long(0, _this__u8e3s4.h1_1 << (numBits_0 - 32 | 0));\n      }\n    }\n  }\n  function shiftRight(_this__u8e3s4, numBits) {\n    _init_properties_longJs_kt__elc2w5();\n    var numBits_0 = numBits & 63;\n    if (numBits_0 === 0) {\n      return _this__u8e3s4;\n    } else {\n      if (numBits_0 < 32) {\n        return new Long(_this__u8e3s4.h1_1 >>> numBits_0 | 0 | _this__u8e3s4.i1_1 << (32 - numBits_0 | 0), _this__u8e3s4.i1_1 >> numBits_0);\n      } else {\n        return new Long(_this__u8e3s4.i1_1 >> (numBits_0 - 32 | 0), _this__u8e3s4.i1_1 >= 0 ? 0 : -1);\n      }\n    }\n  }\n  function toNumber(_this__u8e3s4) {\n    _init_properties_longJs_kt__elc2w5();\n    return _this__u8e3s4.i1_1 * 4.294967296E9 + getLowBitsUnsigned(_this__u8e3s4);\n  }\n  function toStringImpl(_this__u8e3s4, radix) {\n    _init_properties_longJs_kt__elc2w5();\n    if (radix < 2 || 36 < radix) {\n      throw Exception_init_$Create$_0('radix out of range: ' + radix);\n    }\n    if (isZero(_this__u8e3s4)) {\n      return '0';\n    }\n    if (isNegative(_this__u8e3s4)) {\n      if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n        var radixLong = fromInt(radix);\n        var div = _this__u8e3s4.l1(radixLong);\n        var rem = subtract(multiply(div, radixLong), _this__u8e3s4).o1();\n        var tmp = toStringImpl(div, radix);\n        // Inline function 'kotlin.js.asDynamic' call\n        // Inline function 'kotlin.js.unsafeCast' call\n        return tmp + rem.toString(radix);\n      } else {\n        return '-' + toStringImpl(negate(_this__u8e3s4), radix);\n      }\n    }\n    var digitsPerTime = radix === 2 ? 31 : radix <= 10 ? 9 : radix <= 21 ? 7 : radix <= 35 ? 6 : 5;\n    var radixToPower = fromNumber(Math.pow(radix, digitsPerTime));\n    var rem_0 = _this__u8e3s4;\n    var result = '';\n    while (true) {\n      var remDiv = rem_0.l1(radixToPower);\n      var intval = subtract(rem_0, multiply(remDiv, radixToPower)).o1();\n      // Inline function 'kotlin.js.asDynamic' call\n      // Inline function 'kotlin.js.unsafeCast' call\n      var digits = intval.toString(radix);\n      rem_0 = remDiv;\n      if (isZero(rem_0)) {\n        return digits + result;\n      } else {\n        while (digits.length < digitsPerTime) {\n          digits = '0' + digits;\n        }\n        result = digits + result;\n      }\n    }\n  }\n  function equalsLong(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    return _this__u8e3s4.i1_1 === other.i1_1 && _this__u8e3s4.h1_1 === other.h1_1;\n  }\n  function hashCode_0(l) {\n    _init_properties_longJs_kt__elc2w5();\n    return l.h1_1 ^ l.i1_1;\n  }\n  function fromInt(value) {\n    _init_properties_longJs_kt__elc2w5();\n    return new Long(value, value < 0 ? -1 : 0);\n  }\n  function isNegative(_this__u8e3s4) {\n    _init_properties_longJs_kt__elc2w5();\n    return _this__u8e3s4.i1_1 < 0;\n  }\n  function isZero(_this__u8e3s4) {\n    _init_properties_longJs_kt__elc2w5();\n    return _this__u8e3s4.i1_1 === 0 && _this__u8e3s4.h1_1 === 0;\n  }\n  function isOdd(_this__u8e3s4) {\n    _init_properties_longJs_kt__elc2w5();\n    return (_this__u8e3s4.h1_1 & 1) === 1;\n  }\n  function negate(_this__u8e3s4) {\n    _init_properties_longJs_kt__elc2w5();\n    return _this__u8e3s4.m1();\n  }\n  function lessThan(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    return compare(_this__u8e3s4, other) < 0;\n  }\n  function fromNumber(value) {\n    _init_properties_longJs_kt__elc2w5();\n    if (isNaN_0(value)) {\n      return get_ZERO();\n    } else if (value <= -9.223372036854776E18) {\n      return get_MIN_VALUE();\n    } else if (value + 1 >= 9.223372036854776E18) {\n      return get_MAX_VALUE();\n    } else if (value < 0) {\n      return negate(fromNumber(-value));\n    } else {\n      var twoPwr32 = 4.294967296E9;\n      // Inline function 'kotlin.js.jsBitwiseOr' call\n      var tmp = value % twoPwr32 | 0;\n      // Inline function 'kotlin.js.jsBitwiseOr' call\n      var tmp$ret$1 = value / twoPwr32 | 0;\n      return new Long(tmp, tmp$ret$1);\n    }\n  }\n  function greaterThan(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    return compare(_this__u8e3s4, other) > 0;\n  }\n  function greaterThanOrEqual(_this__u8e3s4, other) {\n    _init_properties_longJs_kt__elc2w5();\n    return compare(_this__u8e3s4, other) >= 0;\n  }\n  function getLowBitsUnsigned(_this__u8e3s4) {\n    _init_properties_longJs_kt__elc2w5();\n    return _this__u8e3s4.h1_1 >= 0 ? _this__u8e3s4.h1_1 : 4.294967296E9 + _this__u8e3s4.h1_1;\n  }\n  var properties_initialized_longJs_kt_4syf89;\n  function _init_properties_longJs_kt__elc2w5() {\n    if (!properties_initialized_longJs_kt_4syf89) {\n      properties_initialized_longJs_kt_4syf89 = true;\n      ZERO = fromInt(0);\n      ONE = fromInt(1);\n      NEG_ONE = fromInt(-1);\n      MAX_VALUE = new Long(-1, 2147483647);\n      MIN_VALUE = new Long(0, -2147483648);\n      TWO_PWR_24_ = fromInt(16777216);\n    }\n  }\n  function createMetadata(kind, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n    var undef = VOID;\n    var iid = kind === 'interface' ? generateInterfaceId() : VOID;\n    return {kind: kind, simpleName: name, associatedObjectKey: associatedObjectKey, associatedObjects: associatedObjects, suspendArity: suspendArity, $kClass$: undef, defaultConstructor: defaultConstructor, iid: iid};\n  }\n  function generateInterfaceId() {\n    if (globalInterfaceId === VOID) {\n      globalInterfaceId = 0;\n    }\n    // Inline function 'kotlin.js.unsafeCast' call\n    globalInterfaceId = globalInterfaceId + 1 | 0;\n    // Inline function 'kotlin.js.unsafeCast' call\n    return globalInterfaceId;\n  }\n  var globalInterfaceId;\n  function initMetadataFor(kind, ctor, name, defaultConstructor, parent, interfaces, suspendArity, associatedObjectKey, associatedObjects) {\n    if (!(parent == null)) {\n      ctor.prototype = Object.create(parent.prototype);\n      ctor.prototype.constructor = ctor;\n    }\n    var metadata = createMetadata(kind, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity);\n    ctor.$metadata$ = metadata;\n    if (!(interfaces == null)) {\n      var receiver = !equals(metadata.iid, VOID) ? ctor : ctor.prototype;\n      receiver.$imask$ = implement(interfaces);\n    }\n  }\n  function initMetadataForClass(ctor, name, defaultConstructor, parent, interfaces, suspendArity, associatedObjectKey, associatedObjects) {\n    var kind = 'class';\n    initMetadataFor(kind, ctor, name, defaultConstructor, parent, interfaces, suspendArity, associatedObjectKey, associatedObjects);\n  }\n  function initMetadataForObject(ctor, name, defaultConstructor, parent, interfaces, suspendArity, associatedObjectKey, associatedObjects) {\n    var kind = 'object';\n    initMetadataFor(kind, ctor, name, defaultConstructor, parent, interfaces, suspendArity, associatedObjectKey, associatedObjects);\n  }\n  function initMetadataForInterface(ctor, name, defaultConstructor, parent, interfaces, suspendArity, associatedObjectKey, associatedObjects) {\n    var kind = 'interface';\n    initMetadataFor(kind, ctor, name, defaultConstructor, parent, interfaces, suspendArity, associatedObjectKey, associatedObjects);\n  }\n  function initMetadataForLambda(ctor, parent, interfaces, suspendArity) {\n    initMetadataForClass(ctor, 'Lambda', VOID, parent, interfaces, suspendArity, VOID, VOID);\n  }\n  function initMetadataForCoroutine(ctor, parent, interfaces, suspendArity) {\n    initMetadataForClass(ctor, 'Coroutine', VOID, parent, interfaces, suspendArity, VOID, VOID);\n  }\n  function initMetadataForFunctionReference(ctor, parent, interfaces, suspendArity) {\n    initMetadataForClass(ctor, 'FunctionReference', VOID, parent, interfaces, suspendArity, VOID, VOID);\n  }\n  function initMetadataForCompanion(ctor, parent, interfaces, suspendArity) {\n    initMetadataForObject(ctor, 'Companion', VOID, parent, interfaces, suspendArity, VOID, VOID);\n  }\n  function toByte(a) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return a << 24 >> 24;\n  }\n  function numberToInt(a) {\n    var tmp;\n    if (a instanceof Long) {\n      tmp = a.o1();\n    } else {\n      tmp = doubleToInt(a);\n    }\n    return tmp;\n  }\n  function doubleToInt(a) {\n    var tmp;\n    if (a > 2147483647) {\n      tmp = 2147483647;\n    } else if (a < -2147483648) {\n      tmp = -2147483648;\n    } else {\n      // Inline function 'kotlin.js.jsBitwiseOr' call\n      tmp = a | 0;\n    }\n    return tmp;\n  }\n  function toShort(a) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return a << 16 >> 16;\n  }\n  function numberToChar(a) {\n    // Inline function 'kotlin.toUShort' call\n    var this_0 = numberToInt(a);\n    var tmp$ret$0 = _UShort___init__impl__jigrne(toShort(this_0));\n    return _Char___init__impl__6a9atx_0(tmp$ret$0);\n  }\n  function numberRangeToNumber(start, endInclusive) {\n    return new IntRange(start, endInclusive);\n  }\n  function isArrayish(o) {\n    return isJsArray(o) || isView(o);\n  }\n  function isJsArray(obj) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    return Array.isArray(obj);\n  }\n  function isInterface(obj, iface) {\n    return isInterfaceImpl(obj, iface.$metadata$.iid);\n  }\n  function isInterfaceImpl(obj, iface) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp0_elvis_lhs = obj.$imask$;\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      return false;\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    var mask = tmp;\n    return isBitSet(mask, iface);\n  }\n  function isArray(obj) {\n    var tmp;\n    if (isJsArray(obj)) {\n      // Inline function 'kotlin.js.asDynamic' call\n      tmp = !obj.$type$;\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  }\n  function isNumber(a) {\n    var tmp;\n    if (typeof a === 'number') {\n      tmp = true;\n    } else {\n      tmp = a instanceof Long;\n    }\n    return tmp;\n  }\n  function isCharSequence(value) {\n    return typeof value === 'string' || isInterface(value, CharSequence);\n  }\n  function isBooleanArray(a) {\n    return isJsArray(a) && a.$type$ === 'BooleanArray';\n  }\n  function isByteArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Int8Array;\n  }\n  function isShortArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Int16Array;\n  }\n  function isCharArray(a) {\n    var tmp;\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    if (a instanceof Uint16Array) {\n      tmp = a.$type$ === 'CharArray';\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  }\n  function isIntArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Int32Array;\n  }\n  function isFloatArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Float32Array;\n  }\n  function isLongArray(a) {\n    return isJsArray(a) && a.$type$ === 'LongArray';\n  }\n  function isDoubleArray(a) {\n    // Inline function 'kotlin.js.jsInstanceOf' call\n    return a instanceof Float64Array;\n  }\n  function calculateErrorInfo(proto) {\n    var tmp0_safe_receiver = proto.constructor;\n    var metadata = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.$metadata$;\n    var tmp2_safe_receiver = metadata == null ? null : metadata.errorInfo;\n    if (tmp2_safe_receiver == null)\n      null;\n    else {\n      // Inline function 'kotlin.let' call\n      return tmp2_safe_receiver;\n    }\n    var result = 0;\n    if (hasProp(proto, 'message'))\n      result = result | 1;\n    if (hasProp(proto, 'cause'))\n      result = result | 2;\n    if (!(result === 3)) {\n      var parentProto = getPrototypeOf(proto);\n      if (parentProto != Error.prototype) {\n        result = result | calculateErrorInfo(parentProto);\n      }\n    }\n    if (!(metadata == null)) {\n      metadata.errorInfo = result;\n    }\n    return result;\n  }\n  function hasProp(proto, propName) {\n    return proto.hasOwnProperty(propName);\n  }\n  function getPrototypeOf(obj) {\n    return Object.getPrototypeOf(obj);\n  }\n  function get_VOID() {\n    _init_properties_void_kt__3zg9as();\n    return VOID;\n  }\n  var VOID;\n  var properties_initialized_void_kt_e4ret2;\n  function _init_properties_void_kt__3zg9as() {\n    if (!properties_initialized_void_kt_e4ret2) {\n      properties_initialized_void_kt_e4ret2 = true;\n      VOID = void 0;\n    }\n  }\n  function copyOf(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.require' call\n    if (!(newSize >= 0)) {\n      var message = 'Invalid new array size: ' + newSize + '.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return fillFrom(_this__u8e3s4, new Int32Array(newSize));\n  }\n  function toTypedArray(_this__u8e3s4) {\n    return [].slice.call(_this__u8e3s4);\n  }\n  function copyOf_0(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.require' call\n    if (!(newSize >= 0)) {\n      var message = 'Invalid new array size: ' + newSize + '.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return fillFrom(_this__u8e3s4, new Int8Array(newSize));\n  }\n  function copyOf_1(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.require' call\n    if (!(newSize >= 0)) {\n      var message = 'Invalid new array size: ' + newSize + '.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return arrayCopyResize(_this__u8e3s4, newSize, null);\n  }\n  function digitToIntImpl(_this__u8e3s4) {\n    // Inline function 'kotlin.code' call\n    var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n    var index = binarySearchRange(Digit_getInstance().r1_1, ch);\n    var diff = ch - Digit_getInstance().r1_1[index] | 0;\n    return diff < 10 ? diff : -1;\n  }\n  function binarySearchRange(array, needle) {\n    var bottom = 0;\n    var top = array.length - 1 | 0;\n    var middle = -1;\n    var value = 0;\n    while (bottom <= top) {\n      middle = (bottom + top | 0) / 2 | 0;\n      value = array[middle];\n      if (needle > value)\n        bottom = middle + 1 | 0;\n      else if (needle === value)\n        return middle;\n      else\n        top = middle - 1 | 0;\n    }\n    return middle - (needle < value ? 1 : 0) | 0;\n  }\n  function Digit() {\n    Digit_instance = this;\n    var tmp = this;\n    // Inline function 'kotlin.intArrayOf' call\n    tmp.r1_1 = new Int32Array([48, 1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3558, 3664, 3792, 3872, 4160, 4240, 6112, 6160, 6470, 6608, 6784, 6800, 6992, 7088, 7232, 7248, 42528, 43216, 43264, 43472, 43504, 43600, 44016, 65296]);\n  }\n  var Digit_instance;\n  function Digit_getInstance() {\n    if (Digit_instance == null)\n      new Digit();\n    return Digit_instance;\n  }\n  function Comparator() {\n  }\n  function isNaN_0(_this__u8e3s4) {\n    return !(_this__u8e3s4 === _this__u8e3s4);\n  }\n  function takeHighestOneBit(_this__u8e3s4) {\n    var tmp;\n    if (_this__u8e3s4 === 0) {\n      tmp = 0;\n    } else {\n      // Inline function 'kotlin.countLeadingZeroBits' call\n      tmp = 1 << (31 - clz32(_this__u8e3s4) | 0);\n    }\n    return tmp;\n  }\n  function Unit() {\n  }\n  protoOf(Unit).toString = function () {\n    return 'kotlin.Unit';\n  };\n  var Unit_instance;\n  function Unit_getInstance() {\n    return Unit_instance;\n  }\n  function collectionToArray(collection) {\n    return collectionToArrayCommonImpl(collection);\n  }\n  function setOf(element) {\n    return hashSetOf([element]);\n  }\n  function mapCapacity(expectedSize) {\n    return expectedSize;\n  }\n  function AbstractMutableCollection() {\n    AbstractCollection.call(this);\n  }\n  protoOf(AbstractMutableCollection).toJSON = function () {\n    return this.toArray();\n  };\n  function AbstractMutableSet() {\n    AbstractMutableCollection.call(this);\n  }\n  protoOf(AbstractMutableSet).equals = function (other) {\n    if (other === this)\n      return true;\n    if (!(!(other == null) ? isInterface(other, KtSet) : false))\n      return false;\n    return Companion_instance_4.s1(this, other);\n  };\n  protoOf(AbstractMutableSet).hashCode = function () {\n    return Companion_instance_4.t1(this);\n  };\n  function arrayOfUninitializedElements(capacity) {\n    // Inline function 'kotlin.require' call\n    if (!(capacity >= 0)) {\n      var message = 'capacity must be non-negative.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    // Inline function 'kotlin.arrayOfNulls' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return Array(capacity);\n  }\n  function resetRange(_this__u8e3s4, fromIndex, toIndex) {\n    // Inline function 'kotlin.js.nativeFill' call\n    // Inline function 'kotlin.js.asDynamic' call\n    _this__u8e3s4.fill(null, fromIndex, toIndex);\n  }\n  function copyOfUninitializedElements(_this__u8e3s4, newSize) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return copyOf_1(_this__u8e3s4, newSize);\n  }\n  function HashSet_init_$Init$(map, $this) {\n    AbstractMutableSet.call($this);\n    HashSet.call($this);\n    $this.u1_1 = map;\n    return $this;\n  }\n  function HashSet_init_$Init$_0($this) {\n    HashSet_init_$Init$(InternalHashMap_init_$Create$(), $this);\n    return $this;\n  }\n  function HashSet_init_$Create$() {\n    return HashSet_init_$Init$_0(objectCreate(protoOf(HashSet)));\n  }\n  function HashSet_init_$Init$_1(initialCapacity, loadFactor, $this) {\n    HashSet_init_$Init$(InternalHashMap_init_$Create$_0(initialCapacity, loadFactor), $this);\n    return $this;\n  }\n  function HashSet_init_$Init$_2(initialCapacity, $this) {\n    HashSet_init_$Init$_1(initialCapacity, 1.0, $this);\n    return $this;\n  }\n  function HashSet_init_$Create$_0(initialCapacity) {\n    return HashSet_init_$Init$_2(initialCapacity, objectCreate(protoOf(HashSet)));\n  }\n  protoOf(HashSet).c = function (element) {\n    return this.u1_1.v1(element, true) == null;\n  };\n  protoOf(HashSet).s = function (element) {\n    return this.u1_1.w1(element);\n  };\n  protoOf(HashSet).k = function () {\n    return this.u1_1.h() === 0;\n  };\n  protoOf(HashSet).e = function () {\n    return this.u1_1.x1();\n  };\n  protoOf(HashSet).h = function () {\n    return this.u1_1.h();\n  };\n  function HashSet() {\n  }\n  function computeHashSize($this, capacity) {\n    return takeHighestOneBit(imul(coerceAtLeast(capacity, 1), 3));\n  }\n  function computeShift($this, hashSize) {\n    // Inline function 'kotlin.countLeadingZeroBits' call\n    return clz32(hashSize) + 1 | 0;\n  }\n  function checkForComodification($this) {\n    if (!($this.i2_1.f2_1 === $this.k2_1))\n      throw ConcurrentModificationException_init_$Create$_0('The backing map has been modified after this entry was obtained.');\n  }\n  function InternalHashMap_init_$Init$($this) {\n    InternalHashMap_init_$Init$_0(8, $this);\n    return $this;\n  }\n  function InternalHashMap_init_$Create$() {\n    return InternalHashMap_init_$Init$(objectCreate(protoOf(InternalHashMap)));\n  }\n  function InternalHashMap_init_$Init$_0(initialCapacity, $this) {\n    InternalHashMap.call($this, arrayOfUninitializedElements(initialCapacity), null, new Int32Array(initialCapacity), new Int32Array(computeHashSize(Companion_instance_1, initialCapacity)), 2, 0);\n    return $this;\n  }\n  function InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, $this) {\n    InternalHashMap_init_$Init$_0(initialCapacity, $this);\n    // Inline function 'kotlin.require' call\n    if (!(loadFactor > 0)) {\n      var message = 'Non-positive load factor: ' + loadFactor;\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    return $this;\n  }\n  function InternalHashMap_init_$Create$_0(initialCapacity, loadFactor) {\n    return InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, objectCreate(protoOf(InternalHashMap)));\n  }\n  function _get_capacity__a9k9f3($this) {\n    return $this.y1_1.length;\n  }\n  function _get_hashSize__tftcho($this) {\n    return $this.b2_1.length;\n  }\n  function registerModification($this) {\n    $this.f2_1 = $this.f2_1 + 1 | 0;\n  }\n  function ensureExtraCapacity($this, n) {\n    if (shouldCompact($this, n)) {\n      compact($this, true);\n    } else {\n      ensureCapacity($this, $this.d2_1 + n | 0);\n    }\n  }\n  function shouldCompact($this, extraCapacity) {\n    var spareCapacity = _get_capacity__a9k9f3($this) - $this.d2_1 | 0;\n    var gaps = $this.d2_1 - $this.h() | 0;\n    return spareCapacity < extraCapacity && (gaps + spareCapacity | 0) >= extraCapacity && gaps >= (_get_capacity__a9k9f3($this) / 4 | 0);\n  }\n  function ensureCapacity($this, minCapacity) {\n    if (minCapacity < 0)\n      throw RuntimeException_init_$Create$_0('too many elements');\n    if (minCapacity > _get_capacity__a9k9f3($this)) {\n      var newSize = Companion_instance_3.m2(_get_capacity__a9k9f3($this), minCapacity);\n      $this.y1_1 = copyOfUninitializedElements($this.y1_1, newSize);\n      var tmp = $this;\n      var tmp0_safe_receiver = $this.z1_1;\n      tmp.z1_1 = tmp0_safe_receiver == null ? null : copyOfUninitializedElements(tmp0_safe_receiver, newSize);\n      $this.a2_1 = copyOf($this.a2_1, newSize);\n      var newHashSize = computeHashSize(Companion_instance_1, newSize);\n      if (newHashSize > _get_hashSize__tftcho($this)) {\n        rehash($this, newHashSize);\n      }\n    }\n  }\n  function allocateValuesArray($this) {\n    var curValuesArray = $this.z1_1;\n    if (!(curValuesArray == null))\n      return curValuesArray;\n    var newValuesArray = arrayOfUninitializedElements(_get_capacity__a9k9f3($this));\n    $this.z1_1 = newValuesArray;\n    return newValuesArray;\n  }\n  function hash($this, key) {\n    return key == null ? 0 : imul(hashCode(key), -1640531527) >>> $this.e2_1 | 0;\n  }\n  function compact($this, updateHashArray) {\n    var i = 0;\n    var j = 0;\n    var valuesArray = $this.z1_1;\n    while (i < $this.d2_1) {\n      var hash = $this.a2_1[i];\n      if (hash >= 0) {\n        $this.y1_1[j] = $this.y1_1[i];\n        if (!(valuesArray == null)) {\n          valuesArray[j] = valuesArray[i];\n        }\n        if (updateHashArray) {\n          $this.a2_1[j] = hash;\n          $this.b2_1[hash] = j + 1 | 0;\n        }\n        j = j + 1 | 0;\n      }\n      i = i + 1 | 0;\n    }\n    resetRange($this.y1_1, j, $this.d2_1);\n    if (valuesArray == null)\n      null;\n    else {\n      resetRange(valuesArray, j, $this.d2_1);\n    }\n    $this.d2_1 = j;\n  }\n  function rehash($this, newHashSize) {\n    registerModification($this);\n    if ($this.d2_1 > $this.g2_1) {\n      compact($this, false);\n    }\n    $this.b2_1 = new Int32Array(newHashSize);\n    $this.e2_1 = computeShift(Companion_instance_1, newHashSize);\n    var i = 0;\n    while (i < $this.d2_1) {\n      var _unary__edvuaz = i;\n      i = _unary__edvuaz + 1 | 0;\n      if (!putRehash($this, _unary__edvuaz)) {\n        throw IllegalStateException_init_$Create$_0('This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?');\n      }\n    }\n  }\n  function putRehash($this, i) {\n    var hash_0 = hash($this, $this.y1_1[i]);\n    var probesLeft = $this.c2_1;\n    while (true) {\n      var index = $this.b2_1[hash_0];\n      if (index === 0) {\n        $this.b2_1[hash_0] = i + 1 | 0;\n        $this.a2_1[i] = hash_0;\n        return true;\n      }\n      probesLeft = probesLeft - 1 | 0;\n      if (probesLeft < 0)\n        return false;\n      var _unary__edvuaz = hash_0;\n      hash_0 = _unary__edvuaz - 1 | 0;\n      if (_unary__edvuaz === 0)\n        hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n    }\n  }\n  function findKey($this, key) {\n    var hash_0 = hash($this, key);\n    var probesLeft = $this.c2_1;\n    while (true) {\n      var index = $this.b2_1[hash_0];\n      if (index === 0)\n        return -1;\n      if (index > 0 && equals($this.y1_1[index - 1 | 0], key))\n        return index - 1 | 0;\n      probesLeft = probesLeft - 1 | 0;\n      if (probesLeft < 0)\n        return -1;\n      var _unary__edvuaz = hash_0;\n      hash_0 = _unary__edvuaz - 1 | 0;\n      if (_unary__edvuaz === 0)\n        hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n    }\n  }\n  function addKey($this, key) {\n    $this.n2();\n    retry: while (true) {\n      var hash_0 = hash($this, key);\n      var tentativeMaxProbeDistance = coerceAtMost(imul($this.c2_1, 2), _get_hashSize__tftcho($this) / 2 | 0);\n      var probeDistance = 0;\n      while (true) {\n        var index = $this.b2_1[hash_0];\n        if (index <= 0) {\n          if ($this.d2_1 >= _get_capacity__a9k9f3($this)) {\n            ensureExtraCapacity($this, 1);\n            continue retry;\n          }\n          var _unary__edvuaz = $this.d2_1;\n          $this.d2_1 = _unary__edvuaz + 1 | 0;\n          var putIndex = _unary__edvuaz;\n          $this.y1_1[putIndex] = key;\n          $this.a2_1[putIndex] = hash_0;\n          $this.b2_1[hash_0] = putIndex + 1 | 0;\n          $this.g2_1 = $this.g2_1 + 1 | 0;\n          registerModification($this);\n          if (probeDistance > $this.c2_1)\n            $this.c2_1 = probeDistance;\n          return putIndex;\n        }\n        if (equals($this.y1_1[index - 1 | 0], key)) {\n          return -index | 0;\n        }\n        probeDistance = probeDistance + 1 | 0;\n        if (probeDistance > tentativeMaxProbeDistance) {\n          rehash($this, imul(_get_hashSize__tftcho($this), 2));\n          continue retry;\n        }\n        var _unary__edvuaz_0 = hash_0;\n        hash_0 = _unary__edvuaz_0 - 1 | 0;\n        if (_unary__edvuaz_0 === 0)\n          hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n      }\n    }\n  }\n  function contentEquals($this, other) {\n    return $this.g2_1 === other.h() && $this.o2(other.w());\n  }\n  function Companion_1() {\n    this.p2_1 = -1640531527;\n    this.q2_1 = 8;\n    this.r2_1 = 2;\n    this.s2_1 = -1;\n  }\n  var Companion_instance_1;\n  function Companion_getInstance_1() {\n    return Companion_instance_1;\n  }\n  function Itr(map) {\n    this.t2_1 = map;\n    this.u2_1 = 0;\n    this.v2_1 = -1;\n    this.w2_1 = this.t2_1.f2_1;\n    this.x2();\n  }\n  protoOf(Itr).x2 = function () {\n    while (this.u2_1 < this.t2_1.d2_1 && this.t2_1.a2_1[this.u2_1] < 0) {\n      this.u2_1 = this.u2_1 + 1 | 0;\n    }\n  };\n  protoOf(Itr).f = function () {\n    return this.u2_1 < this.t2_1.d2_1;\n  };\n  protoOf(Itr).y2 = function () {\n    if (!(this.t2_1.f2_1 === this.w2_1))\n      throw ConcurrentModificationException_init_$Create$();\n  };\n  function KeysItr(map) {\n    Itr.call(this, map);\n  }\n  protoOf(KeysItr).g = function () {\n    this.y2();\n    if (this.u2_1 >= this.t2_1.d2_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var _unary__edvuaz = this.u2_1;\n    this.u2_1 = _unary__edvuaz + 1 | 0;\n    tmp.v2_1 = _unary__edvuaz;\n    var result = this.t2_1.y1_1[this.v2_1];\n    this.x2();\n    return result;\n  };\n  function EntriesItr(map) {\n    Itr.call(this, map);\n  }\n  protoOf(EntriesItr).g = function () {\n    this.y2();\n    if (this.u2_1 >= this.t2_1.d2_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var _unary__edvuaz = this.u2_1;\n    this.u2_1 = _unary__edvuaz + 1 | 0;\n    tmp.v2_1 = _unary__edvuaz;\n    var result = new EntryRef(this.t2_1, this.v2_1);\n    this.x2();\n    return result;\n  };\n  protoOf(EntriesItr).h3 = function () {\n    if (this.u2_1 >= this.t2_1.d2_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var _unary__edvuaz = this.u2_1;\n    this.u2_1 = _unary__edvuaz + 1 | 0;\n    tmp.v2_1 = _unary__edvuaz;\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver = this.t2_1.y1_1[this.v2_1];\n    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n    var tmp_0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver_0 = ensureNotNull(this.t2_1.z1_1)[this.v2_1];\n    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n    var result = tmp_0 ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n    this.x2();\n    return result;\n  };\n  protoOf(EntriesItr).i3 = function (sb) {\n    if (this.u2_1 >= this.t2_1.d2_1)\n      throw NoSuchElementException_init_$Create$();\n    var tmp = this;\n    var _unary__edvuaz = this.u2_1;\n    this.u2_1 = _unary__edvuaz + 1 | 0;\n    tmp.v2_1 = _unary__edvuaz;\n    var key = this.t2_1.y1_1[this.v2_1];\n    if (equals(key, this.t2_1))\n      sb.l3('(this Map)');\n    else\n      sb.k3(key);\n    sb.m3(_Char___init__impl__6a9atx(61));\n    var value = ensureNotNull(this.t2_1.z1_1)[this.v2_1];\n    if (equals(value, this.t2_1))\n      sb.l3('(this Map)');\n    else\n      sb.k3(value);\n    this.x2();\n  };\n  function EntryRef(map, index) {\n    this.i2_1 = map;\n    this.j2_1 = index;\n    this.k2_1 = this.i2_1.f2_1;\n  }\n  protoOf(EntryRef).u = function () {\n    checkForComodification(this);\n    return this.i2_1.y1_1[this.j2_1];\n  };\n  protoOf(EntryRef).v = function () {\n    checkForComodification(this);\n    return ensureNotNull(this.i2_1.z1_1)[this.j2_1];\n  };\n  protoOf(EntryRef).equals = function (other) {\n    var tmp;\n    var tmp_0;\n    if (!(other == null) ? isInterface(other, Entry) : false) {\n      tmp_0 = equals(other.u(), this.u());\n    } else {\n      tmp_0 = false;\n    }\n    if (tmp_0) {\n      tmp = equals(other.v(), this.v());\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(EntryRef).hashCode = function () {\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver = this.u();\n    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n    var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n    // Inline function 'kotlin.hashCode' call\n    var tmp0_safe_receiver_0 = this.v();\n    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n    return tmp ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n  };\n  protoOf(EntryRef).toString = function () {\n    return toString_0(this.u()) + '=' + toString_0(this.v());\n  };\n  function InternalHashMap(keysArray, valuesArray, presenceArray, hashArray, maxProbeDistance, length) {\n    this.y1_1 = keysArray;\n    this.z1_1 = valuesArray;\n    this.a2_1 = presenceArray;\n    this.b2_1 = hashArray;\n    this.c2_1 = maxProbeDistance;\n    this.d2_1 = length;\n    this.e2_1 = computeShift(Companion_instance_1, _get_hashSize__tftcho(this));\n    this.f2_1 = 0;\n    this.g2_1 = 0;\n    this.h2_1 = false;\n  }\n  protoOf(InternalHashMap).h = function () {\n    return this.g2_1;\n  };\n  protoOf(InternalHashMap).w1 = function (key) {\n    return findKey(this, key) >= 0;\n  };\n  protoOf(InternalHashMap).v1 = function (key, value) {\n    var index = addKey(this, key);\n    var valuesArray = allocateValuesArray(this);\n    if (index < 0) {\n      var oldValue = valuesArray[(-index | 0) - 1 | 0];\n      valuesArray[(-index | 0) - 1 | 0] = value;\n      return oldValue;\n    } else {\n      valuesArray[index] = value;\n      return null;\n    }\n  };\n  protoOf(InternalHashMap).equals = function (other) {\n    var tmp;\n    if (other === this) {\n      tmp = true;\n    } else {\n      var tmp_0;\n      if (!(other == null) ? isInterface(other, KtMap) : false) {\n        tmp_0 = contentEquals(this, other);\n      } else {\n        tmp_0 = false;\n      }\n      tmp = tmp_0;\n    }\n    return tmp;\n  };\n  protoOf(InternalHashMap).hashCode = function () {\n    var result = 0;\n    var it = this.n3();\n    while (it.f()) {\n      result = result + it.h3() | 0;\n    }\n    return result;\n  };\n  protoOf(InternalHashMap).toString = function () {\n    var sb = StringBuilder_init_$Create$(2 + imul(this.g2_1, 3) | 0);\n    sb.l3('{');\n    var i = 0;\n    var it = this.n3();\n    while (it.f()) {\n      if (i > 0) {\n        sb.l3(', ');\n      }\n      it.i3(sb);\n      i = i + 1 | 0;\n    }\n    sb.l3('}');\n    return sb.toString();\n  };\n  protoOf(InternalHashMap).n2 = function () {\n    if (this.h2_1)\n      throw UnsupportedOperationException_init_$Create$();\n  };\n  protoOf(InternalHashMap).o3 = function (entry) {\n    var index = findKey(this, entry.u());\n    if (index < 0)\n      return false;\n    return equals(ensureNotNull(this.z1_1)[index], entry.v());\n  };\n  protoOf(InternalHashMap).p3 = function (entry) {\n    return this.o3(isInterface(entry, Entry) ? entry : THROW_CCE());\n  };\n  protoOf(InternalHashMap).x1 = function () {\n    return new KeysItr(this);\n  };\n  protoOf(InternalHashMap).n3 = function () {\n    return new EntriesItr(this);\n  };\n  function InternalMap() {\n  }\n  function LinkedHashSet_init_$Init$($this) {\n    HashSet_init_$Init$_0($this);\n    LinkedHashSet.call($this);\n    return $this;\n  }\n  function LinkedHashSet_init_$Create$() {\n    return LinkedHashSet_init_$Init$(objectCreate(protoOf(LinkedHashSet)));\n  }\n  function LinkedHashSet_init_$Init$_0(initialCapacity, loadFactor, $this) {\n    HashSet_init_$Init$_1(initialCapacity, loadFactor, $this);\n    LinkedHashSet.call($this);\n    return $this;\n  }\n  function LinkedHashSet_init_$Init$_1(initialCapacity, $this) {\n    LinkedHashSet_init_$Init$_0(initialCapacity, 1.0, $this);\n    return $this;\n  }\n  function LinkedHashSet_init_$Create$_0(initialCapacity) {\n    return LinkedHashSet_init_$Init$_1(initialCapacity, objectCreate(protoOf(LinkedHashSet)));\n  }\n  function LinkedHashSet() {\n  }\n  function Exception_init_$Init$($this) {\n    extendThrowable($this);\n    Exception.call($this);\n    return $this;\n  }\n  function Exception_init_$Create$() {\n    var tmp = Exception_init_$Init$(objectCreate(protoOf(Exception)));\n    captureStack(tmp, Exception_init_$Create$);\n    return tmp;\n  }\n  function Exception_init_$Init$_0(message, $this) {\n    extendThrowable($this, message);\n    Exception.call($this);\n    return $this;\n  }\n  function Exception_init_$Create$_0(message) {\n    var tmp = Exception_init_$Init$_0(message, objectCreate(protoOf(Exception)));\n    captureStack(tmp, Exception_init_$Create$_0);\n    return tmp;\n  }\n  function Exception_init_$Init$_1(message, cause, $this) {\n    extendThrowable($this, message, cause);\n    Exception.call($this);\n    return $this;\n  }\n  function Exception() {\n    captureStack(this, Exception);\n  }\n  function IllegalArgumentException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    IllegalArgumentException.call($this);\n    return $this;\n  }\n  function IllegalArgumentException_init_$Create$() {\n    var tmp = IllegalArgumentException_init_$Init$(objectCreate(protoOf(IllegalArgumentException)));\n    captureStack(tmp, IllegalArgumentException_init_$Create$);\n    return tmp;\n  }\n  function IllegalArgumentException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    IllegalArgumentException.call($this);\n    return $this;\n  }\n  function IllegalArgumentException_init_$Create$_0(message) {\n    var tmp = IllegalArgumentException_init_$Init$_0(message, objectCreate(protoOf(IllegalArgumentException)));\n    captureStack(tmp, IllegalArgumentException_init_$Create$_0);\n    return tmp;\n  }\n  function IllegalArgumentException_init_$Init$_1(message, cause, $this) {\n    RuntimeException_init_$Init$_1(message, cause, $this);\n    IllegalArgumentException.call($this);\n    return $this;\n  }\n  function IllegalArgumentException() {\n    captureStack(this, IllegalArgumentException);\n  }\n  function IllegalStateException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    IllegalStateException.call($this);\n    return $this;\n  }\n  function IllegalStateException_init_$Create$() {\n    var tmp = IllegalStateException_init_$Init$(objectCreate(protoOf(IllegalStateException)));\n    captureStack(tmp, IllegalStateException_init_$Create$);\n    return tmp;\n  }\n  function IllegalStateException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    IllegalStateException.call($this);\n    return $this;\n  }\n  function IllegalStateException_init_$Create$_0(message) {\n    var tmp = IllegalStateException_init_$Init$_0(message, objectCreate(protoOf(IllegalStateException)));\n    captureStack(tmp, IllegalStateException_init_$Create$_0);\n    return tmp;\n  }\n  function IllegalStateException() {\n    captureStack(this, IllegalStateException);\n  }\n  function UnsupportedOperationException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    UnsupportedOperationException.call($this);\n    return $this;\n  }\n  function UnsupportedOperationException_init_$Create$() {\n    var tmp = UnsupportedOperationException_init_$Init$(objectCreate(protoOf(UnsupportedOperationException)));\n    captureStack(tmp, UnsupportedOperationException_init_$Create$);\n    return tmp;\n  }\n  function UnsupportedOperationException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    UnsupportedOperationException.call($this);\n    return $this;\n  }\n  function UnsupportedOperationException_init_$Create$_0(message) {\n    var tmp = UnsupportedOperationException_init_$Init$_0(message, objectCreate(protoOf(UnsupportedOperationException)));\n    captureStack(tmp, UnsupportedOperationException_init_$Create$_0);\n    return tmp;\n  }\n  function UnsupportedOperationException() {\n    captureStack(this, UnsupportedOperationException);\n  }\n  function RuntimeException_init_$Init$($this) {\n    Exception_init_$Init$($this);\n    RuntimeException.call($this);\n    return $this;\n  }\n  function RuntimeException_init_$Create$() {\n    var tmp = RuntimeException_init_$Init$(objectCreate(protoOf(RuntimeException)));\n    captureStack(tmp, RuntimeException_init_$Create$);\n    return tmp;\n  }\n  function RuntimeException_init_$Init$_0(message, $this) {\n    Exception_init_$Init$_0(message, $this);\n    RuntimeException.call($this);\n    return $this;\n  }\n  function RuntimeException_init_$Create$_0(message) {\n    var tmp = RuntimeException_init_$Init$_0(message, objectCreate(protoOf(RuntimeException)));\n    captureStack(tmp, RuntimeException_init_$Create$_0);\n    return tmp;\n  }\n  function RuntimeException_init_$Init$_1(message, cause, $this) {\n    Exception_init_$Init$_1(message, cause, $this);\n    RuntimeException.call($this);\n    return $this;\n  }\n  function RuntimeException() {\n    captureStack(this, RuntimeException);\n  }\n  function NoSuchElementException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    NoSuchElementException.call($this);\n    return $this;\n  }\n  function NoSuchElementException_init_$Create$() {\n    var tmp = NoSuchElementException_init_$Init$(objectCreate(protoOf(NoSuchElementException)));\n    captureStack(tmp, NoSuchElementException_init_$Create$);\n    return tmp;\n  }\n  function NoSuchElementException() {\n    captureStack(this, NoSuchElementException);\n  }\n  function Error_init_$Init$($this) {\n    extendThrowable($this);\n    Error_0.call($this);\n    return $this;\n  }\n  function Error_init_$Create$() {\n    var tmp = Error_init_$Init$(objectCreate(protoOf(Error_0)));\n    captureStack(tmp, Error_init_$Create$);\n    return tmp;\n  }\n  function Error_init_$Init$_0(message, cause, $this) {\n    extendThrowable($this, message, cause);\n    Error_0.call($this);\n    return $this;\n  }\n  function Error_init_$Create$_0(message, cause) {\n    var tmp = Error_init_$Init$_0(message, cause, objectCreate(protoOf(Error_0)));\n    captureStack(tmp, Error_init_$Create$_0);\n    return tmp;\n  }\n  function Error_0() {\n    captureStack(this, Error_0);\n  }\n  function IndexOutOfBoundsException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    IndexOutOfBoundsException.call($this);\n    return $this;\n  }\n  function IndexOutOfBoundsException_init_$Create$() {\n    var tmp = IndexOutOfBoundsException_init_$Init$(objectCreate(protoOf(IndexOutOfBoundsException)));\n    captureStack(tmp, IndexOutOfBoundsException_init_$Create$);\n    return tmp;\n  }\n  function IndexOutOfBoundsException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    IndexOutOfBoundsException.call($this);\n    return $this;\n  }\n  function IndexOutOfBoundsException_init_$Create$_0(message) {\n    var tmp = IndexOutOfBoundsException_init_$Init$_0(message, objectCreate(protoOf(IndexOutOfBoundsException)));\n    captureStack(tmp, IndexOutOfBoundsException_init_$Create$_0);\n    return tmp;\n  }\n  function IndexOutOfBoundsException() {\n    captureStack(this, IndexOutOfBoundsException);\n  }\n  function NumberFormatException_init_$Init$($this) {\n    IllegalArgumentException_init_$Init$($this);\n    NumberFormatException.call($this);\n    return $this;\n  }\n  function NumberFormatException_init_$Create$() {\n    var tmp = NumberFormatException_init_$Init$(objectCreate(protoOf(NumberFormatException)));\n    captureStack(tmp, NumberFormatException_init_$Create$);\n    return tmp;\n  }\n  function NumberFormatException_init_$Init$_0(message, $this) {\n    IllegalArgumentException_init_$Init$_0(message, $this);\n    NumberFormatException.call($this);\n    return $this;\n  }\n  function NumberFormatException_init_$Create$_0(message) {\n    var tmp = NumberFormatException_init_$Init$_0(message, objectCreate(protoOf(NumberFormatException)));\n    captureStack(tmp, NumberFormatException_init_$Create$_0);\n    return tmp;\n  }\n  function NumberFormatException() {\n    captureStack(this, NumberFormatException);\n  }\n  function ConcurrentModificationException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    ConcurrentModificationException.call($this);\n    return $this;\n  }\n  function ConcurrentModificationException_init_$Create$() {\n    var tmp = ConcurrentModificationException_init_$Init$(objectCreate(protoOf(ConcurrentModificationException)));\n    captureStack(tmp, ConcurrentModificationException_init_$Create$);\n    return tmp;\n  }\n  function ConcurrentModificationException_init_$Init$_0(message, $this) {\n    RuntimeException_init_$Init$_0(message, $this);\n    ConcurrentModificationException.call($this);\n    return $this;\n  }\n  function ConcurrentModificationException_init_$Create$_0(message) {\n    var tmp = ConcurrentModificationException_init_$Init$_0(message, objectCreate(protoOf(ConcurrentModificationException)));\n    captureStack(tmp, ConcurrentModificationException_init_$Create$_0);\n    return tmp;\n  }\n  function ConcurrentModificationException() {\n    captureStack(this, ConcurrentModificationException);\n  }\n  function NullPointerException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    NullPointerException.call($this);\n    return $this;\n  }\n  function NullPointerException_init_$Create$() {\n    var tmp = NullPointerException_init_$Init$(objectCreate(protoOf(NullPointerException)));\n    captureStack(tmp, NullPointerException_init_$Create$);\n    return tmp;\n  }\n  function NullPointerException() {\n    captureStack(this, NullPointerException);\n  }\n  function NoWhenBranchMatchedException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    NoWhenBranchMatchedException.call($this);\n    return $this;\n  }\n  function NoWhenBranchMatchedException_init_$Create$() {\n    var tmp = NoWhenBranchMatchedException_init_$Init$(objectCreate(protoOf(NoWhenBranchMatchedException)));\n    captureStack(tmp, NoWhenBranchMatchedException_init_$Create$);\n    return tmp;\n  }\n  function NoWhenBranchMatchedException() {\n    captureStack(this, NoWhenBranchMatchedException);\n  }\n  function ClassCastException_init_$Init$($this) {\n    RuntimeException_init_$Init$($this);\n    ClassCastException.call($this);\n    return $this;\n  }\n  function ClassCastException_init_$Create$() {\n    var tmp = ClassCastException_init_$Init$(objectCreate(protoOf(ClassCastException)));\n    captureStack(tmp, ClassCastException_init_$Create$);\n    return tmp;\n  }\n  function ClassCastException() {\n    captureStack(this, ClassCastException);\n  }\n  function fillFrom(src, dst) {\n    var srcLen = src.length;\n    var dstLen = dst.length;\n    var index = 0;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var arr = dst;\n    while (index < srcLen && index < dstLen) {\n      var tmp = index;\n      var _unary__edvuaz = index;\n      index = _unary__edvuaz + 1 | 0;\n      arr[tmp] = src[_unary__edvuaz];\n    }\n    return dst;\n  }\n  function arrayCopyResize(source, newSize, defaultValue) {\n    // Inline function 'kotlin.js.unsafeCast' call\n    var result = source.slice(0, newSize);\n    // Inline function 'kotlin.copyArrayType' call\n    if (source.$type$ !== undefined) {\n      result.$type$ = source.$type$;\n    }\n    var index = source.length;\n    if (newSize > index) {\n      // Inline function 'kotlin.js.asDynamic' call\n      result.length = newSize;\n      while (index < newSize) {\n        var _unary__edvuaz = index;\n        index = _unary__edvuaz + 1 | 0;\n        result[_unary__edvuaz] = defaultValue;\n      }\n    }\n    return result;\n  }\n  function roundToInt(_this__u8e3s4) {\n    var tmp;\n    if (isNaN_0(_this__u8e3s4)) {\n      throw IllegalArgumentException_init_$Create$_0('Cannot round NaN value.');\n    } else if (_this__u8e3s4 > 2147483647) {\n      tmp = 2147483647;\n    } else if (_this__u8e3s4 < -2147483648) {\n      tmp = -2147483648;\n    } else {\n      tmp = numberToInt(Math.round(_this__u8e3s4));\n    }\n    return tmp;\n  }\n  function KClass() {\n  }\n  function KClassImpl(jClass) {\n    this.t3_1 = jClass;\n  }\n  protoOf(KClassImpl).u3 = function () {\n    return this.t3_1;\n  };\n  protoOf(KClassImpl).equals = function (other) {\n    var tmp;\n    if (other instanceof NothingKClassImpl) {\n      tmp = false;\n    } else {\n      if (other instanceof ErrorKClass) {\n        tmp = false;\n      } else {\n        if (other instanceof KClassImpl) {\n          tmp = equals(this.u3(), other.u3());\n        } else {\n          tmp = false;\n        }\n      }\n    }\n    return tmp;\n  };\n  protoOf(KClassImpl).hashCode = function () {\n    var tmp0_safe_receiver = this.s3();\n    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);\n    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n  };\n  protoOf(KClassImpl).toString = function () {\n    return 'class ' + this.s3();\n  };\n  function NothingKClassImpl() {\n    NothingKClassImpl_instance = this;\n    KClassImpl.call(this, Object);\n    this.w3_1 = 'Nothing';\n  }\n  protoOf(NothingKClassImpl).s3 = function () {\n    return this.w3_1;\n  };\n  protoOf(NothingKClassImpl).u3 = function () {\n    throw UnsupportedOperationException_init_$Create$_0(\"There's no native JS class for Nothing type\");\n  };\n  protoOf(NothingKClassImpl).equals = function (other) {\n    return other === this;\n  };\n  protoOf(NothingKClassImpl).hashCode = function () {\n    return 0;\n  };\n  var NothingKClassImpl_instance;\n  function NothingKClassImpl_getInstance() {\n    if (NothingKClassImpl_instance == null)\n      new NothingKClassImpl();\n    return NothingKClassImpl_instance;\n  }\n  function ErrorKClass() {\n  }\n  protoOf(ErrorKClass).s3 = function () {\n    var message = 'Unknown simpleName for ErrorKClass';\n    throw IllegalStateException_init_$Create$_0(toString_1(message));\n  };\n  protoOf(ErrorKClass).equals = function (other) {\n    return other === this;\n  };\n  protoOf(ErrorKClass).hashCode = function () {\n    return 0;\n  };\n  function PrimitiveKClassImpl(jClass, givenSimpleName, isInstanceFunction) {\n    KClassImpl.call(this, jClass);\n    this.y3_1 = givenSimpleName;\n    this.z3_1 = isInstanceFunction;\n  }\n  protoOf(PrimitiveKClassImpl).equals = function (other) {\n    if (!(other instanceof PrimitiveKClassImpl))\n      return false;\n    return protoOf(KClassImpl).equals.call(this, other) && this.y3_1 === other.y3_1;\n  };\n  protoOf(PrimitiveKClassImpl).s3 = function () {\n    return this.y3_1;\n  };\n  function SimpleKClassImpl(jClass) {\n    KClassImpl.call(this, jClass);\n    var tmp = this;\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp0_safe_receiver = jClass.$metadata$;\n    // Inline function 'kotlin.js.unsafeCast' call\n    tmp.b4_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.simpleName;\n  }\n  protoOf(SimpleKClassImpl).s3 = function () {\n    return this.b4_1;\n  };\n  function get_functionClasses() {\n    _init_properties_primitives_kt__3fums4();\n    return functionClasses;\n  }\n  var functionClasses;\n  function PrimitiveClasses$anyClass$lambda(it) {\n    return !(it == null);\n  }\n  function PrimitiveClasses$numberClass$lambda(it) {\n    return isNumber(it);\n  }\n  function PrimitiveClasses$booleanClass$lambda(it) {\n    return !(it == null) ? typeof it === 'boolean' : false;\n  }\n  function PrimitiveClasses$byteClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$shortClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$intClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$floatClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$doubleClass$lambda(it) {\n    return !(it == null) ? typeof it === 'number' : false;\n  }\n  function PrimitiveClasses$arrayClass$lambda(it) {\n    return !(it == null) ? isArray(it) : false;\n  }\n  function PrimitiveClasses$stringClass$lambda(it) {\n    return !(it == null) ? typeof it === 'string' : false;\n  }\n  function PrimitiveClasses$throwableClass$lambda(it) {\n    return it instanceof Error;\n  }\n  function PrimitiveClasses$booleanArrayClass$lambda(it) {\n    return !(it == null) ? isBooleanArray(it) : false;\n  }\n  function PrimitiveClasses$charArrayClass$lambda(it) {\n    return !(it == null) ? isCharArray(it) : false;\n  }\n  function PrimitiveClasses$byteArrayClass$lambda(it) {\n    return !(it == null) ? isByteArray(it) : false;\n  }\n  function PrimitiveClasses$shortArrayClass$lambda(it) {\n    return !(it == null) ? isShortArray(it) : false;\n  }\n  function PrimitiveClasses$intArrayClass$lambda(it) {\n    return !(it == null) ? isIntArray(it) : false;\n  }\n  function PrimitiveClasses$longArrayClass$lambda(it) {\n    return !(it == null) ? isLongArray(it) : false;\n  }\n  function PrimitiveClasses$floatArrayClass$lambda(it) {\n    return !(it == null) ? isFloatArray(it) : false;\n  }\n  function PrimitiveClasses$doubleArrayClass$lambda(it) {\n    return !(it == null) ? isDoubleArray(it) : false;\n  }\n  function PrimitiveClasses$functionClass$lambda($arity) {\n    return function (it) {\n      var tmp;\n      if (typeof it === 'function') {\n        // Inline function 'kotlin.js.asDynamic' call\n        tmp = it.length === $arity;\n      } else {\n        tmp = false;\n      }\n      return tmp;\n    };\n  }\n  function PrimitiveClasses() {\n    PrimitiveClasses_instance = this;\n    var tmp = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_0 = Object;\n    tmp.anyClass = new PrimitiveKClassImpl(tmp_0, 'Any', PrimitiveClasses$anyClass$lambda);\n    var tmp_1 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_2 = Number;\n    tmp_1.numberClass = new PrimitiveKClassImpl(tmp_2, 'Number', PrimitiveClasses$numberClass$lambda);\n    this.nothingClass = NothingKClassImpl_getInstance();\n    var tmp_3 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_4 = Boolean;\n    tmp_3.booleanClass = new PrimitiveKClassImpl(tmp_4, 'Boolean', PrimitiveClasses$booleanClass$lambda);\n    var tmp_5 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_6 = Number;\n    tmp_5.byteClass = new PrimitiveKClassImpl(tmp_6, 'Byte', PrimitiveClasses$byteClass$lambda);\n    var tmp_7 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_8 = Number;\n    tmp_7.shortClass = new PrimitiveKClassImpl(tmp_8, 'Short', PrimitiveClasses$shortClass$lambda);\n    var tmp_9 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_10 = Number;\n    tmp_9.intClass = new PrimitiveKClassImpl(tmp_10, 'Int', PrimitiveClasses$intClass$lambda);\n    var tmp_11 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_12 = Number;\n    tmp_11.floatClass = new PrimitiveKClassImpl(tmp_12, 'Float', PrimitiveClasses$floatClass$lambda);\n    var tmp_13 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_14 = Number;\n    tmp_13.doubleClass = new PrimitiveKClassImpl(tmp_14, 'Double', PrimitiveClasses$doubleClass$lambda);\n    var tmp_15 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_16 = Array;\n    tmp_15.arrayClass = new PrimitiveKClassImpl(tmp_16, 'Array', PrimitiveClasses$arrayClass$lambda);\n    var tmp_17 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_18 = String;\n    tmp_17.stringClass = new PrimitiveKClassImpl(tmp_18, 'String', PrimitiveClasses$stringClass$lambda);\n    var tmp_19 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_20 = Error;\n    tmp_19.throwableClass = new PrimitiveKClassImpl(tmp_20, 'Throwable', PrimitiveClasses$throwableClass$lambda);\n    var tmp_21 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_22 = Array;\n    tmp_21.booleanArrayClass = new PrimitiveKClassImpl(tmp_22, 'BooleanArray', PrimitiveClasses$booleanArrayClass$lambda);\n    var tmp_23 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_24 = Uint16Array;\n    tmp_23.charArrayClass = new PrimitiveKClassImpl(tmp_24, 'CharArray', PrimitiveClasses$charArrayClass$lambda);\n    var tmp_25 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_26 = Int8Array;\n    tmp_25.byteArrayClass = new PrimitiveKClassImpl(tmp_26, 'ByteArray', PrimitiveClasses$byteArrayClass$lambda);\n    var tmp_27 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_28 = Int16Array;\n    tmp_27.shortArrayClass = new PrimitiveKClassImpl(tmp_28, 'ShortArray', PrimitiveClasses$shortArrayClass$lambda);\n    var tmp_29 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_30 = Int32Array;\n    tmp_29.intArrayClass = new PrimitiveKClassImpl(tmp_30, 'IntArray', PrimitiveClasses$intArrayClass$lambda);\n    var tmp_31 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_32 = Array;\n    tmp_31.longArrayClass = new PrimitiveKClassImpl(tmp_32, 'LongArray', PrimitiveClasses$longArrayClass$lambda);\n    var tmp_33 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_34 = Float32Array;\n    tmp_33.floatArrayClass = new PrimitiveKClassImpl(tmp_34, 'FloatArray', PrimitiveClasses$floatArrayClass$lambda);\n    var tmp_35 = this;\n    // Inline function 'kotlin.js.unsafeCast' call\n    var tmp_36 = Float64Array;\n    tmp_35.doubleArrayClass = new PrimitiveKClassImpl(tmp_36, 'DoubleArray', PrimitiveClasses$doubleArrayClass$lambda);\n  }\n  protoOf(PrimitiveClasses).c4 = function () {\n    return this.anyClass;\n  };\n  protoOf(PrimitiveClasses).d4 = function () {\n    return this.numberClass;\n  };\n  protoOf(PrimitiveClasses).e4 = function () {\n    return this.nothingClass;\n  };\n  protoOf(PrimitiveClasses).f4 = function () {\n    return this.booleanClass;\n  };\n  protoOf(PrimitiveClasses).g4 = function () {\n    return this.byteClass;\n  };\n  protoOf(PrimitiveClasses).h4 = function () {\n    return this.shortClass;\n  };\n  protoOf(PrimitiveClasses).i4 = function () {\n    return this.intClass;\n  };\n  protoOf(PrimitiveClasses).j4 = function () {\n    return this.floatClass;\n  };\n  protoOf(PrimitiveClasses).k4 = function () {\n    return this.doubleClass;\n  };\n  protoOf(PrimitiveClasses).l4 = function () {\n    return this.arrayClass;\n  };\n  protoOf(PrimitiveClasses).m4 = function () {\n    return this.stringClass;\n  };\n  protoOf(PrimitiveClasses).n4 = function () {\n    return this.throwableClass;\n  };\n  protoOf(PrimitiveClasses).o4 = function () {\n    return this.booleanArrayClass;\n  };\n  protoOf(PrimitiveClasses).p4 = function () {\n    return this.charArrayClass;\n  };\n  protoOf(PrimitiveClasses).q4 = function () {\n    return this.byteArrayClass;\n  };\n  protoOf(PrimitiveClasses).r4 = function () {\n    return this.shortArrayClass;\n  };\n  protoOf(PrimitiveClasses).s4 = function () {\n    return this.intArrayClass;\n  };\n  protoOf(PrimitiveClasses).t4 = function () {\n    return this.longArrayClass;\n  };\n  protoOf(PrimitiveClasses).u4 = function () {\n    return this.floatArrayClass;\n  };\n  protoOf(PrimitiveClasses).v4 = function () {\n    return this.doubleArrayClass;\n  };\n  protoOf(PrimitiveClasses).functionClass = function (arity) {\n    var tmp0_elvis_lhs = get_functionClasses()[arity];\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      // Inline function 'kotlin.run' call\n      // Inline function 'kotlin.js.unsafeCast' call\n      var tmp_0 = Function;\n      var tmp_1 = 'Function' + arity;\n      var result = new PrimitiveKClassImpl(tmp_0, tmp_1, PrimitiveClasses$functionClass$lambda(arity));\n      // Inline function 'kotlin.js.asDynamic' call\n      get_functionClasses()[arity] = result;\n      tmp = result;\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    return tmp;\n  };\n  var PrimitiveClasses_instance;\n  function PrimitiveClasses_getInstance() {\n    if (PrimitiveClasses_instance == null)\n      new PrimitiveClasses();\n    return PrimitiveClasses_instance;\n  }\n  var properties_initialized_primitives_kt_jle18u;\n  function _init_properties_primitives_kt__3fums4() {\n    if (!properties_initialized_primitives_kt_jle18u) {\n      properties_initialized_primitives_kt_jle18u = true;\n      // Inline function 'kotlin.arrayOfNulls' call\n      functionClasses = Array(0);\n    }\n  }\n  function getKClass(jClass) {\n    var tmp;\n    if (Array.isArray(jClass)) {\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      tmp = getKClassM(jClass);\n    } else {\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      tmp = getKClass1(jClass);\n    }\n    return tmp;\n  }\n  function getKClassM(jClasses) {\n    var tmp;\n    switch (jClasses.length) {\n      case 1:\n        tmp = getKClass1(jClasses[0]);\n        break;\n      case 0:\n        // Inline function 'kotlin.js.unsafeCast' call\n\n        // Inline function 'kotlin.js.asDynamic' call\n\n        tmp = NothingKClassImpl_getInstance();\n        break;\n      default:\n        // Inline function 'kotlin.js.unsafeCast' call\n\n        // Inline function 'kotlin.js.asDynamic' call\n\n        tmp = new ErrorKClass();\n        break;\n    }\n    return tmp;\n  }\n  function getKClass1(jClass) {\n    if (jClass === String) {\n      // Inline function 'kotlin.js.unsafeCast' call\n      // Inline function 'kotlin.js.asDynamic' call\n      return PrimitiveClasses_getInstance().stringClass;\n    }\n    // Inline function 'kotlin.js.asDynamic' call\n    var metadata = jClass.$metadata$;\n    var tmp;\n    if (metadata != null) {\n      var tmp_0;\n      if (metadata.$kClass$ == null) {\n        var kClass = new SimpleKClassImpl(jClass);\n        metadata.$kClass$ = kClass;\n        tmp_0 = kClass;\n      } else {\n        tmp_0 = metadata.$kClass$;\n      }\n      tmp = tmp_0;\n    } else {\n      tmp = new SimpleKClassImpl(jClass);\n    }\n    return tmp;\n  }\n  function getKClassFromExpression(e) {\n    var tmp;\n    switch (typeof e) {\n      case 'string':\n        tmp = PrimitiveClasses_getInstance().stringClass;\n        break;\n      case 'number':\n        var tmp_0;\n        // Inline function 'kotlin.js.jsBitwiseOr' call\n\n        // Inline function 'kotlin.js.asDynamic' call\n\n        if ((e | 0) === e) {\n          tmp_0 = PrimitiveClasses_getInstance().intClass;\n        } else {\n          tmp_0 = PrimitiveClasses_getInstance().doubleClass;\n        }\n\n        tmp = tmp_0;\n        break;\n      case 'boolean':\n        tmp = PrimitiveClasses_getInstance().booleanClass;\n        break;\n      case 'function':\n        var tmp_1 = PrimitiveClasses_getInstance();\n        // Inline function 'kotlin.js.asDynamic' call\n\n        tmp = tmp_1.functionClass(e.length);\n        break;\n      default:\n        var tmp_2;\n        if (isBooleanArray(e)) {\n          tmp_2 = PrimitiveClasses_getInstance().booleanArrayClass;\n        } else {\n          if (isCharArray(e)) {\n            tmp_2 = PrimitiveClasses_getInstance().charArrayClass;\n          } else {\n            if (isByteArray(e)) {\n              tmp_2 = PrimitiveClasses_getInstance().byteArrayClass;\n            } else {\n              if (isShortArray(e)) {\n                tmp_2 = PrimitiveClasses_getInstance().shortArrayClass;\n              } else {\n                if (isIntArray(e)) {\n                  tmp_2 = PrimitiveClasses_getInstance().intArrayClass;\n                } else {\n                  if (isLongArray(e)) {\n                    tmp_2 = PrimitiveClasses_getInstance().longArrayClass;\n                  } else {\n                    if (isFloatArray(e)) {\n                      tmp_2 = PrimitiveClasses_getInstance().floatArrayClass;\n                    } else {\n                      if (isDoubleArray(e)) {\n                        tmp_2 = PrimitiveClasses_getInstance().doubleArrayClass;\n                      } else {\n                        if (isInterface(e, KClass)) {\n                          tmp_2 = getKClass(KClass);\n                        } else {\n                          if (isArray(e)) {\n                            tmp_2 = PrimitiveClasses_getInstance().arrayClass;\n                          } else {\n                            var constructor = Object.getPrototypeOf(e).constructor;\n                            var tmp_3;\n                            if (constructor === Object) {\n                              tmp_3 = PrimitiveClasses_getInstance().anyClass;\n                            } else if (constructor === Error) {\n                              tmp_3 = PrimitiveClasses_getInstance().throwableClass;\n                            } else {\n                              var jsClass = constructor;\n                              tmp_3 = getKClass1(jsClass);\n                            }\n                            tmp_2 = tmp_3;\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n\n        tmp = tmp_2;\n        break;\n    }\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return tmp;\n  }\n  function reset(_this__u8e3s4) {\n    _this__u8e3s4.lastIndex = 0;\n  }\n  function CharacterCodingException_init_$Init$($this) {\n    CharacterCodingException.call($this, null);\n    return $this;\n  }\n  function CharacterCodingException_init_$Create$() {\n    var tmp = CharacterCodingException_init_$Init$(objectCreate(protoOf(CharacterCodingException)));\n    captureStack(tmp, CharacterCodingException_init_$Create$);\n    return tmp;\n  }\n  function CharacterCodingException(message) {\n    Exception_init_$Init$_0(message, this);\n    captureStack(this, CharacterCodingException);\n  }\n  function StringBuilder_init_$Init$(capacity, $this) {\n    StringBuilder_init_$Init$_0($this);\n    return $this;\n  }\n  function StringBuilder_init_$Create$(capacity) {\n    return StringBuilder_init_$Init$(capacity, objectCreate(protoOf(StringBuilder)));\n  }\n  function StringBuilder_init_$Init$_0($this) {\n    StringBuilder.call($this, '');\n    return $this;\n  }\n  function StringBuilder_init_$Create$_0() {\n    return StringBuilder_init_$Init$_0(objectCreate(protoOf(StringBuilder)));\n  }\n  function StringBuilder(content) {\n    this.j3_1 = content;\n  }\n  protoOf(StringBuilder).a = function () {\n    // Inline function 'kotlin.js.asDynamic' call\n    return this.j3_1.length;\n  };\n  protoOf(StringBuilder).b = function (index) {\n    // Inline function 'kotlin.text.getOrElse' call\n    var this_0 = this.j3_1;\n    var tmp;\n    if (0 <= index ? index <= (charSequenceLength(this_0) - 1 | 0) : false) {\n      tmp = charSequenceGet(this_0, index);\n    } else {\n      throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', length: ' + this.a() + '}');\n    }\n    return tmp;\n  };\n  protoOf(StringBuilder).m3 = function (value) {\n    this.j3_1 = this.j3_1 + toString(value);\n    return this;\n  };\n  protoOf(StringBuilder).d = function (value) {\n    this.j3_1 = this.j3_1 + toString_0(value);\n    return this;\n  };\n  protoOf(StringBuilder).k3 = function (value) {\n    this.j3_1 = this.j3_1 + toString_0(value);\n    return this;\n  };\n  protoOf(StringBuilder).l3 = function (value) {\n    var tmp = this;\n    var tmp_0 = this.j3_1;\n    tmp.j3_1 = tmp_0 + (value == null ? 'null' : value);\n    return this;\n  };\n  protoOf(StringBuilder).toString = function () {\n    return this.j3_1;\n  };\n  function uppercaseChar(_this__u8e3s4) {\n    // Inline function 'kotlin.text.uppercase' call\n    // Inline function 'kotlin.js.asDynamic' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    var uppercase = toString(_this__u8e3s4).toUpperCase();\n    return uppercase.length > 1 ? _this__u8e3s4 : charSequenceGet(uppercase, 0);\n  }\n  function checkRadix(radix) {\n    if (!(2 <= radix ? radix <= 36 : false)) {\n      throw IllegalArgumentException_init_$Create$_0('radix ' + radix + ' was not in valid range 2..36');\n    }\n    return radix;\n  }\n  function toInt(_this__u8e3s4, radix) {\n    var tmp0_elvis_lhs = toIntOrNull(_this__u8e3s4, radix);\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      numberFormatError(_this__u8e3s4);\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    return tmp;\n  }\n  function toInt_0(_this__u8e3s4) {\n    var tmp0_elvis_lhs = toIntOrNull_0(_this__u8e3s4);\n    var tmp;\n    if (tmp0_elvis_lhs == null) {\n      numberFormatError(_this__u8e3s4);\n    } else {\n      tmp = tmp0_elvis_lhs;\n    }\n    return tmp;\n  }\n  function digitOf(char, radix) {\n    // Inline function 'kotlin.let' call\n    var it = Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(48)) >= 0 && Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(57)) <= 0 ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(48)) : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65)) >= 0 && Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(90)) <= 0 ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65)) + 10 | 0 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(97)) >= 0 && Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(122)) <= 0 ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(97)) + 10 | 0 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(128)) < 0 ? -1 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65313)) >= 0 && Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65338)) <= 0 ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65313)) + 10 | 0 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65345)) >= 0 && Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65370)) <= 0 ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65345)) + 10 | 0 : digitToIntImpl(char);\n    return it >= radix ? -1 : it;\n  }\n  function Regex_init_$Init$(pattern, $this) {\n    Regex.call($this, pattern, emptySet());\n    return $this;\n  }\n  function Regex_init_$Create$(pattern) {\n    return Regex_init_$Init$(pattern, objectCreate(protoOf(Regex)));\n  }\n  function Companion_2() {\n    Companion_instance_2 = this;\n    this.w4_1 = new RegExp('[\\\\\\\\^$*+?.()|[\\\\]{}]', 'g');\n    this.x4_1 = new RegExp('[\\\\\\\\$]', 'g');\n    this.y4_1 = new RegExp('\\\\$', 'g');\n  }\n  var Companion_instance_2;\n  function Companion_getInstance_2() {\n    if (Companion_instance_2 == null)\n      new Companion_2();\n    return Companion_instance_2;\n  }\n  function Regex(pattern, options) {\n    Companion_getInstance_2();\n    this.z4_1 = pattern;\n    this.a5_1 = toSet(options);\n    this.b5_1 = new RegExp(pattern, toFlags(options, 'gu'));\n    this.c5_1 = null;\n    this.d5_1 = null;\n  }\n  protoOf(Regex).e5 = function (input) {\n    reset(this.b5_1);\n    var match = this.b5_1.exec(toString_1(input));\n    return !(match == null) && match.index === 0 && this.b5_1.lastIndex === charSequenceLength(input);\n  };\n  protoOf(Regex).toString = function () {\n    return this.b5_1.toString();\n  };\n  function toFlags(_this__u8e3s4, prepend) {\n    return joinToString(_this__u8e3s4, '', prepend, VOID, VOID, VOID, toFlags$lambda);\n  }\n  function toFlags$lambda(it) {\n    return it.h5_1;\n  }\n  var STRING_CASE_INSENSITIVE_ORDER;\n  function compareTo_0(_this__u8e3s4, other, ignoreCase) {\n    ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n    _init_properties_stringJs_kt__bg7zye();\n    if (ignoreCase) {\n      var n1 = _this__u8e3s4.length;\n      var n2 = other.length;\n      // Inline function 'kotlin.comparisons.minOf' call\n      var min = Math.min(n1, n2);\n      if (min === 0)\n        return n1 - n2 | 0;\n      var inductionVariable = 0;\n      if (inductionVariable < min)\n        do {\n          var index = inductionVariable;\n          inductionVariable = inductionVariable + 1 | 0;\n          var thisChar = charSequenceGet(_this__u8e3s4, index);\n          var otherChar = charSequenceGet(other, index);\n          if (!(thisChar === otherChar)) {\n            thisChar = uppercaseChar(thisChar);\n            otherChar = uppercaseChar(otherChar);\n            if (!(thisChar === otherChar)) {\n              // Inline function 'kotlin.text.lowercaseChar' call\n              // Inline function 'kotlin.text.lowercase' call\n              var this_0 = thisChar;\n              // Inline function 'kotlin.js.asDynamic' call\n              // Inline function 'kotlin.js.unsafeCast' call\n              var tmp$ret$3 = toString(this_0).toLowerCase();\n              thisChar = charSequenceGet(tmp$ret$3, 0);\n              // Inline function 'kotlin.text.lowercaseChar' call\n              // Inline function 'kotlin.text.lowercase' call\n              var this_1 = otherChar;\n              // Inline function 'kotlin.js.asDynamic' call\n              // Inline function 'kotlin.js.unsafeCast' call\n              var tmp$ret$7 = toString(this_1).toLowerCase();\n              otherChar = charSequenceGet(tmp$ret$7, 0);\n              if (!(thisChar === otherChar)) {\n                return Char__compareTo_impl_ypi4mb(thisChar, otherChar);\n              }\n            }\n          }\n        }\n         while (inductionVariable < min);\n      return n1 - n2 | 0;\n    } else {\n      return compareTo(_this__u8e3s4, other);\n    }\n  }\n  function encodeToByteArray(_this__u8e3s4) {\n    _init_properties_stringJs_kt__bg7zye();\n    return encodeUtf8(_this__u8e3s4, 0, _this__u8e3s4.length, false);\n  }\n  function sam$kotlin_Comparator$0(function_0) {\n    this.i5_1 = function_0;\n  }\n  protoOf(sam$kotlin_Comparator$0).j5 = function (a, b) {\n    return this.i5_1(a, b);\n  };\n  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n    return this.j5(a, b);\n  };\n  protoOf(sam$kotlin_Comparator$0).q1 = function () {\n    return this.i5_1;\n  };\n  protoOf(sam$kotlin_Comparator$0).equals = function (other) {\n    var tmp;\n    if (!(other == null) ? isInterface(other, Comparator) : false) {\n      var tmp_0;\n      if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {\n        tmp_0 = equals(this.q1(), other.q1());\n      } else {\n        tmp_0 = false;\n      }\n      tmp = tmp_0;\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(sam$kotlin_Comparator$0).hashCode = function () {\n    return hashCode(this.q1());\n  };\n  function STRING_CASE_INSENSITIVE_ORDER$lambda(a, b) {\n    _init_properties_stringJs_kt__bg7zye();\n    return compareTo_0(a, b, true);\n  }\n  var properties_initialized_stringJs_kt_nta8o4;\n  function _init_properties_stringJs_kt__bg7zye() {\n    if (!properties_initialized_stringJs_kt_nta8o4) {\n      properties_initialized_stringJs_kt_nta8o4 = true;\n      var tmp = STRING_CASE_INSENSITIVE_ORDER$lambda;\n      STRING_CASE_INSENSITIVE_ORDER = new sam$kotlin_Comparator$0(tmp);\n    }\n  }\n  function get_REPLACEMENT_BYTE_SEQUENCE() {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    return REPLACEMENT_BYTE_SEQUENCE;\n  }\n  var REPLACEMENT_BYTE_SEQUENCE;\n  function encodeUtf8(string, startIndex, endIndex, throwOnMalformed) {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    // Inline function 'kotlin.require' call\n    // Inline function 'kotlin.require' call\n    if (!(startIndex >= 0 && endIndex <= string.length && startIndex <= endIndex)) {\n      var message = 'Failed requirement.';\n      throw IllegalArgumentException_init_$Create$_0(toString_1(message));\n    }\n    var bytes = new Int8Array(imul(endIndex - startIndex | 0, 3));\n    var byteIndex = 0;\n    var charIndex = startIndex;\n    while (charIndex < endIndex) {\n      var _unary__edvuaz = charIndex;\n      charIndex = _unary__edvuaz + 1 | 0;\n      // Inline function 'kotlin.code' call\n      var this_0 = charSequenceGet(string, _unary__edvuaz);\n      var code = Char__toInt_impl_vasixd(this_0);\n      if (code < 128) {\n        var _unary__edvuaz_0 = byteIndex;\n        byteIndex = _unary__edvuaz_0 + 1 | 0;\n        bytes[_unary__edvuaz_0] = toByte(code);\n      } else if (code < 2048) {\n        var _unary__edvuaz_1 = byteIndex;\n        byteIndex = _unary__edvuaz_1 + 1 | 0;\n        bytes[_unary__edvuaz_1] = toByte(code >> 6 | 192);\n        var _unary__edvuaz_2 = byteIndex;\n        byteIndex = _unary__edvuaz_2 + 1 | 0;\n        bytes[_unary__edvuaz_2] = toByte(code & 63 | 128);\n      } else if (code < 55296 || code >= 57344) {\n        var _unary__edvuaz_3 = byteIndex;\n        byteIndex = _unary__edvuaz_3 + 1 | 0;\n        bytes[_unary__edvuaz_3] = toByte(code >> 12 | 224);\n        var _unary__edvuaz_4 = byteIndex;\n        byteIndex = _unary__edvuaz_4 + 1 | 0;\n        bytes[_unary__edvuaz_4] = toByte(code >> 6 & 63 | 128);\n        var _unary__edvuaz_5 = byteIndex;\n        byteIndex = _unary__edvuaz_5 + 1 | 0;\n        bytes[_unary__edvuaz_5] = toByte(code & 63 | 128);\n      } else {\n        var codePoint = codePointFromSurrogate(string, code, charIndex, endIndex, throwOnMalformed);\n        if (codePoint <= 0) {\n          var _unary__edvuaz_6 = byteIndex;\n          byteIndex = _unary__edvuaz_6 + 1 | 0;\n          bytes[_unary__edvuaz_6] = get_REPLACEMENT_BYTE_SEQUENCE()[0];\n          var _unary__edvuaz_7 = byteIndex;\n          byteIndex = _unary__edvuaz_7 + 1 | 0;\n          bytes[_unary__edvuaz_7] = get_REPLACEMENT_BYTE_SEQUENCE()[1];\n          var _unary__edvuaz_8 = byteIndex;\n          byteIndex = _unary__edvuaz_8 + 1 | 0;\n          bytes[_unary__edvuaz_8] = get_REPLACEMENT_BYTE_SEQUENCE()[2];\n        } else {\n          var _unary__edvuaz_9 = byteIndex;\n          byteIndex = _unary__edvuaz_9 + 1 | 0;\n          bytes[_unary__edvuaz_9] = toByte(codePoint >> 18 | 240);\n          var _unary__edvuaz_10 = byteIndex;\n          byteIndex = _unary__edvuaz_10 + 1 | 0;\n          bytes[_unary__edvuaz_10] = toByte(codePoint >> 12 & 63 | 128);\n          var _unary__edvuaz_11 = byteIndex;\n          byteIndex = _unary__edvuaz_11 + 1 | 0;\n          bytes[_unary__edvuaz_11] = toByte(codePoint >> 6 & 63 | 128);\n          var _unary__edvuaz_12 = byteIndex;\n          byteIndex = _unary__edvuaz_12 + 1 | 0;\n          bytes[_unary__edvuaz_12] = toByte(codePoint & 63 | 128);\n          charIndex = charIndex + 1 | 0;\n        }\n      }\n    }\n    return bytes.length === byteIndex ? bytes : copyOf_0(bytes, byteIndex);\n  }\n  function codePointFromSurrogate(string, high, index, endIndex, throwOnMalformed) {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    if (!(55296 <= high ? high <= 56319 : false) || index >= endIndex) {\n      return malformed(0, index, throwOnMalformed);\n    }\n    // Inline function 'kotlin.code' call\n    var this_0 = charSequenceGet(string, index);\n    var low = Char__toInt_impl_vasixd(this_0);\n    if (!(56320 <= low ? low <= 57343 : false)) {\n      return malformed(0, index, throwOnMalformed);\n    }\n    return 65536 + ((high & 1023) << 10) | 0 | low & 1023;\n  }\n  function malformed(size, index, throwOnMalformed) {\n    _init_properties_utf8Encoding_kt__9thjs4();\n    if (throwOnMalformed)\n      throw new CharacterCodingException('Malformed sequence starting at ' + (index - 1 | 0));\n    return -size | 0;\n  }\n  var properties_initialized_utf8Encoding_kt_eee1vq;\n  function _init_properties_utf8Encoding_kt__9thjs4() {\n    if (!properties_initialized_utf8Encoding_kt_eee1vq) {\n      properties_initialized_utf8Encoding_kt_eee1vq = true;\n      // Inline function 'kotlin.byteArrayOf' call\n      REPLACEMENT_BYTE_SEQUENCE = new Int8Array([-17, -65, -67]);\n    }\n  }\n  function AbstractCollection$toString$lambda(this$0) {\n    return function (it) {\n      return it === this$0 ? '(this Collection)' : toString_0(it);\n    };\n  }\n  function AbstractCollection() {\n  }\n  protoOf(AbstractCollection).s = function (element) {\n    var tmp$ret$0;\n    $l$block_0: {\n      // Inline function 'kotlin.collections.any' call\n      var tmp;\n      if (isInterface(this, Collection)) {\n        tmp = this.k();\n      } else {\n        tmp = false;\n      }\n      if (tmp) {\n        tmp$ret$0 = false;\n        break $l$block_0;\n      }\n      var _iterator__ex2g4s = this.e();\n      while (_iterator__ex2g4s.f()) {\n        var element_0 = _iterator__ex2g4s.g();\n        if (equals(element_0, element)) {\n          tmp$ret$0 = true;\n          break $l$block_0;\n        }\n      }\n      tmp$ret$0 = false;\n    }\n    return tmp$ret$0;\n  };\n  protoOf(AbstractCollection).t = function (elements) {\n    var tmp$ret$0;\n    $l$block_0: {\n      // Inline function 'kotlin.collections.all' call\n      var tmp;\n      if (isInterface(elements, Collection)) {\n        tmp = elements.k();\n      } else {\n        tmp = false;\n      }\n      if (tmp) {\n        tmp$ret$0 = true;\n        break $l$block_0;\n      }\n      var _iterator__ex2g4s = elements.e();\n      while (_iterator__ex2g4s.f()) {\n        var element = _iterator__ex2g4s.g();\n        if (!this.s(element)) {\n          tmp$ret$0 = false;\n          break $l$block_0;\n        }\n      }\n      tmp$ret$0 = true;\n    }\n    return tmp$ret$0;\n  };\n  protoOf(AbstractCollection).k = function () {\n    return this.h() === 0;\n  };\n  protoOf(AbstractCollection).toString = function () {\n    return joinToString(this, ', ', '[', ']', VOID, VOID, AbstractCollection$toString$lambda(this));\n  };\n  protoOf(AbstractCollection).toArray = function () {\n    return collectionToArray(this);\n  };\n  function Companion_3() {\n    this.l2_1 = 2147483639;\n  }\n  protoOf(Companion_3).m2 = function (oldCapacity, minCapacity) {\n    var newCapacity = oldCapacity + (oldCapacity >> 1) | 0;\n    if ((newCapacity - minCapacity | 0) < 0)\n      newCapacity = minCapacity;\n    if ((newCapacity - 2147483639 | 0) > 0)\n      newCapacity = minCapacity > 2147483639 ? 2147483647 : 2147483639;\n    return newCapacity;\n  };\n  var Companion_instance_3;\n  function Companion_getInstance_3() {\n    return Companion_instance_3;\n  }\n  function Companion_4() {\n  }\n  protoOf(Companion_4).t1 = function (c) {\n    var hashCode_0 = 0;\n    var _iterator__ex2g4s = c.e();\n    while (_iterator__ex2g4s.f()) {\n      var element = _iterator__ex2g4s.g();\n      var tmp = hashCode_0;\n      var tmp1_elvis_lhs = element == null ? null : hashCode(element);\n      hashCode_0 = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;\n    }\n    return hashCode_0;\n  };\n  protoOf(Companion_4).s1 = function (c, other) {\n    if (!(c.h() === other.h()))\n      return false;\n    return c.t(other);\n  };\n  var Companion_instance_4;\n  function Companion_getInstance_4() {\n    return Companion_instance_4;\n  }\n  function collectionToArrayCommonImpl(collection) {\n    if (collection.k()) {\n      // Inline function 'kotlin.emptyArray' call\n      return [];\n    }\n    // Inline function 'kotlin.arrayOfNulls' call\n    var size = collection.h();\n    var destination = Array(size);\n    var iterator = collection.e();\n    var index = 0;\n    while (iterator.f()) {\n      var _unary__edvuaz = index;\n      index = _unary__edvuaz + 1 | 0;\n      destination[_unary__edvuaz] = iterator.g();\n    }\n    return destination;\n  }\n  function EmptyIterator() {\n  }\n  protoOf(EmptyIterator).f = function () {\n    return false;\n  };\n  protoOf(EmptyIterator).g = function () {\n    throw NoSuchElementException_init_$Create$();\n  };\n  var EmptyIterator_instance;\n  function EmptyIterator_getInstance() {\n    return EmptyIterator_instance;\n  }\n  function IntIterator() {\n  }\n  protoOf(IntIterator).g = function () {\n    return this.k5();\n  };\n  function emptySet() {\n    return EmptySet_getInstance();\n  }\n  function hashSetOf(elements) {\n    return toCollection(elements, HashSet_init_$Create$_0(mapCapacity(elements.length)));\n  }\n  function EmptySet() {\n    EmptySet_instance = this;\n    this.l5_1 = new Long(1993859828, 793161749);\n  }\n  protoOf(EmptySet).equals = function (other) {\n    var tmp;\n    if (!(other == null) ? isInterface(other, KtSet) : false) {\n      tmp = other.k();\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(EmptySet).hashCode = function () {\n    return 0;\n  };\n  protoOf(EmptySet).toString = function () {\n    return '[]';\n  };\n  protoOf(EmptySet).h = function () {\n    return 0;\n  };\n  protoOf(EmptySet).k = function () {\n    return true;\n  };\n  protoOf(EmptySet).m5 = function (elements) {\n    return elements.k();\n  };\n  protoOf(EmptySet).t = function (elements) {\n    return this.m5(elements);\n  };\n  protoOf(EmptySet).e = function () {\n    return EmptyIterator_instance;\n  };\n  var EmptySet_instance;\n  function EmptySet_getInstance() {\n    if (EmptySet_instance == null)\n      new EmptySet();\n    return EmptySet_instance;\n  }\n  function optimizeReadOnlySet(_this__u8e3s4) {\n    switch (_this__u8e3s4.h()) {\n      case 0:\n        return emptySet();\n      case 1:\n        return setOf(_this__u8e3s4.e().g());\n      default:\n        return _this__u8e3s4;\n    }\n  }\n  function getProgressionLastElement(start, end, step) {\n    var tmp;\n    if (step > 0) {\n      tmp = start >= end ? end : end - differenceModulo(end, start, step) | 0;\n    } else if (step < 0) {\n      tmp = start <= end ? end : end + differenceModulo(start, end, -step | 0) | 0;\n    } else {\n      throw IllegalArgumentException_init_$Create$_0('Step is zero.');\n    }\n    return tmp;\n  }\n  function differenceModulo(a, b, c) {\n    return mod(mod(a, c) - mod(b, c) | 0, c);\n  }\n  function mod(a, b) {\n    var mod = a % b | 0;\n    return mod >= 0 ? mod : mod + b | 0;\n  }\n  function Companion_5() {\n    Companion_instance_5 = this;\n    this.j_1 = new IntRange(1, 0);\n  }\n  var Companion_instance_5;\n  function Companion_getInstance_5() {\n    if (Companion_instance_5 == null)\n      new Companion_5();\n    return Companion_instance_5;\n  }\n  function IntRange(start, endInclusive) {\n    Companion_getInstance_5();\n    IntProgression.call(this, start, endInclusive, 1);\n  }\n  protoOf(IntRange).m = function () {\n    return this.n_1;\n  };\n  protoOf(IntRange).l = function () {\n    return this.o_1;\n  };\n  protoOf(IntRange).k = function () {\n    return this.n_1 > this.o_1;\n  };\n  protoOf(IntRange).equals = function (other) {\n    var tmp;\n    if (other instanceof IntRange) {\n      tmp = this.k() && other.k() || (this.n_1 === other.n_1 && this.o_1 === other.o_1);\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(IntRange).hashCode = function () {\n    return this.k() ? -1 : imul(31, this.n_1) + this.o_1 | 0;\n  };\n  protoOf(IntRange).toString = function () {\n    return '' + this.n_1 + '..' + this.o_1;\n  };\n  function IntProgressionIterator(first, last, step) {\n    IntIterator.call(this);\n    this.q5_1 = step;\n    this.r5_1 = last;\n    this.s5_1 = this.q5_1 > 0 ? first <= last : first >= last;\n    this.t5_1 = this.s5_1 ? first : this.r5_1;\n  }\n  protoOf(IntProgressionIterator).f = function () {\n    return this.s5_1;\n  };\n  protoOf(IntProgressionIterator).k5 = function () {\n    var value = this.t5_1;\n    if (value === this.r5_1) {\n      if (!this.s5_1)\n        throw NoSuchElementException_init_$Create$();\n      this.s5_1 = false;\n    } else {\n      this.t5_1 = this.t5_1 + this.q5_1 | 0;\n    }\n    return value;\n  };\n  function Companion_6() {\n  }\n  protoOf(Companion_6).q = function (rangeStart, rangeEnd, step) {\n    return new IntProgression(rangeStart, rangeEnd, step);\n  };\n  var Companion_instance_6;\n  function Companion_getInstance_6() {\n    return Companion_instance_6;\n  }\n  function IntProgression(start, endInclusive, step) {\n    if (step === 0)\n      throw IllegalArgumentException_init_$Create$_0('Step must be non-zero.');\n    if (step === -2147483648)\n      throw IllegalArgumentException_init_$Create$_0('Step must be greater than Int.MIN_VALUE to avoid overflow on negation.');\n    this.n_1 = start;\n    this.o_1 = getProgressionLastElement(start, endInclusive, step);\n    this.p_1 = step;\n  }\n  protoOf(IntProgression).e = function () {\n    return new IntProgressionIterator(this.n_1, this.o_1, this.p_1);\n  };\n  protoOf(IntProgression).k = function () {\n    return this.p_1 > 0 ? this.n_1 > this.o_1 : this.n_1 < this.o_1;\n  };\n  protoOf(IntProgression).equals = function (other) {\n    var tmp;\n    if (other instanceof IntProgression) {\n      tmp = this.k() && other.k() || (this.n_1 === other.n_1 && this.o_1 === other.o_1 && this.p_1 === other.p_1);\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  };\n  protoOf(IntProgression).hashCode = function () {\n    return this.k() ? -1 : imul(31, imul(31, this.n_1) + this.o_1 | 0) + this.p_1 | 0;\n  };\n  protoOf(IntProgression).toString = function () {\n    return this.p_1 > 0 ? '' + this.n_1 + '..' + this.o_1 + ' step ' + this.p_1 : '' + this.n_1 + ' downTo ' + this.o_1 + ' step ' + (-this.p_1 | 0);\n  };\n  function ClosedRange() {\n  }\n  function ClosedFloatingPointRange() {\n  }\n  function checkStepIsPositive(isPositive, step) {\n    if (!isPositive)\n      throw IllegalArgumentException_init_$Create$_0('Step must be positive, was: ' + toString_1(step) + '.');\n  }\n  function appendElement(_this__u8e3s4, element, transform) {\n    if (!(transform == null))\n      _this__u8e3s4.d(transform(element));\n    else {\n      if (element == null ? true : isCharSequence(element))\n        _this__u8e3s4.d(element);\n      else {\n        if (element instanceof Char)\n          _this__u8e3s4.m3(element.u5_1);\n        else {\n          _this__u8e3s4.d(toString_1(element));\n        }\n      }\n    }\n  }\n  function toIntOrNull(_this__u8e3s4, radix) {\n    checkRadix(radix);\n    var length = _this__u8e3s4.length;\n    if (length === 0)\n      return null;\n    var start;\n    var isNegative;\n    var limit;\n    var firstChar = charSequenceGet(_this__u8e3s4, 0);\n    if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n      if (length === 1)\n        return null;\n      start = 1;\n      if (firstChar === _Char___init__impl__6a9atx(45)) {\n        isNegative = true;\n        limit = -2147483648;\n      } else if (firstChar === _Char___init__impl__6a9atx(43)) {\n        isNegative = false;\n        limit = -2147483647;\n      } else\n        return null;\n    } else {\n      start = 0;\n      isNegative = false;\n      limit = -2147483647;\n    }\n    var limitForMaxRadix = -59652323;\n    var limitBeforeMul = limitForMaxRadix;\n    var result = 0;\n    var inductionVariable = start;\n    if (inductionVariable < length)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n        if (digit < 0)\n          return null;\n        if (result < limitBeforeMul) {\n          if (limitBeforeMul === limitForMaxRadix) {\n            limitBeforeMul = limit / radix | 0;\n            if (result < limitBeforeMul) {\n              return null;\n            }\n          } else {\n            return null;\n          }\n        }\n        result = imul(result, radix);\n        if (result < (limit + digit | 0))\n          return null;\n        result = result - digit | 0;\n      }\n       while (inductionVariable < length);\n    return isNegative ? result : -result | 0;\n  }\n  function numberFormatError(input) {\n    throw NumberFormatException_init_$Create$_0(\"Invalid number format: '\" + input + \"'\");\n  }\n  function toIntOrNull_0(_this__u8e3s4) {\n    return toIntOrNull(_this__u8e3s4, 10);\n  }\n  function substring(_this__u8e3s4, range) {\n    var tmp1 = range.m();\n    // Inline function 'kotlin.text.substring' call\n    var endIndex = range.l() + 1 | 0;\n    // Inline function 'kotlin.js.asDynamic' call\n    return _this__u8e3s4.substring(tmp1, endIndex);\n  }\n  function _UShort___init__impl__jigrne(data) {\n    return data;\n  }\n  function _UShort___get_data__impl__g0245($this) {\n    return $this;\n  }\n  function QRCode$Companion$EMPTY_FN$lambda(_this__u8e3s4, _unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {\n    return Unit_instance;\n  }\n  function Companion_7() {\n    Companion_instance_7 = this;\n    var tmp = this;\n    tmp.v5_1 = QRCode$Companion$EMPTY_FN$lambda;\n    this.DEFAULT_SQUARE_SIZE = 25;\n    this.DEFAULT_QRCODE_SIZE = 0;\n    this.DEFAULT_X_OFFSET = 0;\n    this.DEFAULT_Y_OFFSET = 0;\n  }\n  protoOf(Companion_7).w5 = function () {\n    return this.v5_1;\n  };\n  protoOf(Companion_7).x5 = function () {\n    return this.DEFAULT_SQUARE_SIZE;\n  };\n  protoOf(Companion_7).y5 = function () {\n    return this.DEFAULT_QRCODE_SIZE;\n  };\n  protoOf(Companion_7).z5 = function () {\n    return this.DEFAULT_X_OFFSET;\n  };\n  protoOf(Companion_7).a6 = function () {\n    return this.DEFAULT_Y_OFFSET;\n  };\n  protoOf(Companion_7).ofSquares = function () {\n    return new QRCodeBuilder(QRCodeShapesEnum_SQUARE_getInstance());\n  };\n  protoOf(Companion_7).ofCircles = function () {\n    return new QRCodeBuilder(QRCodeShapesEnum_CIRCLE_getInstance());\n  };\n  protoOf(Companion_7).ofRoundedSquares = function () {\n    return new QRCodeBuilder(QRCodeShapesEnum_ROUNDED_SQUARE_getInstance());\n  };\n  protoOf(Companion_7).ofCustomShape = function (customShapeFunction) {\n    return new QRCodeBuilder(QRCodeShapesEnum_CUSTOM_getInstance(), customShapeFunction);\n  };\n  var Companion_instance_7;\n  function Companion_getInstance_7() {\n    if (Companion_instance_7 == null)\n      new Companion_7();\n    return Companion_instance_7;\n  }\n  function draw($this, xOffset, yOffset, rawData, canvas) {\n    var tmp = $this.squareSize;\n    return $this.qrCodeProcessor.renderShaded(tmp, rawData, canvas, QRCode$draw$lambda($this, xOffset, yOffset, canvas));\n  }\n  function QRCode$draw$lambda(this$0, $xOffset, $yOffset, $canvas) {\n    return function (x, y, currentSquare, _unused_var__etf5q3) {\n      var tmp0_elvis_lhs = currentSquare.parent;\n      var actualSquare = tmp0_elvis_lhs == null ? currentSquare : tmp0_elvis_lhs;\n      var tmp;\n      if (!actualSquare.rendered) {\n        switch (currentSquare.squareInfo.type.y_1) {\n          case 0:\n          case 1:\n            this$0.shapeFn.renderControlSquare($xOffset, $yOffset, this$0.colorFn, actualSquare, $canvas, this$0);\n            break;\n          default:\n            this$0.shapeFn.renderSquare($xOffset + x | 0, $yOffset + y | 0, this$0.colorFn, currentSquare, $canvas, this$0);\n            break;\n        }\n        actualSquare.rendered = true;\n        tmp = Unit_instance;\n      }\n      return Unit_instance;\n    };\n  }\n  function QRCode(data, squareSize, canvasSize, xOffset, yOffset, colorFn, shapeFn, graphicsFactory, errorCorrectionLevel, informationDensity, maskPattern, doBefore, doAfter) {\n    Companion_getInstance_7();\n    squareSize = squareSize === VOID ? 25 : squareSize;\n    canvasSize = canvasSize === VOID ? 0 : canvasSize;\n    xOffset = xOffset === VOID ? 0 : xOffset;\n    yOffset = yOffset === VOID ? 0 : yOffset;\n    colorFn = colorFn === VOID ? new DefaultColorFunction() : colorFn;\n    shapeFn = shapeFn === VOID ? new DefaultShapeFunction(squareSize, 0) : shapeFn;\n    graphicsFactory = graphicsFactory === VOID ? new QRCodeGraphicsFactory() : graphicsFactory;\n    errorCorrectionLevel = errorCorrectionLevel === VOID ? ErrorCorrectionLevel_LOW_getInstance() : errorCorrectionLevel;\n    informationDensity = informationDensity === VOID ? Companion_instance_9.infoDensityForDataAndECL(data, errorCorrectionLevel) : informationDensity;\n    maskPattern = maskPattern === VOID ? MaskPattern_PATTERN000_getInstance() : maskPattern;\n    doBefore = doBefore === VOID ? Companion_getInstance_7().v5_1 : doBefore;\n    doAfter = doAfter === VOID ? Companion_getInstance_7().v5_1 : doAfter;\n    this.data = data;\n    this.xOffset = xOffset;\n    this.yOffset = yOffset;\n    this.colorFn = colorFn;\n    this.shapeFn = shapeFn;\n    this.graphicsFactory = graphicsFactory;\n    this.errorCorrectionLevel = errorCorrectionLevel;\n    this.informationDensity = informationDensity;\n    this.maskPattern = maskPattern;\n    this.b6_1 = doBefore;\n    this.c6_1 = doAfter;\n    this.squareSize = squareSize;\n    this.qrCodeProcessor = new QRCodeProcessor(this.data, this.errorCorrectionLevel, VOID, this.graphicsFactory);\n    this.rawData = this.qrCodeProcessor.encode(this.informationDensity, this.maskPattern);\n    this.canvasSize = canvasSize > 0 ? canvasSize : this.qrCodeProcessor.computeImageSizeFromRawData(squareSize, this.rawData);\n    this.graphics = this.graphicsFactory.newGraphicsSquare(this.canvasSize);\n  }\n  protoOf(QRCode).d6 = function () {\n    return this.data;\n  };\n  protoOf(QRCode).e6 = function () {\n    return this.xOffset;\n  };\n  protoOf(QRCode).f6 = function () {\n    return this.yOffset;\n  };\n  protoOf(QRCode).g6 = function () {\n    return this.colorFn;\n  };\n  protoOf(QRCode).h6 = function () {\n    return this.shapeFn;\n  };\n  protoOf(QRCode).i6 = function (_set____db54di) {\n    this.graphicsFactory = _set____db54di;\n  };\n  protoOf(QRCode).j6 = function () {\n    return this.graphicsFactory;\n  };\n  protoOf(QRCode).k6 = function () {\n    return this.errorCorrectionLevel;\n  };\n  protoOf(QRCode).l6 = function () {\n    return this.informationDensity;\n  };\n  protoOf(QRCode).m6 = function () {\n    return this.maskPattern;\n  };\n  protoOf(QRCode).n6 = function () {\n    return this.squareSize;\n  };\n  protoOf(QRCode).o6 = function () {\n    return this.qrCodeProcessor;\n  };\n  protoOf(QRCode).p6 = function () {\n    return this.informationDensity;\n  };\n  protoOf(QRCode).q6 = function () {\n    return this.rawData;\n  };\n  protoOf(QRCode).r6 = function () {\n    return this.canvasSize;\n  };\n  protoOf(QRCode).s6 = function () {\n    return this.canvasSize;\n  };\n  protoOf(QRCode).t6 = function () {\n    return this.graphics;\n  };\n  protoOf(QRCode).resize = function (size) {\n    this.canvasSize = size;\n    this.graphics = this.graphicsFactory.newGraphicsSquare(this.canvasSize);\n    return this;\n  };\n  protoOf(QRCode).fitIntoArea = function (width, height) {\n    // Inline function 'kotlin.math.min' call\n    var reference = Math.min(width, height);\n    var tmp = this;\n    // Inline function 'kotlin.math.floor' call\n    var x = reference / this.rawData.length;\n    var tmp$ret$1 = Math.floor(x);\n    tmp.squareSize = numberToInt(tmp$ret$1);\n    this.shapeFn.resize(this.squareSize);\n    this.canvasSize = reference;\n    this.graphics = this.graphicsFactory.newGraphicsSquare(this.canvasSize);\n    return this;\n  };\n  protoOf(QRCode).u6 = function (qrCodeGraphics, xOffset, yOffset) {\n    this.colorFn.beforeRender(this, qrCodeGraphics);\n    this.shapeFn.beforeRender(this, qrCodeGraphics);\n    this.graphics.fill(this.colorFn.bg(0, 0, this, this.graphics));\n    this.b6_1(this, qrCodeGraphics, xOffset, yOffset);\n    // Inline function 'kotlin.also' call\n    var this_0 = draw(this, xOffset, yOffset, this.rawData, qrCodeGraphics);\n    this.c6_1(this, this_0, xOffset, yOffset);\n    return this_0;\n  };\n  protoOf(QRCode).render = function (qrCodeGraphics, xOffset, yOffset, $super) {\n    qrCodeGraphics = qrCodeGraphics === VOID ? this.graphics : qrCodeGraphics;\n    xOffset = xOffset === VOID ? this.xOffset : xOffset;\n    yOffset = yOffset === VOID ? this.yOffset : yOffset;\n    return $super === VOID ? this.u6(qrCodeGraphics, xOffset, yOffset) : $super.u6.call(this, qrCodeGraphics, xOffset, yOffset);\n  };\n  protoOf(QRCode).v6 = function (qrCodeGraphics, xOffset, yOffset, format) {\n    return this.render(qrCodeGraphics, xOffset, yOffset).getBytesForFormat(format);\n  };\n  protoOf(QRCode).renderToBytes = function (qrCodeGraphics, xOffset, yOffset, format, $super) {\n    qrCodeGraphics = qrCodeGraphics === VOID ? this.graphics : qrCodeGraphics;\n    xOffset = xOffset === VOID ? this.xOffset : xOffset;\n    yOffset = yOffset === VOID ? this.yOffset : yOffset;\n    format = format === VOID ? 'PNG' : format;\n    return $super === VOID ? this.v6(qrCodeGraphics, xOffset, yOffset, format) : $super.v6.call(this, qrCodeGraphics, xOffset, yOffset, format);\n  };\n  protoOf(QRCode).reset = function () {\n    // Inline function 'kotlin.collections.forEach' call\n    var indexedObject = this.rawData;\n    var inductionVariable = 0;\n    var last = indexedObject.length;\n    while (inductionVariable < last) {\n      var element = indexedObject[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      // Inline function 'kotlin.collections.forEach' call\n      var inductionVariable_0 = 0;\n      var last_0 = element.length;\n      while (inductionVariable_0 < last_0) {\n        var element_0 = element[inductionVariable_0];\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        element_0.rendered = false;\n        var tmp0_safe_receiver = element_0.parent;\n        if (tmp0_safe_receiver == null)\n          null;\n        else {\n          tmp0_safe_receiver.rendered = false;\n        }\n      }\n    }\n    this.graphics.reset();\n  };\n  protoOf(QRCode).toString = function () {\n    return 'QRCode(data=' + this.data + ', squareSize=' + this.squareSize + ', canvasSize=' + this.canvasSize + ', xOffset=' + this.xOffset + ', yOffset=' + this.yOffset + (', errorCorrectionLevel=' + this.errorCorrectionLevel.toString() + ', informationDensity=' + this.informationDensity) + (', maskPattern=' + this.maskPattern.toString() + ')');\n  };\n  function innerSpace($this) {\n    var tmp;\n    switch ($this.w6_1.y_1) {\n      case 0:\n        tmp = 1;\n        break;\n      case 1:\n        tmp = Companion_instance_10.defaultInnerSpace($this.z6_1);\n        break;\n      case 2:\n        tmp = Companion_instance_11.defaultInnerSpace($this.z6_1);\n        break;\n      case 3:\n        tmp = 0;\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    // Inline function 'kotlin.takeIf' call\n    var this_0 = tmp;\n    var tmp_0;\n    if (this_0 < $this.z6_1) {\n      tmp_0 = this_0;\n    } else {\n      tmp_0 = null;\n    }\n    var tmp1_elvis_lhs = tmp_0;\n    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n  }\n  function _get_beforeFn__5052ik($this) {\n    return QRCodeBuilder$_get_beforeFn_$lambda_n0dxjk($this);\n  }\n  function _get_afterFn__jaczeb($this) {\n    return QRCodeBuilder$_get_afterFn_$lambda_eq0wxh($this);\n  }\n  function _get_colorFunction__6g154a($this) {\n    var tmp;\n    if ($this.b7_1 == null) {\n      var tmp1_elvis_lhs = $this.y6_1;\n      tmp = tmp1_elvis_lhs == null ? new DefaultColorFunction($this.a7_1, $this.d7_1) : tmp1_elvis_lhs;\n    } else {\n      var tmp2_elvis_lhs = $this.y6_1;\n      tmp = tmp2_elvis_lhs == null ? new LinearGradientColorFunction($this.a7_1, ensureNotNull($this.b7_1), $this.d7_1) : tmp2_elvis_lhs;\n    }\n    return tmp;\n  }\n  function QRCodeBuilder$withLogo$lambda($width, $height) {\n    return function (_this__u8e3s4, _unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {\n      var logoX = (_this__u8e3s4.canvasSize - $width | 0) / 2 | 0;\n      var logoY = (_this__u8e3s4.canvasSize - $height | 0) / 2 | 0;\n      // Inline function 'kotlin.collections.forEach' call\n      var indexedObject = _this__u8e3s4.rawData;\n      var inductionVariable = 0;\n      var last = indexedObject.length;\n      while (inductionVariable < last) {\n        var element = indexedObject[inductionVariable];\n        inductionVariable = inductionVariable + 1 | 0;\n        // Inline function 'kotlin.collections.forEach' call\n        var inductionVariable_0 = 0;\n        var last_0 = element.length;\n        while (inductionVariable_0 < last_0) {\n          var element_0 = element[inductionVariable_0];\n          inductionVariable_0 = inductionVariable_0 + 1 | 0;\n          var cellX = element_0.absoluteX(_this__u8e3s4.squareSize);\n          var cellY = element_0.absoluteY(_this__u8e3s4.squareSize);\n          element_0.rendered = !QRMath_getInstance().u7(logoX, logoY, $width, $height, cellX, cellY, _this__u8e3s4.squareSize, _this__u8e3s4.squareSize);\n        }\n      }\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$withLogo$lambda_0($width, $height, $logo) {\n    return function (_this__u8e3s4, canvas, xOffset, yOffset) {\n      var logoX = xOffset + ((_this__u8e3s4.canvasSize - $width | 0) / 2 | 0) | 0;\n      var logoY = yOffset + ((_this__u8e3s4.canvasSize - $height | 0) / 2 | 0) | 0;\n      canvas.drawImageFromBytes($logo, logoX, logoY);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$withAfterRenderAction$lambda($action) {\n    return function (_this__u8e3s4, it, _unused_var__etf5q3, _unused_var__etf5q3_0) {\n      $action(_this__u8e3s4, it);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$withBeforeRenderAction$lambda($action) {\n    return function (_this__u8e3s4, it, _unused_var__etf5q3, _unused_var__etf5q3_0) {\n      $action(_this__u8e3s4, it);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$_get_beforeFn_$lambda_n0dxjk(this$0) {\n    return function (_this__u8e3s4, canvas, xOffset, yOffset) {\n      this$0.h7_1(_this__u8e3s4, canvas, xOffset, yOffset);\n      this$0.j7_1(_this__u8e3s4, canvas, xOffset, yOffset);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder$_get_afterFn_$lambda_eq0wxh(this$0) {\n    return function (_this__u8e3s4, canvas, xOffset, yOffset) {\n      this$0.g7_1(_this__u8e3s4, canvas, xOffset, yOffset);\n      this$0.i7_1(_this__u8e3s4, canvas, xOffset, yOffset);\n      return Unit_instance;\n    };\n  }\n  function QRCodeBuilder(shape, customShapeFunction) {\n    customShapeFunction = customShapeFunction === VOID ? null : customShapeFunction;\n    this.w6_1 = shape;\n    this.x6_1 = customShapeFunction;\n    this.y6_1 = null;\n    this.z6_1 = 25;\n    this.a7_1 = -16777216;\n    this.b7_1 = null;\n    this.c7_1 = true;\n    this.d7_1 = 0;\n    this.e7_1 = innerSpace(this);\n    this.f7_1 = Companion_instance_11.defaultRadius(this.z6_1);\n    this.g7_1 = Companion_getInstance_7().v5_1;\n    this.h7_1 = Companion_getInstance_7().v5_1;\n    this.i7_1 = Companion_getInstance_7().v5_1;\n    this.j7_1 = Companion_getInstance_7().v5_1;\n    this.k7_1 = new QRCodeGraphicsFactory();\n    this.l7_1 = ErrorCorrectionLevel_LOW_getInstance();\n    this.m7_1 = 0;\n    this.n7_1 = MaskPattern_PATTERN000_getInstance();\n    this.o7_1 = 0;\n    this.p7_1 = 0;\n    this.q7_1 = 0;\n    this.r7_1 = 0;\n  }\n  protoOf(QRCodeBuilder).withShape = function (shape) {\n    this.w6_1 = shape;\n    return this.withInnerSpacing(innerSpace(this));\n  };\n  protoOf(QRCodeBuilder).withSize = function (size) {\n    this.z6_1 = coerceAtLeast(size, 1);\n    return this.withInnerSpacing(innerSpace(this));\n  };\n  protoOf(QRCodeBuilder).withColor = function (color) {\n    this.a7_1 = color;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withBackgroundColor = function (bgColor) {\n    this.d7_1 = bgColor;\n    return this;\n  };\n  protoOf(QRCodeBuilder).v7 = function (startColor, endColor, vertical) {\n    this.a7_1 = startColor;\n    this.b7_1 = endColor;\n    this.c7_1 = vertical;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withGradientColor = function (startColor, endColor, vertical, $super) {\n    vertical = vertical === VOID ? true : vertical;\n    return $super === VOID ? this.v7(startColor, endColor, vertical) : $super.v7.call(this, startColor, endColor, vertical);\n  };\n  protoOf(QRCodeBuilder).withRadius = function (radius) {\n    var tmp = this;\n    // Inline function 'kotlin.takeIf' call\n    var tmp_0;\n    if (radius >= 0) {\n      tmp_0 = radius;\n    } else {\n      tmp_0 = null;\n    }\n    var tmp0_elvis_lhs = tmp_0;\n    tmp.f7_1 = tmp0_elvis_lhs == null ? Companion_instance_11.defaultRadius(this.z6_1) : tmp0_elvis_lhs;\n    return this;\n  };\n  protoOf(QRCodeBuilder).w7 = function (innerSpacing) {\n    var tmp = this;\n    var tmp_0;\n    if (innerSpacing == null) {\n      tmp_0 = null;\n    } else {\n      // Inline function 'kotlin.takeIf' call\n      var tmp_1;\n      if (innerSpacing >= 0) {\n        tmp_1 = innerSpacing;\n      } else {\n        tmp_1 = null;\n      }\n      tmp_0 = tmp_1;\n    }\n    var tmp1_elvis_lhs = tmp_0;\n    tmp.e7_1 = tmp1_elvis_lhs == null ? innerSpace(this) : tmp1_elvis_lhs;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withInnerSpacing = function (innerSpacing, $super) {\n    innerSpacing = innerSpacing === VOID ? null : innerSpacing;\n    return $super === VOID ? this.w7(innerSpacing) : $super.w7.call(this, innerSpacing);\n  };\n  protoOf(QRCodeBuilder).x7 = function (logo, width, height, clearLogoArea) {\n    if (!(logo == null)) {\n      if (clearLogoArea) {\n        var tmp = this;\n        tmp.h7_1 = QRCodeBuilder$withLogo$lambda(width, height);\n      } else {\n        this.h7_1 = Companion_getInstance_7().v5_1;\n      }\n      var tmp_0 = this;\n      tmp_0.g7_1 = QRCodeBuilder$withLogo$lambda_0(width, height, logo);\n    }\n    return this;\n  };\n  protoOf(QRCodeBuilder).withLogo = function (logo, width, height, clearLogoArea, $super) {\n    clearLogoArea = clearLogoArea === VOID ? true : clearLogoArea;\n    return $super === VOID ? this.x7(logo, width, height, clearLogoArea) : $super.x7.call(this, logo, width, height, clearLogoArea);\n  };\n  protoOf(QRCodeBuilder).withAfterRenderAction = function (action) {\n    var tmp = this;\n    tmp.i7_1 = QRCodeBuilder$withAfterRenderAction$lambda(action);\n    return this;\n  };\n  protoOf(QRCodeBuilder).withBeforeRenderAction = function (action) {\n    var tmp = this;\n    tmp.j7_1 = QRCodeBuilder$withBeforeRenderAction$lambda(action);\n    return this;\n  };\n  protoOf(QRCodeBuilder).withGraphicsFactory = function (factory) {\n    this.k7_1 = factory;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withCustomColorFunction = function (colorFn) {\n    this.y6_1 = colorFn;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withCustomShapeFunction = function (shapeFn) {\n    this.x6_1 = shapeFn;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withErrorCorrectionLevel = function (ecl) {\n    this.l7_1 = ecl;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withInformationDensity = function (informationDensity) {\n    this.m7_1 = coerceIn(informationDensity, numberRangeToNumber(0, 40));\n    return this;\n  };\n  protoOf(QRCodeBuilder).withMaskPattern = function (maskPattern) {\n    this.n7_1 = maskPattern;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withCanvasSize = function (size) {\n    this.o7_1 = size;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withXOffset = function (xOffset) {\n    this.p7_1 = xOffset;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withYOffset = function (yOffset) {\n    this.q7_1 = yOffset;\n    return this;\n  };\n  protoOf(QRCodeBuilder).withMargin = function (margin) {\n    this.r7_1 = margin;\n    return this;\n  };\n  protoOf(QRCodeBuilder).build = function (data) {\n    var tmp = this.z6_1;\n    var tmp_0 = this.o7_1;\n    var tmp_1 = this.p7_1 + this.r7_1 | 0;\n    var tmp_2 = this.q7_1 + this.r7_1 | 0;\n    var tmp_3 = _get_colorFunction__6g154a(this);\n    var tmp0_elvis_lhs = this.x6_1;\n    var tmp_4;\n    if (tmp0_elvis_lhs == null) {\n      var tmp_5;\n      switch (this.w6_1.y_1) {\n        case 0:\n        case 3:\n          tmp_5 = new DefaultShapeFunction(this.z6_1, this.e7_1);\n          break;\n        case 1:\n          tmp_5 = new CircleShapeFunction(this.z6_1, this.e7_1);\n          break;\n        case 2:\n          tmp_5 = new RoundSquaresShapeFunction(this.z6_1, this.f7_1, this.e7_1);\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp_4 = tmp_5;\n    } else {\n      tmp_4 = tmp0_elvis_lhs;\n    }\n    var tmp_6 = tmp_4;\n    var tmp_7 = this.k7_1;\n    var tmp_8 = this.l7_1;\n    var tmp2_subject = this.m7_1;\n    // Inline function 'kotlin.apply' call\n    var this_0 = new QRCode(data, tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_6, tmp_7, tmp_8, tmp2_subject === 0 ? Companion_instance_9.infoDensityForDataAndECL(data, this.l7_1) : this.m7_1, this.n7_1, _get_beforeFn__5052ik(this), _get_afterFn__jaczeb(this));\n    if (this.r7_1 > 0) {\n      this_0.resize(this_0.canvasSize + imul(this.r7_1, 2) | 0);\n    }\n    return this_0;\n  };\n  var QRCodeShapesEnum_SQUARE_instance;\n  var QRCodeShapesEnum_CIRCLE_instance;\n  var QRCodeShapesEnum_ROUNDED_SQUARE_instance;\n  var QRCodeShapesEnum_CUSTOM_instance;\n  var QRCodeShapesEnum_entriesInitialized;\n  function QRCodeShapesEnum_initEntries() {\n    if (QRCodeShapesEnum_entriesInitialized)\n      return Unit_instance;\n    QRCodeShapesEnum_entriesInitialized = true;\n    QRCodeShapesEnum_SQUARE_instance = new QRCodeShapesEnum('SQUARE', 0);\n    QRCodeShapesEnum_CIRCLE_instance = new QRCodeShapesEnum('CIRCLE', 1);\n    QRCodeShapesEnum_ROUNDED_SQUARE_instance = new QRCodeShapesEnum('ROUNDED_SQUARE', 2);\n    QRCodeShapesEnum_CUSTOM_instance = new QRCodeShapesEnum('CUSTOM', 3);\n  }\n  function QRCodeShapesEnum(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  function QRCodeShapesEnum_SQUARE_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_SQUARE_instance;\n  }\n  function QRCodeShapesEnum_CIRCLE_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_CIRCLE_instance;\n  }\n  function QRCodeShapesEnum_ROUNDED_SQUARE_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_ROUNDED_SQUARE_instance;\n  }\n  function QRCodeShapesEnum_CUSTOM_getInstance() {\n    QRCodeShapesEnum_initEntries();\n    return QRCodeShapesEnum_CUSTOM_instance;\n  }\n  function Colors() {\n    this.TRANSPARENT = 0;\n    this.ALICE_BLUE = -984833;\n    this.ANTIQUE_WHITE = -332841;\n    this.AQUA = -16711681;\n    this.AQUAMARINE = -8388652;\n    this.AZURE = -983041;\n    this.BEIGE = -657956;\n    this.BISQUE = -6972;\n    this.BLACK = -16777216;\n    this.BLANCHED_ALMOND = -5171;\n    this.BLUE = -16776961;\n    this.BLUE_VIOLET = -7722014;\n    this.BROWN = -5952982;\n    this.BURLY_WOOD = -2180985;\n    this.CADET_BLUE = -10510688;\n    this.CHARTREUSE = -8388864;\n    this.CHOCOLATE = -2987746;\n    this.CORAL = -32944;\n    this.CORNFLOWER_BLUE = -10185235;\n    this.CORNSILK = -1828;\n    this.CRIMSON = -2354116;\n    this.CYAN = -16711681;\n    this.DARK_BLUE = -16777077;\n    this.DARK_CYAN = -16741493;\n    this.DARK_GOLDEN_ROD = -4684277;\n    this.DARK_GRAY = -5658199;\n    this.DARK_GREY = -5658199;\n    this.DARK_GREEN = -16751616;\n    this.DARK_KHAKI = -4343957;\n    this.DARK_MAGENTA = -7667573;\n    this.DARK_OLIVE_GREEN = -11179217;\n    this.DARK_ORANGE = -29696;\n    this.DARK_ORCHID = -6737204;\n    this.DARK_RED = -7667712;\n    this.DARK_SALMON = -1468806;\n    this.DARK_SEA_GREEN = -7357297;\n    this.DARK_SLATE_BLUE = -12042869;\n    this.DARK_SLATE_GRAY = -13676721;\n    this.DARK_SLATE_GREY = -13676721;\n    this.DARK_TURQUOISE = -16724271;\n    this.DARK_VIOLET = -7077677;\n    this.DEEP_PINK = -60269;\n    this.DEEP_SKY_BLUE = -16728065;\n    this.DIM_GRAY = -9868951;\n    this.DIM_GREY = -9868951;\n    this.DODGER_BLUE = -14774017;\n    this.FIRE_BRICK = -5103070;\n    this.FLORAL_WHITE = -1296;\n    this.FOREST_GREEN = -14513374;\n    this.FUCHSIA = -65281;\n    this.GAINSBORO = -2302756;\n    this.GHOST_WHITE = -460545;\n    this.GOLD = -10496;\n    this.GOLDEN_ROD = -2448096;\n    this.GRAY = -8355712;\n    this.GREY = -8355712;\n    this.GREEN = -16744448;\n    this.GREEN_YELLOW = -5374161;\n    this.HONEY_DEW = -983056;\n    this.HOT_PINK = -38476;\n    this.INDIAN_RED = -3318692;\n    this.INDIGO = -11861886;\n    this.IVORY = -16;\n    this.KHAKI = -989556;\n    this.LAVENDER = -1644806;\n    this.LAVENDER_BLUSH = -3851;\n    this.LAWN_GREEN = -8586240;\n    this.LEMON_CHIFFON = -1331;\n    this.LIGHT_BLUE = -5383962;\n    this.LIGHT_CORAL = -1015680;\n    this.LIGHT_CYAN = -2031617;\n    this.LIGHT_GOLDEN_ROD_YELLOW = -329006;\n    this.LIGHT_GRAY = -2894893;\n    this.LIGHT_GREY = -2894893;\n    this.LIGHT_GREEN = -7278960;\n    this.LIGHT_PINK = -18751;\n    this.LIGHT_SALMON = -24454;\n    this.LIGHT_SEA_GREEN = -14634326;\n    this.LIGHT_SKY_BLUE = -7876870;\n    this.LIGHT_SLATE_GRAY = -8943463;\n    this.LIGHT_SLATE_GREY = -8943463;\n    this.LIGHT_STEEL_BLUE = -5192482;\n    this.LIGHT_YELLOW = -32;\n    this.LIME = -16711936;\n    this.LIME_GREEN = -13447886;\n    this.LINEN = -331546;\n    this.MAGENTA = -65281;\n    this.MAROON = -8388608;\n    this.MEDIUM_AQUA_MARINE = -10039894;\n    this.MEDIUM_BLUE = -16777011;\n    this.MEDIUM_ORCHID = -4565549;\n    this.MEDIUM_PURPLE = -7114533;\n    this.MEDIUM_SEA_GREEN = -12799119;\n    this.MEDIUM_SLATE_BLUE = -8689426;\n    this.MEDIUM_SPRING_GREEN = -16713062;\n    this.MEDIUM_TURQUOISE = -12004916;\n    this.MEDIUM_VIOLET_RED = -3730043;\n    this.MIDNIGHT_BLUE = -15132304;\n    this.MINT_CREAM = -655366;\n    this.MISTY_ROSE = -6943;\n    this.MOCCASIN = -6987;\n    this.NAVAJO_WHITE = -8531;\n    this.NAVY = -16777088;\n    this.OLD_LACE = -133658;\n    this.OLIVE = -8355840;\n    this.OLIVE_DRAB = -9728477;\n    this.ORANGE = -23296;\n    this.ORANGE_RED = -47872;\n    this.ORCHID = -2461482;\n    this.PALE_GOLDEN_ROD = -1120086;\n    this.PALE_GREEN = -6751336;\n    this.PALE_TURQUOISE = -5247250;\n    this.PALE_VIOLET_RED = -2396013;\n    this.PAPAYA_WHIP = -4139;\n    this.PEACH_PUFF = -9543;\n    this.PERU = -3308225;\n    this.PINK = -16181;\n    this.PLUM = -2252579;\n    this.POWDER_BLUE = -5185306;\n    this.PURPLE = -8388480;\n    this.REBECCA_PURPLE = -10079335;\n    this.RED = -65536;\n    this.ROSY_BROWN = -4419697;\n    this.ROYAL_BLUE = -12490271;\n    this.SADDLE_BROWN = -7650029;\n    this.SALMON = -360334;\n    this.SANDY_BROWN = -744352;\n    this.SEA_GREEN = -13726889;\n    this.SEA_SHELL = -2578;\n    this.SIENNA = -6270419;\n    this.SILVER = -4144960;\n    this.SKY_BLUE = -7876885;\n    this.SLATE_BLUE = -9807155;\n    this.SLATE_GRAY = -9404272;\n    this.SLATE_GREY = -9404272;\n    this.SNOW = -1286;\n    this.SPRING_GREEN = -16711809;\n    this.STEEL_BLUE = -12156236;\n    this.TAN = -2968436;\n    this.TEAL = -16744320;\n    this.THISTLE = -2572328;\n    this.TOMATO = -40121;\n    this.TURQUOISE = -12525360;\n    this.VIOLET = -1146130;\n    this.WHEAT = -663885;\n    this.WHITE = -1;\n    this.WHITE_SMOKE = -657931;\n    this.YELLOW = -256;\n    this.YELLOW_GREEN = -6632142;\n  }\n  protoOf(Colors).css = function (str) {\n    return toInt(substring(str, numberRangeToNumber(1, 6)), 16) | -16777216;\n  };\n  protoOf(Colors).y7 = function (r, g, b, a) {\n    return (coerceIn(a, numberRangeToNumber(0, 255)) & 255) << 24 | (coerceIn(r, numberRangeToNumber(0, 255)) & 255) << 16 | (coerceIn(g, numberRangeToNumber(0, 255)) & 255) << 8 | (coerceIn(b, numberRangeToNumber(0, 255)) & 255) << 0;\n  };\n  protoOf(Colors).rgba = function (r, g, b, a, $super) {\n    a = a === VOID ? 255 : a;\n    return $super === VOID ? this.y7(r, g, b, a) : $super.y7.call(this, r, g, b, a);\n  };\n  protoOf(Colors).getRGBA = function (color) {\n    // Inline function 'kotlin.intArrayOf' call\n    return new Int32Array([color >> 16 & 255, color >> 8 & 255, color >> 0 & 255, color >> 24 & 255]);\n  };\n  protoOf(Colors).z7 = function (color, maxValue) {\n    // Inline function 'kotlin.doubleArrayOf' call\n    return new Float64Array([(color >> 16 & 255) / maxValue, (color >> 8 & 255) / maxValue, (color >> 0 & 255) / maxValue, (color >> 24 & 255) / maxValue]);\n  };\n  protoOf(Colors).getRGBAPercentages = function (color, maxValue, $super) {\n    maxValue = maxValue === VOID ? 255.0 : maxValue;\n    return $super === VOID ? this.z7(color, maxValue) : $super.z7.call(this, color, maxValue);\n  };\n  protoOf(Colors).withAlpha = function (color, alpha) {\n    return (coerceIn(alpha, numberRangeToNumber(0, 255)) << 24) + (color & 16777215) | 0;\n  };\n  protoOf(Colors).a8 = function () {\n    return this.TRANSPARENT;\n  };\n  protoOf(Colors).b8 = function () {\n    return this.ALICE_BLUE;\n  };\n  protoOf(Colors).c8 = function () {\n    return this.ANTIQUE_WHITE;\n  };\n  protoOf(Colors).d8 = function () {\n    return this.AQUA;\n  };\n  protoOf(Colors).e8 = function () {\n    return this.AQUAMARINE;\n  };\n  protoOf(Colors).f8 = function () {\n    return this.AZURE;\n  };\n  protoOf(Colors).g8 = function () {\n    return this.BEIGE;\n  };\n  protoOf(Colors).h8 = function () {\n    return this.BISQUE;\n  };\n  protoOf(Colors).i8 = function () {\n    return this.BLACK;\n  };\n  protoOf(Colors).j8 = function () {\n    return this.BLANCHED_ALMOND;\n  };\n  protoOf(Colors).k8 = function () {\n    return this.BLUE;\n  };\n  protoOf(Colors).l8 = function () {\n    return this.BLUE_VIOLET;\n  };\n  protoOf(Colors).m8 = function () {\n    return this.BROWN;\n  };\n  protoOf(Colors).n8 = function () {\n    return this.BURLY_WOOD;\n  };\n  protoOf(Colors).o8 = function () {\n    return this.CADET_BLUE;\n  };\n  protoOf(Colors).p8 = function () {\n    return this.CHARTREUSE;\n  };\n  protoOf(Colors).q8 = function () {\n    return this.CHOCOLATE;\n  };\n  protoOf(Colors).r8 = function () {\n    return this.CORAL;\n  };\n  protoOf(Colors).s8 = function () {\n    return this.CORNFLOWER_BLUE;\n  };\n  protoOf(Colors).t8 = function () {\n    return this.CORNSILK;\n  };\n  protoOf(Colors).u8 = function () {\n    return this.CRIMSON;\n  };\n  protoOf(Colors).v8 = function () {\n    return this.CYAN;\n  };\n  protoOf(Colors).w8 = function () {\n    return this.DARK_BLUE;\n  };\n  protoOf(Colors).x8 = function () {\n    return this.DARK_CYAN;\n  };\n  protoOf(Colors).y8 = function () {\n    return this.DARK_GOLDEN_ROD;\n  };\n  protoOf(Colors).z8 = function () {\n    return this.DARK_GRAY;\n  };\n  protoOf(Colors).a9 = function () {\n    return this.DARK_GREY;\n  };\n  protoOf(Colors).b9 = function () {\n    return this.DARK_GREEN;\n  };\n  protoOf(Colors).c9 = function () {\n    return this.DARK_KHAKI;\n  };\n  protoOf(Colors).d9 = function () {\n    return this.DARK_MAGENTA;\n  };\n  protoOf(Colors).e9 = function () {\n    return this.DARK_OLIVE_GREEN;\n  };\n  protoOf(Colors).f9 = function () {\n    return this.DARK_ORANGE;\n  };\n  protoOf(Colors).g9 = function () {\n    return this.DARK_ORCHID;\n  };\n  protoOf(Colors).h9 = function () {\n    return this.DARK_RED;\n  };\n  protoOf(Colors).i9 = function () {\n    return this.DARK_SALMON;\n  };\n  protoOf(Colors).j9 = function () {\n    return this.DARK_SEA_GREEN;\n  };\n  protoOf(Colors).k9 = function () {\n    return this.DARK_SLATE_BLUE;\n  };\n  protoOf(Colors).l9 = function () {\n    return this.DARK_SLATE_GRAY;\n  };\n  protoOf(Colors).m9 = function () {\n    return this.DARK_SLATE_GREY;\n  };\n  protoOf(Colors).n9 = function () {\n    return this.DARK_TURQUOISE;\n  };\n  protoOf(Colors).o9 = function () {\n    return this.DARK_VIOLET;\n  };\n  protoOf(Colors).p9 = function () {\n    return this.DEEP_PINK;\n  };\n  protoOf(Colors).q9 = function () {\n    return this.DEEP_SKY_BLUE;\n  };\n  protoOf(Colors).r9 = function () {\n    return this.DIM_GRAY;\n  };\n  protoOf(Colors).s9 = function () {\n    return this.DIM_GREY;\n  };\n  protoOf(Colors).t9 = function () {\n    return this.DODGER_BLUE;\n  };\n  protoOf(Colors).u9 = function () {\n    return this.FIRE_BRICK;\n  };\n  protoOf(Colors).v9 = function () {\n    return this.FLORAL_WHITE;\n  };\n  protoOf(Colors).w9 = function () {\n    return this.FOREST_GREEN;\n  };\n  protoOf(Colors).x9 = function () {\n    return this.FUCHSIA;\n  };\n  protoOf(Colors).y9 = function () {\n    return this.GAINSBORO;\n  };\n  protoOf(Colors).z9 = function () {\n    return this.GHOST_WHITE;\n  };\n  protoOf(Colors).aa = function () {\n    return this.GOLD;\n  };\n  protoOf(Colors).ba = function () {\n    return this.GOLDEN_ROD;\n  };\n  protoOf(Colors).ca = function () {\n    return this.GRAY;\n  };\n  protoOf(Colors).da = function () {\n    return this.GREY;\n  };\n  protoOf(Colors).ea = function () {\n    return this.GREEN;\n  };\n  protoOf(Colors).fa = function () {\n    return this.GREEN_YELLOW;\n  };\n  protoOf(Colors).ga = function () {\n    return this.HONEY_DEW;\n  };\n  protoOf(Colors).ha = function () {\n    return this.HOT_PINK;\n  };\n  protoOf(Colors).ia = function () {\n    return this.INDIAN_RED;\n  };\n  protoOf(Colors).ja = function () {\n    return this.INDIGO;\n  };\n  protoOf(Colors).ka = function () {\n    return this.IVORY;\n  };\n  protoOf(Colors).la = function () {\n    return this.KHAKI;\n  };\n  protoOf(Colors).ma = function () {\n    return this.LAVENDER;\n  };\n  protoOf(Colors).na = function () {\n    return this.LAVENDER_BLUSH;\n  };\n  protoOf(Colors).oa = function () {\n    return this.LAWN_GREEN;\n  };\n  protoOf(Colors).pa = function () {\n    return this.LEMON_CHIFFON;\n  };\n  protoOf(Colors).qa = function () {\n    return this.LIGHT_BLUE;\n  };\n  protoOf(Colors).ra = function () {\n    return this.LIGHT_CORAL;\n  };\n  protoOf(Colors).sa = function () {\n    return this.LIGHT_CYAN;\n  };\n  protoOf(Colors).ta = function () {\n    return this.LIGHT_GOLDEN_ROD_YELLOW;\n  };\n  protoOf(Colors).ua = function () {\n    return this.LIGHT_GRAY;\n  };\n  protoOf(Colors).va = function () {\n    return this.LIGHT_GREY;\n  };\n  protoOf(Colors).wa = function () {\n    return this.LIGHT_GREEN;\n  };\n  protoOf(Colors).xa = function () {\n    return this.LIGHT_PINK;\n  };\n  protoOf(Colors).ya = function () {\n    return this.LIGHT_SALMON;\n  };\n  protoOf(Colors).za = function () {\n    return this.LIGHT_SEA_GREEN;\n  };\n  protoOf(Colors).ab = function () {\n    return this.LIGHT_SKY_BLUE;\n  };\n  protoOf(Colors).bb = function () {\n    return this.LIGHT_SLATE_GRAY;\n  };\n  protoOf(Colors).cb = function () {\n    return this.LIGHT_SLATE_GREY;\n  };\n  protoOf(Colors).db = function () {\n    return this.LIGHT_STEEL_BLUE;\n  };\n  protoOf(Colors).eb = function () {\n    return this.LIGHT_YELLOW;\n  };\n  protoOf(Colors).fb = function () {\n    return this.LIME;\n  };\n  protoOf(Colors).gb = function () {\n    return this.LIME_GREEN;\n  };\n  protoOf(Colors).hb = function () {\n    return this.LINEN;\n  };\n  protoOf(Colors).ib = function () {\n    return this.MAGENTA;\n  };\n  protoOf(Colors).jb = function () {\n    return this.MAROON;\n  };\n  protoOf(Colors).kb = function () {\n    return this.MEDIUM_AQUA_MARINE;\n  };\n  protoOf(Colors).lb = function () {\n    return this.MEDIUM_BLUE;\n  };\n  protoOf(Colors).mb = function () {\n    return this.MEDIUM_ORCHID;\n  };\n  protoOf(Colors).nb = function () {\n    return this.MEDIUM_PURPLE;\n  };\n  protoOf(Colors).ob = function () {\n    return this.MEDIUM_SEA_GREEN;\n  };\n  protoOf(Colors).pb = function () {\n    return this.MEDIUM_SLATE_BLUE;\n  };\n  protoOf(Colors).qb = function () {\n    return this.MEDIUM_SPRING_GREEN;\n  };\n  protoOf(Colors).rb = function () {\n    return this.MEDIUM_TURQUOISE;\n  };\n  protoOf(Colors).sb = function () {\n    return this.MEDIUM_VIOLET_RED;\n  };\n  protoOf(Colors).tb = function () {\n    return this.MIDNIGHT_BLUE;\n  };\n  protoOf(Colors).ub = function () {\n    return this.MINT_CREAM;\n  };\n  protoOf(Colors).vb = function () {\n    return this.MISTY_ROSE;\n  };\n  protoOf(Colors).wb = function () {\n    return this.MOCCASIN;\n  };\n  protoOf(Colors).xb = function () {\n    return this.NAVAJO_WHITE;\n  };\n  protoOf(Colors).yb = function () {\n    return this.NAVY;\n  };\n  protoOf(Colors).zb = function () {\n    return this.OLD_LACE;\n  };\n  protoOf(Colors).ac = function () {\n    return this.OLIVE;\n  };\n  protoOf(Colors).bc = function () {\n    return this.OLIVE_DRAB;\n  };\n  protoOf(Colors).cc = function () {\n    return this.ORANGE;\n  };\n  protoOf(Colors).dc = function () {\n    return this.ORANGE_RED;\n  };\n  protoOf(Colors).ec = function () {\n    return this.ORCHID;\n  };\n  protoOf(Colors).fc = function () {\n    return this.PALE_GOLDEN_ROD;\n  };\n  protoOf(Colors).gc = function () {\n    return this.PALE_GREEN;\n  };\n  protoOf(Colors).hc = function () {\n    return this.PALE_TURQUOISE;\n  };\n  protoOf(Colors).ic = function () {\n    return this.PALE_VIOLET_RED;\n  };\n  protoOf(Colors).jc = function () {\n    return this.PAPAYA_WHIP;\n  };\n  protoOf(Colors).kc = function () {\n    return this.PEACH_PUFF;\n  };\n  protoOf(Colors).lc = function () {\n    return this.PERU;\n  };\n  protoOf(Colors).mc = function () {\n    return this.PINK;\n  };\n  protoOf(Colors).nc = function () {\n    return this.PLUM;\n  };\n  protoOf(Colors).oc = function () {\n    return this.POWDER_BLUE;\n  };\n  protoOf(Colors).pc = function () {\n    return this.PURPLE;\n  };\n  protoOf(Colors).qc = function () {\n    return this.REBECCA_PURPLE;\n  };\n  protoOf(Colors).rc = function () {\n    return this.RED;\n  };\n  protoOf(Colors).sc = function () {\n    return this.ROSY_BROWN;\n  };\n  protoOf(Colors).tc = function () {\n    return this.ROYAL_BLUE;\n  };\n  protoOf(Colors).uc = function () {\n    return this.SADDLE_BROWN;\n  };\n  protoOf(Colors).vc = function () {\n    return this.SALMON;\n  };\n  protoOf(Colors).wc = function () {\n    return this.SANDY_BROWN;\n  };\n  protoOf(Colors).xc = function () {\n    return this.SEA_GREEN;\n  };\n  protoOf(Colors).yc = function () {\n    return this.SEA_SHELL;\n  };\n  protoOf(Colors).zc = function () {\n    return this.SIENNA;\n  };\n  protoOf(Colors).ad = function () {\n    return this.SILVER;\n  };\n  protoOf(Colors).bd = function () {\n    return this.SKY_BLUE;\n  };\n  protoOf(Colors).cd = function () {\n    return this.SLATE_BLUE;\n  };\n  protoOf(Colors).dd = function () {\n    return this.SLATE_GRAY;\n  };\n  protoOf(Colors).ed = function () {\n    return this.SLATE_GREY;\n  };\n  protoOf(Colors).fd = function () {\n    return this.SNOW;\n  };\n  protoOf(Colors).gd = function () {\n    return this.SPRING_GREEN;\n  };\n  protoOf(Colors).hd = function () {\n    return this.STEEL_BLUE;\n  };\n  protoOf(Colors).id = function () {\n    return this.TAN;\n  };\n  protoOf(Colors).jd = function () {\n    return this.TEAL;\n  };\n  protoOf(Colors).kd = function () {\n    return this.THISTLE;\n  };\n  protoOf(Colors).ld = function () {\n    return this.TOMATO;\n  };\n  protoOf(Colors).md = function () {\n    return this.TURQUOISE;\n  };\n  protoOf(Colors).nd = function () {\n    return this.VIOLET;\n  };\n  protoOf(Colors).od = function () {\n    return this.WHEAT;\n  };\n  protoOf(Colors).pd = function () {\n    return this.WHITE;\n  };\n  protoOf(Colors).qd = function () {\n    return this.WHITE_SMOKE;\n  };\n  protoOf(Colors).rd = function () {\n    return this.YELLOW;\n  };\n  protoOf(Colors).sd = function () {\n    return this.YELLOW_GREEN;\n  };\n  var Colors_instance;\n  function Colors_getInstance() {\n    return Colors_instance;\n  }\n  function DefaultColorFunction(foreground, background) {\n    foreground = foreground === VOID ? -16777216 : foreground;\n    background = background === VOID ? 0 : background;\n    this.td_1 = foreground;\n    this.ud_1 = background;\n  }\n  protoOf(DefaultColorFunction).fg = function (row, col, qrCode, qrCodeGraphics) {\n    return this.td_1;\n  };\n  protoOf(DefaultColorFunction).bg = function (row, col, qrCode, qrCodeGraphics) {\n    return this.ud_1;\n  };\n  function LinearGradientColorFunction(startForegroundColor, endForegroundColor, backgroundColor, vertical) {\n    backgroundColor = backgroundColor === VOID ? -1 : backgroundColor;\n    vertical = vertical === VOID ? true : vertical;\n    this.startForegroundColor = startForegroundColor;\n    this.endForegroundColor = endForegroundColor;\n    this.backgroundColor = backgroundColor;\n    this.vertical = vertical;\n    this.vd_1 = Colors_instance.getRGBA(this.startForegroundColor);\n    this.wd_1 = Colors_instance.getRGBA(this.endForegroundColor);\n  }\n  protoOf(LinearGradientColorFunction).xd = function () {\n    return this.startForegroundColor;\n  };\n  protoOf(LinearGradientColorFunction).yd = function () {\n    return this.endForegroundColor;\n  };\n  protoOf(LinearGradientColorFunction).zd = function () {\n    return this.backgroundColor;\n  };\n  protoOf(LinearGradientColorFunction).ae = function (_set____db54di) {\n    this.vertical = _set____db54di;\n  };\n  protoOf(LinearGradientColorFunction).be = function () {\n    return this.vertical;\n  };\n  protoOf(LinearGradientColorFunction).fg = function (row, col, qrCode, qrCodeGraphics) {\n    var tmp;\n    if (this.vertical) {\n      tmp = row;\n    } else {\n      tmp = col;\n    }\n    var pct = tmp / qrCode.rawData.length;\n    var r = this.vd_1[0] * (1 - pct) + this.wd_1[0] * pct;\n    var g = this.vd_1[1] * (1 - pct) + this.wd_1[1] * pct;\n    var b = this.vd_1[2] * (1 - pct) + this.wd_1[2] * pct;\n    return Colors_instance.rgba(coerceIn(roundToInt(r), numberRangeToNumber(0, 255)), coerceIn(roundToInt(g), numberRangeToNumber(0, 255)), coerceIn(roundToInt(b), numberRangeToNumber(0, 255)), 255);\n  };\n  protoOf(LinearGradientColorFunction).bg = function (row, col, qrCode, qrCodeGraphics) {\n    return this.backgroundColor;\n  };\n  function QRCodeColorFunction() {\n  }\n  function InsufficientInformationDensityException(message, cause) {\n    message = message === VOID ? null : message;\n    cause = cause === VOID ? null : cause;\n    IllegalArgumentException_init_$Init$_1(message, cause, this);\n    captureStack(this, InsufficientInformationDensityException);\n    this.ce_1 = message;\n    this.de_1 = cause;\n  }\n  protoOf(InsufficientInformationDensityException).q3 = function () {\n    return this.ce_1;\n  };\n  protoOf(InsufficientInformationDensityException).r3 = function () {\n    return this.de_1;\n  };\n  function get($this, index) {\n    return (($this.ee_1[index / 8 | 0] >>> (7 - (index % 8 | 0) | 0) | 0) & 1) === 1;\n  }\n  function BitBuffer() {\n    this.ge_1 = 32;\n    this.ee_1 = new Int32Array(this.ge_1);\n    this.fe_1 = 0;\n  }\n  protoOf(BitBuffer).he = function (num, length) {\n    var inductionVariable = 0;\n    if (inductionVariable < length)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        this.putBit(((num >>> ((length - i | 0) - 1 | 0) | 0) & 1) === 1);\n      }\n       while (inductionVariable < length);\n  };\n  protoOf(BitBuffer).putBit = function (bit) {\n    if (this.fe_1 === imul(this.ee_1.length, 8)) {\n      this.ee_1 = copyOf(this.ee_1, this.ee_1.length + this.ge_1 | 0);\n    }\n    if (bit) {\n      this.ee_1[this.fe_1 / 8 | 0] = this.ee_1[this.fe_1 / 8 | 0] | (128 >>> (this.fe_1 % 8 | 0) | 0);\n    }\n    this.fe_1 = this.fe_1 + 1 | 0;\n  };\n  protoOf(BitBuffer).toString = function () {\n    var buffer = StringBuilder_init_$Create$_0();\n    var inductionVariable = 0;\n    var last = this.fe_1;\n    if (inductionVariable < last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        buffer.m3(get(this, i) ? _Char___init__impl__6a9atx(49) : _Char___init__impl__6a9atx(48));\n      }\n       while (inductionVariable < last);\n    return buffer.toString();\n  };\n  function arraycopy($this, from, fromPos, to, toPos, length) {\n    var inductionVariable = 0;\n    if (inductionVariable < length)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        to[toPos + i | 0] = from[fromPos + i | 0];\n      }\n       while (inductionVariable < length);\n  }\n  function Polynomial(num, shift) {\n    shift = shift === VOID ? 0 : shift;\n    var tmp$ret$1;\n    $l$block: {\n      // Inline function 'kotlin.collections.indexOfFirst' call\n      var inductionVariable = 0;\n      var last = num.length - 1 | 0;\n      if (inductionVariable <= last)\n        do {\n          var index = inductionVariable;\n          inductionVariable = inductionVariable + 1 | 0;\n          if (!(num[index] === 0)) {\n            tmp$ret$1 = index;\n            break $l$block;\n          }\n        }\n         while (inductionVariable <= last);\n      tmp$ret$1 = -1;\n    }\n    var offset = coerceAtLeast(tmp$ret$1, 0);\n    var tmp = this;\n    var tmp_0 = 0;\n    var tmp_1 = (num.length - offset | 0) + shift | 0;\n    var tmp_2 = new Int32Array(tmp_1);\n    while (tmp_0 < tmp_1) {\n      tmp_2[tmp_0] = 0;\n      tmp_0 = tmp_0 + 1 | 0;\n    }\n    tmp.ie_1 = tmp_2;\n    arraycopy(this, num, offset, this.ie_1, 0, num.length - offset | 0);\n  }\n  protoOf(Polynomial).i = function (i) {\n    return this.ie_1[i];\n  };\n  protoOf(Polynomial).je = function () {\n    return this.ie_1.length;\n  };\n  protoOf(Polynomial).ke = function (other) {\n    var tmp = 0;\n    var tmp_0 = (this.je() + other.je() | 0) - 1 | 0;\n    var tmp_1 = new Int32Array(tmp_0);\n    while (tmp < tmp_0) {\n      tmp_1[tmp] = 0;\n      tmp = tmp + 1 | 0;\n    }\n    // Inline function 'kotlin.let' call\n    var inductionVariable = 0;\n    var last = this.je();\n    if (inductionVariable < last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var inductionVariable_0 = 0;\n        var last_0 = other.je();\n        if (inductionVariable_0 < last_0)\n          do {\n            var j = inductionVariable_0;\n            inductionVariable_0 = inductionVariable_0 + 1 | 0;\n            tmp_1[i + j | 0] = tmp_1[i + j | 0] ^ QRMath_getInstance().me(QRMath_getInstance().le(this.i(i)) + QRMath_getInstance().le(other.i(j)) | 0);\n          }\n           while (inductionVariable_0 < last_0);\n      }\n       while (inductionVariable < last);\n    return new Polynomial(tmp_1);\n  };\n  protoOf(Polynomial).ne = function (other) {\n    var tmp;\n    if ((this.je() - other.je() | 0) < 0) {\n      tmp = this;\n    } else {\n      var ratio = QRMath_getInstance().le(this.i(0)) - QRMath_getInstance().le(other.i(0)) | 0;\n      // Inline function 'kotlin.collections.copyOf' call\n      // Inline function 'kotlin.js.asDynamic' call\n      var result = this.ie_1.slice();\n      // Inline function 'kotlin.collections.forEachIndexed' call\n      var index = 0;\n      var indexedObject = other.ie_1;\n      var inductionVariable = 0;\n      var last = indexedObject.length;\n      while (inductionVariable < last) {\n        var item = indexedObject[inductionVariable];\n        inductionVariable = inductionVariable + 1 | 0;\n        var _unary__edvuaz = index;\n        index = _unary__edvuaz + 1 | 0;\n        result[_unary__edvuaz] = result[_unary__edvuaz] ^ QRMath_getInstance().me(QRMath_getInstance().le(item) + ratio | 0);\n      }\n      tmp = (new Polynomial(result)).ne(other);\n    }\n    return tmp;\n  };\n  function isInsideModules($this, row, rowOffset, col, colOffset, modulesSize) {\n    var tmp;\n    var containsArg = row + rowOffset | 0;\n    if (0 <= containsArg ? containsArg < modulesSize : false) {\n      var containsArg_0 = col + colOffset | 0;\n      tmp = 0 <= containsArg_0 ? containsArg_0 < modulesSize : false;\n    } else {\n      tmp = false;\n    }\n    return tmp;\n  }\n  function isTopBottomRowSquare($this, row, col, probeSize) {\n    return (0 <= col ? col < probeSize : false) && (row === 0 || row === (probeSize - 1 | 0));\n  }\n  function isLeftRightColSquare($this, row, col, probeSize) {\n    return (0 <= row ? row < probeSize : false) && (col === 0 || col === (probeSize - 1 | 0));\n  }\n  function isMidSquare($this, row, col, probeSize) {\n    return (2 <= row ? row < (probeSize - 2 | 0) : false) && 2 <= col && col <= (probeSize - 3 | 0);\n  }\n  function findSquareRegion($this, row, col, probeSize) {\n    var tmp;\n    if (row === 0) {\n      tmp = col === 0 ? QRCodeRegion_TOP_LEFT_CORNER_getInstance() : col === (probeSize - 1 | 0) ? QRCodeRegion_TOP_RIGHT_CORNER_getInstance() : col === probeSize ? QRCodeRegion_MARGIN_getInstance() : QRCodeRegion_TOP_MID_getInstance();\n    } else if (row === (probeSize - 1 | 0)) {\n      tmp = col === 0 ? QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance() : col === (probeSize - 1 | 0) ? QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance() : col === probeSize ? QRCodeRegion_MARGIN_getInstance() : QRCodeRegion_BOTTOM_MID_getInstance();\n    } else if (row === probeSize) {\n      tmp = QRCodeRegion_MARGIN_getInstance();\n    } else {\n      tmp = col === 0 ? QRCodeRegion_LEFT_MID_getInstance() : col === (probeSize - 1 | 0) ? QRCodeRegion_RIGHT_MID_getInstance() : col === probeSize ? QRCodeRegion_MARGIN_getInstance() : QRCodeRegion_CENTER_getInstance();\n    }\n    return tmp;\n  }\n  function set($this, row, col, value, modules, parent) {\n    var qrCodeSquare = modules[row][col];\n    if (!(qrCodeSquare == null)) {\n      qrCodeSquare.dark = value;\n    } else {\n      modules[row][col] = new QRCodeSquare(value, row, col, modules.length, VOID, VOID, VOID, parent);\n    }\n  }\n  function set$default($this, row, col, value, modules, parent, $super) {\n    parent = parent === VOID ? null : parent;\n    return set($this, row, col, value, modules, parent);\n  }\n  function QRCodeSetup() {\n    this.oe_1 = 7;\n  }\n  protoOf(QRCodeSetup).pe = function (modules, probeSize) {\n    this.qe(0, 0, modules, probeSize);\n  };\n  protoOf(QRCodeSetup).re = function (modules, probeSize, $super) {\n    probeSize = probeSize === VOID ? 7 : probeSize;\n    var tmp;\n    if ($super === VOID) {\n      this.pe(modules, probeSize);\n      tmp = Unit_instance;\n    } else {\n      tmp = $super.pe.call(this, modules, probeSize);\n    }\n    return tmp;\n  };\n  protoOf(QRCodeSetup).se = function (modules, probeSize) {\n    this.qe(modules.length - probeSize | 0, 0, modules, probeSize);\n  };\n  protoOf(QRCodeSetup).te = function (modules, probeSize, $super) {\n    probeSize = probeSize === VOID ? 7 : probeSize;\n    var tmp;\n    if ($super === VOID) {\n      this.se(modules, probeSize);\n      tmp = Unit_instance;\n    } else {\n      tmp = $super.se.call(this, modules, probeSize);\n    }\n    return tmp;\n  };\n  protoOf(QRCodeSetup).ue = function (modules, probeSize) {\n    this.qe(0, modules.length - probeSize | 0, modules, probeSize);\n  };\n  protoOf(QRCodeSetup).ve = function (modules, probeSize, $super) {\n    probeSize = probeSize === VOID ? 7 : probeSize;\n    var tmp;\n    if ($super === VOID) {\n      this.ue(modules, probeSize);\n      tmp = Unit_instance;\n    } else {\n      tmp = $super.ue.call(this, modules, probeSize);\n    }\n    return tmp;\n  };\n  protoOf(QRCodeSetup).qe = function (rowOffset, colOffset, modules, probeSize) {\n    var modulesSize = modules.length;\n    var tmp0_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_PROBE_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n    var squareData = new QRCodeSquare(false, rowOffset, colOffset, modulesSize, tmp0_squareInfo, probeSize, probeSize);\n    var inductionVariable = -1;\n    if (inductionVariable <= probeSize)\n      do {\n        var row = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var inductionVariable_0 = -1;\n        if (inductionVariable_0 <= probeSize)\n          $l$loop: do {\n            var col = inductionVariable_0;\n            inductionVariable_0 = inductionVariable_0 + 1 | 0;\n            if (!isInsideModules(this, row, rowOffset, col, colOffset, modulesSize)) {\n              continue $l$loop;\n            }\n            var isDark = isTopBottomRowSquare(this, row, col, probeSize) || isLeftRightColSquare(this, row, col, probeSize) || isMidSquare(this, row, col, probeSize);\n            var region = findSquareRegion(this, row, col, probeSize);\n            var tmp = modules[row + rowOffset | 0];\n            var tmp_0 = col + colOffset | 0;\n            var tmp1_row = row + rowOffset | 0;\n            var tmp2_col = col + colOffset | 0;\n            var tmp3_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_PROBE_getInstance(), region);\n            tmp[tmp_0] = new QRCodeSquare(isDark, tmp1_row, tmp2_col, modulesSize, tmp3_squareInfo, VOID, VOID, squareData);\n          }\n           while (!(col === probeSize));\n      }\n       while (!(row === probeSize));\n  };\n  protoOf(QRCodeSetup).we = function (type, modules) {\n    var pos = QRUtil_getInstance().cf(type);\n    var inductionVariable = 0;\n    var last = pos.length - 1 | 0;\n    if (inductionVariable <= last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var inductionVariable_0 = 0;\n        var last_0 = pos.length - 1 | 0;\n        if (inductionVariable_0 <= last_0)\n          $l$loop: do {\n            var j = inductionVariable_0;\n            inductionVariable_0 = inductionVariable_0 + 1 | 0;\n            var row = pos[i];\n            var col = pos[j];\n            if (!(modules[row][col] == null)) {\n              continue $l$loop;\n            }\n            var tmp0_row = row - 2 | 0;\n            var tmp1_col = col - 2 | 0;\n            var tmp2_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_ADJUST_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n            var tmp3_moduleSize = modules.length;\n            var squareData = new QRCodeSquare(false, tmp0_row, tmp1_col, tmp3_moduleSize, tmp2_squareInfo, 6, 6);\n            var inductionVariable_1 = -2;\n            if (inductionVariable_1 <= 2)\n              do {\n                var r = inductionVariable_1;\n                inductionVariable_1 = inductionVariable_1 + 1 | 0;\n                var inductionVariable_2 = -2;\n                if (inductionVariable_2 <= 2)\n                  do {\n                    var c = inductionVariable_2;\n                    inductionVariable_2 = inductionVariable_2 + 1 | 0;\n                    var tmp = modules[row + r | 0];\n                    var tmp_0 = col + c | 0;\n                    var tmp4_dark = r === -2 || r === 2 || c === -2 || c === 2 || (r === 0 && c === 0);\n                    var tmp5_row = row + r | 0;\n                    var tmp6_col = col + c | 0;\n                    var tmp7_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_POSITION_ADJUST_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n                    var tmp8_moduleSize = modules.length;\n                    tmp[tmp_0] = new QRCodeSquare(tmp4_dark, tmp5_row, tmp6_col, tmp8_moduleSize, tmp7_squareInfo, VOID, VOID, squareData);\n                  }\n                   while (inductionVariable_2 <= 2);\n              }\n               while (inductionVariable_1 <= 2);\n          }\n           while (inductionVariable_0 <= last_0);\n      }\n       while (inductionVariable <= last);\n  };\n  protoOf(QRCodeSetup).df = function (moduleCount, modules) {\n    var inductionVariable = 8;\n    var last = moduleCount - 8 | 0;\n    if (inductionVariable < last)\n      $l$loop: do {\n        var r = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        if (!(modules[r][6] == null)) {\n          continue $l$loop;\n        }\n        var tmp = modules[r];\n        var tmp0_dark = (r % 2 | 0) === 0;\n        var tmp1_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_TIMING_PATTERN_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n        var tmp2_moduleSize = modules.length;\n        tmp[6] = new QRCodeSquare(tmp0_dark, r, 6, tmp2_moduleSize, tmp1_squareInfo, VOID, VOID, null);\n      }\n       while (inductionVariable < last);\n    var inductionVariable_0 = 8;\n    var last_0 = moduleCount - 8 | 0;\n    if (inductionVariable_0 < last_0)\n      $l$loop_0: do {\n        var c = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        if (!(modules[6][c] == null)) {\n          continue $l$loop_0;\n        }\n        var tmp_0 = modules[6];\n        var tmp3_dark = (c % 2 | 0) === 0;\n        var tmp4_squareInfo = new QRCodeSquareInfo(QRCodeSquareType_TIMING_PATTERN_getInstance(), QRCodeRegion_UNKNOWN_getInstance());\n        var tmp5_moduleSize = modules.length;\n        tmp_0[c] = new QRCodeSquare(tmp3_dark, 6, c, tmp5_moduleSize, tmp4_squareInfo, VOID, VOID, null);\n      }\n       while (inductionVariable_0 < last_0);\n  };\n  protoOf(QRCodeSetup).ef = function (errorCorrectionLevel, maskPattern, moduleCount, modules) {\n    var data = errorCorrectionLevel.value << 3 | maskPattern.y_1;\n    var bits = QRUtil_getInstance().hf(data);\n    var inductionVariable = 0;\n    if (inductionVariable <= 14)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var mod = (bits >> i & 1) === 1;\n        if (i < 6) {\n          set$default(this, i, 8, mod, modules);\n        } else if (i < 8) {\n          set$default(this, i + 1 | 0, 8, mod, modules);\n        } else {\n          set$default(this, (moduleCount - 15 | 0) + i | 0, 8, mod, modules);\n        }\n      }\n       while (inductionVariable <= 14);\n    var inductionVariable_0 = 0;\n    if (inductionVariable_0 <= 14)\n      do {\n        var i_0 = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        var mod_0 = (bits >> i_0 & 1) === 1;\n        if (i_0 < 8) {\n          set$default(this, 8, (moduleCount - i_0 | 0) - 1 | 0, mod_0, modules);\n        } else if (i_0 < 9) {\n          set$default(this, 8, 15 - i_0 | 0, mod_0, modules);\n        } else {\n          set$default(this, 8, (15 - i_0 | 0) - 1 | 0, mod_0, modules);\n        }\n      }\n       while (inductionVariable_0 <= 14);\n    set$default(this, moduleCount - 8 | 0, 8, true, modules);\n  };\n  protoOf(QRCodeSetup).if = function (type, moduleCount, modules) {\n    var bits = QRUtil_getInstance().jf(type);\n    var inductionVariable = 0;\n    if (inductionVariable <= 17)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var mod = (bits >> i & 1) === 1;\n        set$default(this, i / 3 | 0, (((i % 3 | 0) + moduleCount | 0) - 8 | 0) - 3 | 0, mod, modules);\n      }\n       while (inductionVariable <= 17);\n    var inductionVariable_0 = 0;\n    if (inductionVariable_0 <= 17)\n      do {\n        var i_0 = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        var mod_0 = (bits >> i_0 & 1) === 1;\n        set$default(this, (((i_0 % 3 | 0) + moduleCount | 0) - 8 | 0) - 3 | 0, i_0 / 3 | 0, mod_0, modules);\n      }\n       while (inductionVariable_0 <= 17);\n  };\n  protoOf(QRCodeSetup).kf = function (data, maskPattern, moduleCount, modules) {\n    var inc = -1;\n    var bitIndex = 7;\n    var byteIndex = 0;\n    var row = moduleCount - 1 | 0;\n    var col = moduleCount - 1 | 0;\n    while (col > 0) {\n      if (col === 6) {\n        col = col - 1 | 0;\n      }\n      $l$loop: while (true) {\n        var inductionVariable = 0;\n        if (inductionVariable <= 1)\n          do {\n            var c = inductionVariable;\n            inductionVariable = inductionVariable + 1 | 0;\n            if (modules[row][col - c | 0] == null) {\n              var dark = false;\n              if (byteIndex < data.length) {\n                dark = ((data[byteIndex] >>> bitIndex | 0) & 1) === 1;\n              }\n              var mask = QRUtil_getInstance().lf(maskPattern, row, col - c | 0);\n              if (mask) {\n                dark = !dark;\n              }\n              set$default(this, row, col - c | 0, dark, modules);\n              bitIndex = bitIndex - 1 | 0;\n              if (bitIndex === -1) {\n                byteIndex = byteIndex + 1 | 0;\n                bitIndex = 7;\n              }\n            }\n          }\n           while (inductionVariable <= 1);\n        row = row + inc | 0;\n        if (row < 0 || moduleCount <= row) {\n          row = row - inc | 0;\n          inc = -inc | 0;\n          break $l$loop;\n        }\n      }\n      col = col - 2 | 0;\n    }\n  };\n  var QRCodeSetup_instance;\n  function QRCodeSetup_getInstance() {\n    return QRCodeSetup_instance;\n  }\n  function QRCodeSquare(dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent) {\n    squareInfo = squareInfo === VOID ? new QRCodeSquareInfo(QRCodeSquareType_DEFAULT_getInstance(), QRCodeRegion_UNKNOWN_getInstance()) : squareInfo;\n    rowSize = rowSize === VOID ? 1 : rowSize;\n    colSize = colSize === VOID ? 1 : colSize;\n    parent = parent === VOID ? null : parent;\n    this.dark = dark;\n    this.row = row;\n    this.col = col;\n    this.moduleSize = moduleSize;\n    this.squareInfo = squareInfo;\n    this.rowSize = rowSize;\n    this.colSize = colSize;\n    this.parent = parent;\n    this.rendered = false;\n  }\n  protoOf(QRCodeSquare).mf = function (_set____db54di) {\n    this.dark = _set____db54di;\n  };\n  protoOf(QRCodeSquare).nf = function () {\n    return this.dark;\n  };\n  protoOf(QRCodeSquare).of = function () {\n    return this.row;\n  };\n  protoOf(QRCodeSquare).pf = function () {\n    return this.col;\n  };\n  protoOf(QRCodeSquare).qf = function () {\n    return this.moduleSize;\n  };\n  protoOf(QRCodeSquare).rf = function () {\n    return this.squareInfo;\n  };\n  protoOf(QRCodeSquare).sf = function () {\n    return this.rowSize;\n  };\n  protoOf(QRCodeSquare).tf = function () {\n    return this.colSize;\n  };\n  protoOf(QRCodeSquare).uf = function () {\n    return this.parent;\n  };\n  protoOf(QRCodeSquare).vf = function (_set____db54di) {\n    this.rendered = _set____db54di;\n  };\n  protoOf(QRCodeSquare).wf = function () {\n    return this.rendered;\n  };\n  protoOf(QRCodeSquare).xf = function (cellSize) {\n    return imul(this.col, cellSize);\n  };\n  protoOf(QRCodeSquare).absoluteX = function (cellSize, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    return $super === VOID ? this.xf(cellSize) : $super.xf.call(this, cellSize);\n  };\n  protoOf(QRCodeSquare).yf = function (cellSize) {\n    return imul(this.row, cellSize);\n  };\n  protoOf(QRCodeSquare).absoluteY = function (cellSize, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    return $super === VOID ? this.yf(cellSize) : $super.yf.call(this, cellSize);\n  };\n  protoOf(QRCodeSquare).equals = function (other) {\n    if (this === other)\n      return true;\n    if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))\n      return false;\n    if (!(other instanceof QRCodeSquare))\n      THROW_CCE();\n    if (!(this.row === other.row))\n      return false;\n    if (!(this.col === other.col))\n      return false;\n    if (!(this.rowSize === other.rowSize))\n      return false;\n    if (!(this.colSize === other.colSize))\n      return false;\n    return true;\n  };\n  protoOf(QRCodeSquare).hashCode = function () {\n    var result = this.row;\n    result = imul(31, result) + this.col | 0;\n    result = imul(31, result) + this.rowSize | 0;\n    result = imul(31, result) + this.colSize | 0;\n    return result;\n  };\n  protoOf(QRCodeSquare).zf = function () {\n    return this.dark;\n  };\n  protoOf(QRCodeSquare).ag = function () {\n    return this.row;\n  };\n  protoOf(QRCodeSquare).cg = function () {\n    return this.col;\n  };\n  protoOf(QRCodeSquare).dg = function () {\n    return this.moduleSize;\n  };\n  protoOf(QRCodeSquare).eg = function () {\n    return this.squareInfo;\n  };\n  protoOf(QRCodeSquare).gg = function () {\n    return this.rowSize;\n  };\n  protoOf(QRCodeSquare).hg = function () {\n    return this.colSize;\n  };\n  protoOf(QRCodeSquare).ig = function () {\n    return this.parent;\n  };\n  protoOf(QRCodeSquare).jg = function (dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent) {\n    return new QRCodeSquare(dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent);\n  };\n  protoOf(QRCodeSquare).copy = function (dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent, $super) {\n    dark = dark === VOID ? this.dark : dark;\n    row = row === VOID ? this.row : row;\n    col = col === VOID ? this.col : col;\n    moduleSize = moduleSize === VOID ? this.moduleSize : moduleSize;\n    squareInfo = squareInfo === VOID ? this.squareInfo : squareInfo;\n    rowSize = rowSize === VOID ? this.rowSize : rowSize;\n    colSize = colSize === VOID ? this.colSize : colSize;\n    parent = parent === VOID ? this.parent : parent;\n    return $super === VOID ? this.jg(dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent) : $super.jg.call(this, dark, row, col, moduleSize, squareInfo, rowSize, colSize, parent);\n  };\n  protoOf(QRCodeSquare).toString = function () {\n    return 'QRCodeSquare(dark=' + this.dark + ', row=' + this.row + ', col=' + this.col + ', moduleSize=' + this.moduleSize + ', squareInfo=' + this.squareInfo.toString() + ', rowSize=' + this.rowSize + ', colSize=' + this.colSize + ', parent=' + toString_0(this.parent) + ')';\n  };\n  function QRCodeSquareInfo(type, region) {\n    this.type = type;\n    this.region = region;\n  }\n  protoOf(QRCodeSquareInfo).kg = function () {\n    return this.type;\n  };\n  protoOf(QRCodeSquareInfo).lg = function () {\n    return this.region;\n  };\n  protoOf(QRCodeSquareInfo).zf = function () {\n    return this.type;\n  };\n  protoOf(QRCodeSquareInfo).ag = function () {\n    return this.region;\n  };\n  protoOf(QRCodeSquareInfo).mg = function (type, region) {\n    return new QRCodeSquareInfo(type, region);\n  };\n  protoOf(QRCodeSquareInfo).copy = function (type, region, $super) {\n    type = type === VOID ? this.type : type;\n    region = region === VOID ? this.region : region;\n    return $super === VOID ? this.mg(type, region) : $super.mg.call(this, type, region);\n  };\n  protoOf(QRCodeSquareInfo).toString = function () {\n    return 'QRCodeSquareInfo(type=' + this.type.toString() + ', region=' + this.region.toString() + ')';\n  };\n  protoOf(QRCodeSquareInfo).hashCode = function () {\n    var result = this.type.hashCode();\n    result = imul(result, 31) + this.region.hashCode() | 0;\n    return result;\n  };\n  protoOf(QRCodeSquareInfo).equals = function (other) {\n    if (this === other)\n      return true;\n    if (!(other instanceof QRCodeSquareInfo))\n      return false;\n    var tmp0_other_with_cast = other instanceof QRCodeSquareInfo ? other : THROW_CCE();\n    if (!this.type.equals(tmp0_other_with_cast.type))\n      return false;\n    if (!this.region.equals(tmp0_other_with_cast.region))\n      return false;\n    return true;\n  };\n  var QRCodeSquareType_POSITION_PROBE_instance;\n  var QRCodeSquareType_POSITION_ADJUST_instance;\n  var QRCodeSquareType_TIMING_PATTERN_instance;\n  var QRCodeSquareType_DEFAULT_instance;\n  function values() {\n    return [QRCodeSquareType_POSITION_PROBE_getInstance(), QRCodeSquareType_POSITION_ADJUST_getInstance(), QRCodeSquareType_TIMING_PATTERN_getInstance(), QRCodeSquareType_DEFAULT_getInstance()];\n  }\n  function valueOf(value) {\n    switch (value) {\n      case 'POSITION_PROBE':\n        return QRCodeSquareType_POSITION_PROBE_getInstance();\n      case 'POSITION_ADJUST':\n        return QRCodeSquareType_POSITION_ADJUST_getInstance();\n      case 'TIMING_PATTERN':\n        return QRCodeSquareType_TIMING_PATTERN_getInstance();\n      case 'DEFAULT':\n        return QRCodeSquareType_DEFAULT_getInstance();\n      default:\n        QRCodeSquareType_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var QRCodeSquareType_entriesInitialized;\n  function QRCodeSquareType_initEntries() {\n    if (QRCodeSquareType_entriesInitialized)\n      return Unit_instance;\n    QRCodeSquareType_entriesInitialized = true;\n    QRCodeSquareType_POSITION_PROBE_instance = new QRCodeSquareType('POSITION_PROBE', 0);\n    QRCodeSquareType_POSITION_ADJUST_instance = new QRCodeSquareType('POSITION_ADJUST', 1);\n    QRCodeSquareType_TIMING_PATTERN_instance = new QRCodeSquareType('TIMING_PATTERN', 2);\n    QRCodeSquareType_DEFAULT_instance = new QRCodeSquareType('DEFAULT', 3);\n  }\n  function QRCodeSquareType(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  var QRCodeRegion_TOP_LEFT_CORNER_instance;\n  var QRCodeRegion_TOP_RIGHT_CORNER_instance;\n  var QRCodeRegion_TOP_MID_instance;\n  var QRCodeRegion_LEFT_MID_instance;\n  var QRCodeRegion_RIGHT_MID_instance;\n  var QRCodeRegion_CENTER_instance;\n  var QRCodeRegion_BOTTOM_LEFT_CORNER_instance;\n  var QRCodeRegion_BOTTOM_RIGHT_CORNER_instance;\n  var QRCodeRegion_BOTTOM_MID_instance;\n  var QRCodeRegion_MARGIN_instance;\n  var QRCodeRegion_UNKNOWN_instance;\n  function values_0() {\n    return [QRCodeRegion_TOP_LEFT_CORNER_getInstance(), QRCodeRegion_TOP_RIGHT_CORNER_getInstance(), QRCodeRegion_TOP_MID_getInstance(), QRCodeRegion_LEFT_MID_getInstance(), QRCodeRegion_RIGHT_MID_getInstance(), QRCodeRegion_CENTER_getInstance(), QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance(), QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance(), QRCodeRegion_BOTTOM_MID_getInstance(), QRCodeRegion_MARGIN_getInstance(), QRCodeRegion_UNKNOWN_getInstance()];\n  }\n  function valueOf_0(value) {\n    switch (value) {\n      case 'TOP_LEFT_CORNER':\n        return QRCodeRegion_TOP_LEFT_CORNER_getInstance();\n      case 'TOP_RIGHT_CORNER':\n        return QRCodeRegion_TOP_RIGHT_CORNER_getInstance();\n      case 'TOP_MID':\n        return QRCodeRegion_TOP_MID_getInstance();\n      case 'LEFT_MID':\n        return QRCodeRegion_LEFT_MID_getInstance();\n      case 'RIGHT_MID':\n        return QRCodeRegion_RIGHT_MID_getInstance();\n      case 'CENTER':\n        return QRCodeRegion_CENTER_getInstance();\n      case 'BOTTOM_LEFT_CORNER':\n        return QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance();\n      case 'BOTTOM_RIGHT_CORNER':\n        return QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance();\n      case 'BOTTOM_MID':\n        return QRCodeRegion_BOTTOM_MID_getInstance();\n      case 'MARGIN':\n        return QRCodeRegion_MARGIN_getInstance();\n      case 'UNKNOWN':\n        return QRCodeRegion_UNKNOWN_getInstance();\n      default:\n        QRCodeRegion_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var QRCodeRegion_entriesInitialized;\n  function QRCodeRegion_initEntries() {\n    if (QRCodeRegion_entriesInitialized)\n      return Unit_instance;\n    QRCodeRegion_entriesInitialized = true;\n    QRCodeRegion_TOP_LEFT_CORNER_instance = new QRCodeRegion('TOP_LEFT_CORNER', 0);\n    QRCodeRegion_TOP_RIGHT_CORNER_instance = new QRCodeRegion('TOP_RIGHT_CORNER', 1);\n    QRCodeRegion_TOP_MID_instance = new QRCodeRegion('TOP_MID', 2);\n    QRCodeRegion_LEFT_MID_instance = new QRCodeRegion('LEFT_MID', 3);\n    QRCodeRegion_RIGHT_MID_instance = new QRCodeRegion('RIGHT_MID', 4);\n    QRCodeRegion_CENTER_instance = new QRCodeRegion('CENTER', 5);\n    QRCodeRegion_BOTTOM_LEFT_CORNER_instance = new QRCodeRegion('BOTTOM_LEFT_CORNER', 6);\n    QRCodeRegion_BOTTOM_RIGHT_CORNER_instance = new QRCodeRegion('BOTTOM_RIGHT_CORNER', 7);\n    QRCodeRegion_BOTTOM_MID_instance = new QRCodeRegion('BOTTOM_MID', 8);\n    QRCodeRegion_MARGIN_instance = new QRCodeRegion('MARGIN', 9);\n    QRCodeRegion_UNKNOWN_instance = new QRCodeRegion('UNKNOWN', 10);\n  }\n  function QRCodeRegion(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  function QRCodeSquareType_POSITION_PROBE_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_POSITION_PROBE_instance;\n  }\n  function QRCodeSquareType_POSITION_ADJUST_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_POSITION_ADJUST_instance;\n  }\n  function QRCodeSquareType_TIMING_PATTERN_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_TIMING_PATTERN_instance;\n  }\n  function QRCodeSquareType_DEFAULT_getInstance() {\n    QRCodeSquareType_initEntries();\n    return QRCodeSquareType_DEFAULT_instance;\n  }\n  function QRCodeRegion_TOP_LEFT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_TOP_LEFT_CORNER_instance;\n  }\n  function QRCodeRegion_TOP_RIGHT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_TOP_RIGHT_CORNER_instance;\n  }\n  function QRCodeRegion_TOP_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_TOP_MID_instance;\n  }\n  function QRCodeRegion_LEFT_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_LEFT_MID_instance;\n  }\n  function QRCodeRegion_RIGHT_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_RIGHT_MID_instance;\n  }\n  function QRCodeRegion_CENTER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_CENTER_instance;\n  }\n  function QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_BOTTOM_LEFT_CORNER_instance;\n  }\n  function QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_BOTTOM_RIGHT_CORNER_instance;\n  }\n  function QRCodeRegion_BOTTOM_MID_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_BOTTOM_MID_instance;\n  }\n  function QRCodeRegion_MARGIN_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_MARGIN_instance;\n  }\n  function QRCodeRegion_UNKNOWN_getInstance() {\n    QRCodeRegion_initEntries();\n    return QRCodeRegion_UNKNOWN_instance;\n  }\n  function QRData(dataType, data) {\n    this.rg_1 = dataType;\n    this.sg_1 = data;\n  }\n  protoOf(QRData).vg = function (type) {\n    var tmp;\n    if (1 <= type ? type <= 9 : false) {\n      var tmp_0;\n      switch (this.rg_1.y_1) {\n        case 0:\n          tmp_0 = 10;\n          break;\n        case 1:\n          tmp_0 = 9;\n          break;\n        case 2:\n          tmp_0 = 8;\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp = tmp_0;\n    } else if (1 <= type ? type <= 26 : false) {\n      var tmp_1;\n      switch (this.rg_1.y_1) {\n        case 0:\n          tmp_1 = 12;\n          break;\n        case 1:\n          tmp_1 = 11;\n          break;\n        case 2:\n          tmp_1 = 16;\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp = tmp_1;\n    } else if (1 <= type ? type <= 40 : false) {\n      var tmp_2;\n      switch (this.rg_1.y_1) {\n        case 0:\n          tmp_2 = 14;\n          break;\n        case 1:\n          tmp_2 = 13;\n          break;\n        case 2:\n          tmp_2 = 16;\n          break;\n        default:\n          noWhenBranchMatchedException();\n          break;\n      }\n      tmp = tmp_2;\n    } else {\n      throw IllegalArgumentException_init_$Create$_0(\"'type' must be greater than 0 and cannot be greater than 40: \" + type);\n    }\n    return tmp;\n  };\n  function QR8BitByte(data) {\n    QRData.call(this, QRCodeDataType_DEFAULT_getInstance(), data);\n    this.yg_1 = encodeToByteArray(data);\n  }\n  protoOf(QR8BitByte).ug = function (buffer) {\n    var inductionVariable = 0;\n    var last = this.yg_1.length - 1 | 0;\n    if (inductionVariable <= last)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        buffer.he(this.yg_1[i], 8);\n      }\n       while (inductionVariable <= last);\n  };\n  protoOf(QR8BitByte).tg = function () {\n    return this.yg_1.length;\n  };\n  function charCode($this, c) {\n    var tmp;\n    if (_Char___init__impl__6a9atx(48) <= c ? c <= _Char___init__impl__6a9atx(57) : false) {\n      tmp = Char__minus_impl_a2frrh(c, _Char___init__impl__6a9atx(48));\n    } else if (_Char___init__impl__6a9atx(65) <= c ? c <= _Char___init__impl__6a9atx(90) : false) {\n      tmp = Char__minus_impl_a2frrh(c, _Char___init__impl__6a9atx(65)) + 10 | 0;\n    } else {\n      var tmp_0;\n      if (c === _Char___init__impl__6a9atx(32)) {\n        tmp_0 = 36;\n      } else if (c === _Char___init__impl__6a9atx(36)) {\n        tmp_0 = 37;\n      } else if (c === _Char___init__impl__6a9atx(37)) {\n        tmp_0 = 38;\n      } else if (c === _Char___init__impl__6a9atx(42)) {\n        tmp_0 = 39;\n      } else if (c === _Char___init__impl__6a9atx(43)) {\n        tmp_0 = 40;\n      } else if (c === _Char___init__impl__6a9atx(45)) {\n        tmp_0 = 41;\n      } else if (c === _Char___init__impl__6a9atx(46)) {\n        tmp_0 = 42;\n      } else if (c === _Char___init__impl__6a9atx(47)) {\n        tmp_0 = 43;\n      } else if (c === _Char___init__impl__6a9atx(58)) {\n        tmp_0 = 44;\n      } else {\n        throw IllegalArgumentException_init_$Create$_0('Illegal character: ' + toString(c));\n      }\n      tmp = tmp_0;\n    }\n    return tmp;\n  }\n  function QRAlphaNum(data) {\n    QRData.call(this, QRCodeDataType_UPPER_ALPHA_NUM_getInstance(), data);\n  }\n  protoOf(QRAlphaNum).ug = function (buffer) {\n    var i = 0;\n    var dataLength = this.sg_1.length;\n    while ((i + 1 | 0) < dataLength) {\n      buffer.he(imul(charCode(this, charSequenceGet(this.sg_1, i)), 45) + charCode(this, charSequenceGet(this.sg_1, i + 1 | 0)) | 0, 11);\n      i = i + 2 | 0;\n    }\n    if (i < dataLength) {\n      buffer.he(charCode(this, charSequenceGet(this.sg_1, i)), 6);\n    }\n  };\n  protoOf(QRAlphaNum).tg = function () {\n    return this.sg_1.length;\n  };\n  function QRNumber(data) {\n    QRData.call(this, QRCodeDataType_NUMBERS_getInstance(), data);\n  }\n  protoOf(QRNumber).ug = function (buffer) {\n    var i = 0;\n    var len = this.tg();\n    while ((i + 2 | 0) < len) {\n      var tmp0 = this.sg_1;\n      var tmp1 = i;\n      // Inline function 'kotlin.text.substring' call\n      var endIndex = i + 3 | 0;\n      // Inline function 'kotlin.js.asDynamic' call\n      var tmp$ret$1 = tmp0.substring(tmp1, endIndex);\n      var num = toInt_0(tmp$ret$1);\n      buffer.he(num, 10);\n      i = i + 3 | 0;\n    }\n    if (i < len) {\n      if ((len - i | 0) === 1) {\n        var tmp3 = this.sg_1;\n        var tmp4 = i;\n        // Inline function 'kotlin.text.substring' call\n        var endIndex_0 = i + 1 | 0;\n        // Inline function 'kotlin.js.asDynamic' call\n        var tmp$ret$3 = tmp3.substring(tmp4, endIndex_0);\n        var num_0 = toInt_0(tmp$ret$3);\n        buffer.he(num_0, 4);\n      } else if ((len - i | 0) === 2) {\n        var tmp6 = this.sg_1;\n        var tmp7 = i;\n        // Inline function 'kotlin.text.substring' call\n        var endIndex_1 = i + 2 | 0;\n        // Inline function 'kotlin.js.asDynamic' call\n        var tmp$ret$5 = tmp6.substring(tmp7, endIndex_1);\n        var num_1 = toInt_0(tmp$ret$5);\n        buffer.he(num_1, 7);\n      }\n    }\n  };\n  protoOf(QRNumber).tg = function () {\n    return this.sg_1.length;\n  };\n  function QRMath() {\n    QRMath_instance = this;\n    this.s7_1 = new Int32Array(256);\n    this.t7_1 = new Int32Array(256);\n    var inductionVariable = 0;\n    if (inductionVariable <= 7)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        this.s7_1[i] = 1 << i;\n      }\n       while (inductionVariable <= 7);\n    var inductionVariable_0 = 8;\n    if (inductionVariable_0 <= 255)\n      do {\n        var i_0 = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        this.s7_1[i_0] = this.s7_1[i_0 - 4 | 0] ^ this.s7_1[i_0 - 5 | 0] ^ this.s7_1[i_0 - 6 | 0] ^ this.s7_1[i_0 - 8 | 0];\n      }\n       while (inductionVariable_0 <= 255);\n    var inductionVariable_1 = 0;\n    if (inductionVariable_1 <= 254)\n      do {\n        var i_1 = inductionVariable_1;\n        inductionVariable_1 = inductionVariable_1 + 1 | 0;\n        this.t7_1[this.s7_1[i_1]] = i_1;\n      }\n       while (inductionVariable_1 <= 254);\n  }\n  protoOf(QRMath).le = function (n) {\n    return this.t7_1[n];\n  };\n  protoOf(QRMath).me = function (n) {\n    var i = n;\n    while (i < 0) {\n      i = i + 255 | 0;\n    }\n    while (i >= 256) {\n      i = i - 255 | 0;\n    }\n    return this.s7_1[i];\n  };\n  protoOf(QRMath).u7 = function (x1, y1, w1, h1, x2, y2, w2, h2) {\n    var x1End = x1 + w1 | 0;\n    var y1End = y1 + h1 | 0;\n    var x2End = x2 + w2 | 0;\n    var y2End = y2 + h2 | 0;\n    return x1End < x2 || x1 > x2End || y1End < y2 || y1 > y2End;\n  };\n  var QRMath_instance;\n  function QRMath_getInstance() {\n    if (QRMath_instance == null)\n      new QRMath();\n    return QRMath_instance;\n  }\n  function isNumber_0($this, s) {\n    // Inline function 'kotlin.text.matches' call\n    return Regex_init_$Create$('^\\\\d+$').e5(s);\n  }\n  function isAlphaNum($this, s) {\n    // Inline function 'kotlin.text.matches' call\n    return Regex_init_$Create$('^[0-9A-Z $%*+\\\\-./:]+$').e5(s);\n  }\n  function getBCHDigit($this, data) {\n    var i = data;\n    var digit = 0;\n    while (!(i === 0)) {\n      digit = digit + 1 | 0;\n      i = i >>> 1 | 0;\n    }\n    return digit;\n  }\n  function QRUtil() {\n    QRUtil_instance = this;\n    var tmp = this;\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_0 = new Int32Array([]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_1 = new Int32Array([6, 18]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_2 = new Int32Array([6, 22]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_3 = new Int32Array([6, 26]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_4 = new Int32Array([6, 30]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_5 = new Int32Array([6, 34]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_6 = new Int32Array([6, 22, 38]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_7 = new Int32Array([6, 24, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_8 = new Int32Array([6, 26, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_9 = new Int32Array([6, 28, 50]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_10 = new Int32Array([6, 30, 54]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_11 = new Int32Array([6, 32, 58]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_12 = new Int32Array([6, 34, 62]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_13 = new Int32Array([6, 26, 46, 66]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_14 = new Int32Array([6, 26, 48, 70]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_15 = new Int32Array([6, 26, 50, 74]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_16 = new Int32Array([6, 30, 54, 78]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_17 = new Int32Array([6, 30, 56, 82]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_18 = new Int32Array([6, 30, 58, 86]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_19 = new Int32Array([6, 34, 62, 90]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_20 = new Int32Array([6, 28, 50, 72, 94]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_21 = new Int32Array([6, 26, 50, 74, 98]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_22 = new Int32Array([6, 30, 54, 78, 102]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_23 = new Int32Array([6, 28, 54, 80, 106]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_24 = new Int32Array([6, 32, 58, 84, 110]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_25 = new Int32Array([6, 30, 58, 86, 114]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_26 = new Int32Array([6, 34, 62, 90, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_27 = new Int32Array([6, 26, 50, 74, 98, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_28 = new Int32Array([6, 30, 54, 78, 102, 126]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_29 = new Int32Array([6, 26, 52, 78, 104, 130]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_30 = new Int32Array([6, 30, 56, 82, 108, 134]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_31 = new Int32Array([6, 34, 60, 86, 112, 138]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_32 = new Int32Array([6, 30, 58, 86, 114, 142]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_33 = new Int32Array([6, 34, 62, 90, 118, 146]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_34 = new Int32Array([6, 30, 54, 78, 102, 126, 150]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_35 = new Int32Array([6, 24, 50, 76, 102, 128, 154]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_36 = new Int32Array([6, 28, 54, 80, 106, 132, 158]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_37 = new Int32Array([6, 32, 58, 84, 110, 136, 162]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_38 = new Int32Array([6, 26, 54, 82, 110, 138, 166]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    tmp.xe_1 = [tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, tmp_11, tmp_12, tmp_13, tmp_14, tmp_15, tmp_16, tmp_17, tmp_18, tmp_19, tmp_20, tmp_21, tmp_22, tmp_23, tmp_24, tmp_25, tmp_26, tmp_27, tmp_28, tmp_29, tmp_30, tmp_31, tmp_32, tmp_33, tmp_34, tmp_35, tmp_36, tmp_37, tmp_38, new Int32Array([6, 30, 58, 86, 114, 142, 170])];\n    var tmp_39 = this;\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_40 = new Int32Array([41, 25, 17, 10]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_41 = new Int32Array([34, 20, 14, 8]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_42 = new Int32Array([27, 16, 11, 7]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_43 = [tmp_40, tmp_41, tmp_42, new Int32Array([17, 10, 7, 4])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_44 = new Int32Array([77, 47, 32, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_45 = new Int32Array([63, 38, 26, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_46 = new Int32Array([48, 29, 20, 12]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_47 = [tmp_44, tmp_45, tmp_46, new Int32Array([34, 20, 14, 8])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_48 = new Int32Array([127, 77, 53, 32]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_49 = new Int32Array([101, 61, 42, 26]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_50 = new Int32Array([77, 47, 32, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_51 = [tmp_48, tmp_49, tmp_50, new Int32Array([58, 35, 24, 15])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_52 = new Int32Array([187, 114, 78, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_53 = new Int32Array([149, 90, 62, 38]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_54 = new Int32Array([111, 67, 46, 28]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_55 = [tmp_52, tmp_53, tmp_54, new Int32Array([82, 50, 34, 21])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_56 = new Int32Array([255, 154, 106, 65]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_57 = new Int32Array([202, 122, 84, 52]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_58 = new Int32Array([144, 87, 60, 37]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_59 = [tmp_56, tmp_57, tmp_58, new Int32Array([106, 64, 44, 27])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_60 = new Int32Array([322, 195, 134, 82]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_61 = new Int32Array([255, 154, 106, 65]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_62 = new Int32Array([178, 108, 74, 45]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_63 = [tmp_60, tmp_61, tmp_62, new Int32Array([139, 84, 58, 36])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_64 = new Int32Array([370, 224, 154, 95]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_65 = new Int32Array([293, 178, 122, 75]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_66 = new Int32Array([207, 125, 86, 53]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_67 = [tmp_64, tmp_65, tmp_66, new Int32Array([154, 93, 64, 39])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_68 = new Int32Array([461, 279, 192, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_69 = new Int32Array([365, 221, 152, 93]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_70 = new Int32Array([259, 157, 108, 66]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_71 = [tmp_68, tmp_69, tmp_70, new Int32Array([202, 122, 84, 52])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_72 = new Int32Array([552, 335, 230, 141]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_73 = new Int32Array([432, 262, 180, 111]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_74 = new Int32Array([312, 189, 130, 80]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_75 = [tmp_72, tmp_73, tmp_74, new Int32Array([235, 143, 98, 60])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_76 = new Int32Array([652, 395, 271, 167]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_77 = new Int32Array([513, 311, 213, 131]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_78 = new Int32Array([364, 221, 151, 93]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_79 = [tmp_76, tmp_77, tmp_78, new Int32Array([288, 174, 119, 74])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_80 = new Int32Array([772, 468, 321, 198]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_81 = new Int32Array([604, 366, 251, 155]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_82 = new Int32Array([427, 259, 177, 109]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_83 = [tmp_80, tmp_81, tmp_82, new Int32Array([331, 200, 137, 85])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_84 = new Int32Array([883, 535, 367, 226]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_85 = new Int32Array([691, 419, 287, 177]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_86 = new Int32Array([489, 296, 203, 125]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_87 = [tmp_84, tmp_85, tmp_86, new Int32Array([374, 227, 155, 96])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_88 = new Int32Array([1022, 619, 425, 262]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_89 = new Int32Array([796, 483, 331, 204]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_90 = new Int32Array([580, 352, 241, 149]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_91 = [tmp_88, tmp_89, tmp_90, new Int32Array([427, 259, 177, 109])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_92 = new Int32Array([1101, 667, 458, 282]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_93 = new Int32Array([871, 528, 362, 223]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_94 = new Int32Array([621, 376, 258, 159]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_95 = [tmp_92, tmp_93, tmp_94, new Int32Array([468, 283, 194, 120])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_96 = new Int32Array([1250, 758, 520, 320]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_97 = new Int32Array([991, 600, 412, 254]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_98 = new Int32Array([703, 426, 292, 180]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_99 = [tmp_96, tmp_97, tmp_98, new Int32Array([530, 321, 220, 136])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_100 = new Int32Array([1408, 854, 586, 361]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_101 = new Int32Array([1082, 656, 450, 277]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_102 = new Int32Array([775, 470, 322, 198]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_103 = [tmp_100, tmp_101, tmp_102, new Int32Array([602, 365, 250, 154])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_104 = new Int32Array([1548, 938, 644, 397]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_105 = new Int32Array([1212, 734, 504, 310]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_106 = new Int32Array([876, 531, 364, 224]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_107 = [tmp_104, tmp_105, tmp_106, new Int32Array([674, 408, 280, 173])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_108 = new Int32Array([1725, 1046, 718, 442]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_109 = new Int32Array([1346, 816, 560, 345]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_110 = new Int32Array([948, 574, 394, 243]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_111 = [tmp_108, tmp_109, tmp_110, new Int32Array([746, 452, 310, 191])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_112 = new Int32Array([1903, 1153, 792, 488]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_113 = new Int32Array([1500, 909, 624, 384]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_114 = new Int32Array([1063, 644, 442, 272]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_115 = [tmp_112, tmp_113, tmp_114, new Int32Array([813, 493, 338, 208])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_116 = new Int32Array([2061, 1249, 858, 528]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_117 = new Int32Array([1600, 970, 666, 410]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_118 = new Int32Array([1159, 702, 482, 297]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_119 = [tmp_116, tmp_117, tmp_118, new Int32Array([919, 557, 382, 235])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_120 = new Int32Array([2232, 1352, 929, 572]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_121 = new Int32Array([1708, 1035, 711, 438]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_122 = new Int32Array([1224, 742, 509, 314]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_123 = [tmp_120, tmp_121, tmp_122, new Int32Array([969, 587, 403, 248])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_124 = new Int32Array([2409, 1460, 1003, 618]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_125 = new Int32Array([1872, 1134, 779, 480]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_126 = new Int32Array([1358, 823, 565, 348]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_127 = [tmp_124, tmp_125, tmp_126, new Int32Array([1056, 640, 439, 270])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_128 = new Int32Array([2620, 1588, 1091, 672]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_129 = new Int32Array([2059, 1248, 857, 528]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_130 = new Int32Array([1468, 890, 611, 376]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_131 = [tmp_128, tmp_129, tmp_130, new Int32Array([1108, 672, 461, 284])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_132 = new Int32Array([2812, 1704, 1171, 721]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_133 = new Int32Array([2188, 1326, 911, 561]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_134 = new Int32Array([1588, 963, 661, 407]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_135 = [tmp_132, tmp_133, tmp_134, new Int32Array([1228, 744, 511, 315])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_136 = new Int32Array([3057, 1853, 1273, 784]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_137 = new Int32Array([2395, 1451, 997, 614]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_138 = new Int32Array([1718, 1041, 715, 440]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_139 = [tmp_136, tmp_137, tmp_138, new Int32Array([1286, 779, 535, 330])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_140 = new Int32Array([3283, 1990, 1367, 842]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_141 = new Int32Array([2544, 1542, 1059, 652]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_142 = new Int32Array([1804, 1094, 751, 462]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_143 = [tmp_140, tmp_141, tmp_142, new Int32Array([1425, 864, 593, 365])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_144 = new Int32Array([3517, 2132, 1465, 902]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_145 = new Int32Array([2701, 1637, 1125, 692]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_146 = new Int32Array([1933, 1172, 805, 496]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_147 = [tmp_144, tmp_145, tmp_146, new Int32Array([1501, 910, 625, 385])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_148 = new Int32Array([3669, 2223, 1528, 940]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_149 = new Int32Array([2857, 1732, 1190, 732]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_150 = new Int32Array([2085, 1263, 868, 534]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_151 = [tmp_148, tmp_149, tmp_150, new Int32Array([1581, 958, 658, 405])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_152 = new Int32Array([3909, 2369, 1628, 1002]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_153 = new Int32Array([3035, 1839, 1264, 778]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_154 = new Int32Array([2181, 1322, 908, 559]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_155 = [tmp_152, tmp_153, tmp_154, new Int32Array([1677, 1016, 698, 430])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_156 = new Int32Array([4158, 2520, 1732, 1066]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_157 = new Int32Array([3289, 1994, 1370, 843]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_158 = new Int32Array([2358, 1429, 982, 604]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_159 = [tmp_156, tmp_157, tmp_158, new Int32Array([1782, 1080, 742, 457])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_160 = new Int32Array([4417, 2677, 1840, 1132]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_161 = new Int32Array([3486, 2113, 1452, 894]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_162 = new Int32Array([2473, 1499, 1030, 634]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_163 = [tmp_160, tmp_161, tmp_162, new Int32Array([1897, 1150, 790, 486])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_164 = new Int32Array([4686, 2840, 1952, 1201]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_165 = new Int32Array([3693, 2238, 1538, 947]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_166 = new Int32Array([2670, 1618, 1112, 684]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_167 = [tmp_164, tmp_165, tmp_166, new Int32Array([2022, 1226, 842, 518])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_168 = new Int32Array([4965, 3009, 2068, 1273]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_169 = new Int32Array([3909, 2369, 1628, 1002]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_170 = new Int32Array([2805, 1700, 1168, 719]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    var tmp_171 = [tmp_168, tmp_169, tmp_170, new Int32Array([2157, 1307, 898, 553])];\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_172 = new Int32Array([5253, 3183, 2188, 1347]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_173 = new Int32Array([4134, 2506, 1722, 1060]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_174 = new Int32Array([2949, 1787, 1228, 756]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    tmp_39.ye_1 = [tmp_43, tmp_47, tmp_51, tmp_55, tmp_59, tmp_63, tmp_67, tmp_71, tmp_75, tmp_79, tmp_83, tmp_87, tmp_91, tmp_95, tmp_99, tmp_103, tmp_107, tmp_111, tmp_115, tmp_119, tmp_123, tmp_127, tmp_131, tmp_135, tmp_139, tmp_143, tmp_147, tmp_151, tmp_155, tmp_159, tmp_163, tmp_167, tmp_171, [tmp_172, tmp_173, tmp_174, new Int32Array([2301, 1394, 958, 590])]];\n    this.ze_1 = 1335;\n    this.af_1 = 7973;\n    this.bf_1 = 21522;\n  }\n  protoOf(QRUtil).cf = function (typeNumber) {\n    return this.xe_1[typeNumber - 1 | 0];\n  };\n  protoOf(QRUtil).dh = function (typeNumber, dataType, errorCorrectionLevel) {\n    return this.ye_1[typeNumber - 1 | 0][errorCorrectionLevel.y_1][dataType.y_1];\n  };\n  protoOf(QRUtil).eh = function (errorCorrectLength) {\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp$ret$0 = new Int32Array([1]);\n    var a = new Polynomial(tmp$ret$0);\n    var inductionVariable = 0;\n    if (inductionVariable < errorCorrectLength)\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        var tmp = a;\n        // Inline function 'kotlin.intArrayOf' call\n        var tmp$ret$1 = new Int32Array([1, QRMath_getInstance().me(i)]);\n        a = tmp.ke(new Polynomial(tmp$ret$1));\n      }\n       while (inductionVariable < errorCorrectLength);\n    return a;\n  };\n  protoOf(QRUtil).lf = function (maskPattern, i, j) {\n    var tmp;\n    switch (maskPattern.y_1) {\n      case 0:\n        tmp = ((i + j | 0) % 2 | 0) === 0;\n        break;\n      case 1:\n        tmp = (i % 2 | 0) === 0;\n        break;\n      case 2:\n        tmp = (j % 3 | 0) === 0;\n        break;\n      case 3:\n        tmp = ((i + j | 0) % 3 | 0) === 0;\n        break;\n      case 4:\n        tmp = (((i / 2 | 0) + (j / 3 | 0) | 0) % 2 | 0) === 0;\n        break;\n      case 5:\n        tmp = ((imul(i, j) % 2 | 0) + (imul(i, j) % 3 | 0) | 0) === 0;\n        break;\n      case 6:\n        tmp = (((imul(i, j) % 2 | 0) + (imul(i, j) % 3 | 0) | 0) % 2 | 0) === 0;\n        break;\n      case 7:\n        tmp = (((imul(i, j) % 3 | 0) + ((i + j | 0) % 2 | 0) | 0) % 2 | 0) === 0;\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    return tmp;\n  };\n  protoOf(QRUtil).fh = function (s) {\n    var tmp;\n    if (isAlphaNum(this, s)) {\n      var tmp_0;\n      if (isNumber_0(this, s)) {\n        tmp_0 = QRCodeDataType_NUMBERS_getInstance();\n      } else {\n        tmp_0 = QRCodeDataType_UPPER_ALPHA_NUM_getInstance();\n      }\n      tmp = tmp_0;\n    } else {\n      tmp = QRCodeDataType_DEFAULT_getInstance();\n    }\n    return tmp;\n  };\n  protoOf(QRUtil).hf = function (data) {\n    var d = data << 10;\n    while ((getBCHDigit(this, d) - getBCHDigit(this, 1335) | 0) >= 0) {\n      d = d ^ 1335 << (getBCHDigit(this, d) - getBCHDigit(this, 1335) | 0);\n    }\n    return (data << 10 | d) ^ 21522;\n  };\n  protoOf(QRUtil).jf = function (data) {\n    var d = data << 12;\n    while ((getBCHDigit(this, d) - getBCHDigit(this, 7973) | 0) >= 0) {\n      d = d ^ 7973 << (getBCHDigit(this, d) - getBCHDigit(this, 7973) | 0);\n    }\n    return data << 12 | d;\n  };\n  var QRUtil_instance;\n  function QRUtil_getInstance() {\n    if (QRUtil_instance == null)\n      new QRUtil();\n    return QRUtil_instance;\n  }\n  function Companion_8() {\n    Companion_instance_8 = this;\n    var tmp = this;\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_0 = new Int32Array([1, 26, 19]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_1 = new Int32Array([1, 26, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_2 = new Int32Array([1, 26, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_3 = new Int32Array([1, 26, 9]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_4 = new Int32Array([1, 44, 34]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_5 = new Int32Array([1, 44, 28]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_6 = new Int32Array([1, 44, 22]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_7 = new Int32Array([1, 44, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_8 = new Int32Array([1, 70, 55]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_9 = new Int32Array([1, 70, 44]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_10 = new Int32Array([2, 35, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_11 = new Int32Array([2, 35, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_12 = new Int32Array([1, 100, 80]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_13 = new Int32Array([2, 50, 32]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_14 = new Int32Array([2, 50, 24]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_15 = new Int32Array([4, 25, 9]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_16 = new Int32Array([1, 134, 108]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_17 = new Int32Array([2, 67, 43]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_18 = new Int32Array([2, 33, 15, 2, 34, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_19 = new Int32Array([2, 33, 11, 2, 34, 12]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_20 = new Int32Array([2, 86, 68]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_21 = new Int32Array([4, 43, 27]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_22 = new Int32Array([4, 43, 19]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_23 = new Int32Array([4, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_24 = new Int32Array([2, 98, 78]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_25 = new Int32Array([4, 49, 31]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_26 = new Int32Array([2, 32, 14, 4, 33, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_27 = new Int32Array([4, 39, 13, 1, 40, 14]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_28 = new Int32Array([2, 121, 97]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_29 = new Int32Array([2, 60, 38, 2, 61, 39]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_30 = new Int32Array([4, 40, 18, 2, 41, 19]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_31 = new Int32Array([4, 40, 14, 2, 41, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_32 = new Int32Array([2, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_33 = new Int32Array([3, 58, 36, 2, 59, 37]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_34 = new Int32Array([4, 36, 16, 4, 37, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_35 = new Int32Array([4, 36, 12, 4, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_36 = new Int32Array([2, 86, 68, 2, 87, 69]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_37 = new Int32Array([4, 69, 43, 1, 70, 44]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_38 = new Int32Array([6, 43, 19, 2, 44, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_39 = new Int32Array([6, 43, 15, 2, 44, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_40 = new Int32Array([4, 101, 81]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_41 = new Int32Array([1, 80, 50, 4, 81, 51]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_42 = new Int32Array([4, 50, 22, 4, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_43 = new Int32Array([3, 36, 12, 8, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_44 = new Int32Array([2, 116, 92, 2, 117, 93]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_45 = new Int32Array([6, 58, 36, 2, 59, 37]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_46 = new Int32Array([4, 46, 20, 6, 47, 21]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_47 = new Int32Array([7, 42, 14, 4, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_48 = new Int32Array([4, 133, 107]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_49 = new Int32Array([8, 59, 37, 1, 60, 38]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_50 = new Int32Array([8, 44, 20, 4, 45, 21]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_51 = new Int32Array([12, 33, 11, 4, 34, 12]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_52 = new Int32Array([3, 145, 115, 1, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_53 = new Int32Array([4, 64, 40, 5, 65, 41]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_54 = new Int32Array([11, 36, 16, 5, 37, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_55 = new Int32Array([11, 36, 12, 5, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_56 = new Int32Array([5, 109, 87, 1, 110, 88]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_57 = new Int32Array([5, 65, 41, 5, 66, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_58 = new Int32Array([5, 54, 24, 7, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_59 = new Int32Array([11, 36, 12, 7, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_60 = new Int32Array([5, 122, 98, 1, 123, 99]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_61 = new Int32Array([7, 73, 45, 3, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_62 = new Int32Array([15, 43, 19, 2, 44, 20]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_63 = new Int32Array([3, 45, 15, 13, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_64 = new Int32Array([1, 135, 107, 5, 136, 108]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_65 = new Int32Array([10, 74, 46, 1, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_66 = new Int32Array([1, 50, 22, 15, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_67 = new Int32Array([2, 42, 14, 17, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_68 = new Int32Array([5, 150, 120, 1, 151, 121]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_69 = new Int32Array([9, 69, 43, 4, 70, 44]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_70 = new Int32Array([17, 50, 22, 1, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_71 = new Int32Array([2, 42, 14, 19, 43, 15]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_72 = new Int32Array([3, 141, 113, 4, 142, 114]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_73 = new Int32Array([3, 70, 44, 11, 71, 45]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_74 = new Int32Array([17, 47, 21, 4, 48, 22]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_75 = new Int32Array([9, 39, 13, 16, 40, 14]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_76 = new Int32Array([3, 135, 107, 5, 136, 108]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_77 = new Int32Array([3, 67, 41, 13, 68, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_78 = new Int32Array([15, 54, 24, 5, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_79 = new Int32Array([15, 43, 15, 10, 44, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_80 = new Int32Array([4, 144, 116, 4, 145, 117]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_81 = new Int32Array([17, 68, 42]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_82 = new Int32Array([17, 50, 22, 6, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_83 = new Int32Array([19, 46, 16, 6, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_84 = new Int32Array([2, 139, 111, 7, 140, 112]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_85 = new Int32Array([17, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_86 = new Int32Array([7, 54, 24, 16, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_87 = new Int32Array([34, 37, 13]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_88 = new Int32Array([4, 151, 121, 5, 152, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_89 = new Int32Array([4, 75, 47, 14, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_90 = new Int32Array([11, 54, 24, 14, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_91 = new Int32Array([16, 45, 15, 14, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_92 = new Int32Array([6, 147, 117, 4, 148, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_93 = new Int32Array([6, 73, 45, 14, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_94 = new Int32Array([11, 54, 24, 16, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_95 = new Int32Array([30, 46, 16, 2, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_96 = new Int32Array([8, 132, 106, 4, 133, 107]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_97 = new Int32Array([8, 75, 47, 13, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_98 = new Int32Array([7, 54, 24, 22, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_99 = new Int32Array([22, 45, 15, 13, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_100 = new Int32Array([10, 142, 114, 2, 143, 115]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_101 = new Int32Array([19, 74, 46, 4, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_102 = new Int32Array([28, 50, 22, 6, 51, 23]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_103 = new Int32Array([33, 46, 16, 4, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_104 = new Int32Array([8, 152, 122, 4, 153, 123]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_105 = new Int32Array([22, 73, 45, 3, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_106 = new Int32Array([8, 53, 23, 26, 54, 24]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_107 = new Int32Array([12, 45, 15, 28, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_108 = new Int32Array([3, 147, 117, 10, 148, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_109 = new Int32Array([3, 73, 45, 23, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_110 = new Int32Array([4, 54, 24, 31, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_111 = new Int32Array([11, 45, 15, 31, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_112 = new Int32Array([7, 146, 116, 7, 147, 117]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_113 = new Int32Array([21, 73, 45, 7, 74, 46]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_114 = new Int32Array([1, 53, 23, 37, 54, 24]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_115 = new Int32Array([19, 45, 15, 26, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_116 = new Int32Array([5, 145, 115, 10, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_117 = new Int32Array([19, 75, 47, 10, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_118 = new Int32Array([15, 54, 24, 25, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_119 = new Int32Array([23, 45, 15, 25, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_120 = new Int32Array([13, 145, 115, 3, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_121 = new Int32Array([2, 74, 46, 29, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_122 = new Int32Array([42, 54, 24, 1, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_123 = new Int32Array([23, 45, 15, 28, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_124 = new Int32Array([17, 145, 115]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_125 = new Int32Array([10, 74, 46, 23, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_126 = new Int32Array([10, 54, 24, 35, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_127 = new Int32Array([19, 45, 15, 35, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_128 = new Int32Array([17, 145, 115, 1, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_129 = new Int32Array([14, 74, 46, 21, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_130 = new Int32Array([29, 54, 24, 19, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_131 = new Int32Array([11, 45, 15, 46, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_132 = new Int32Array([13, 145, 115, 6, 146, 116]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_133 = new Int32Array([14, 74, 46, 23, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_134 = new Int32Array([44, 54, 24, 7, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_135 = new Int32Array([59, 46, 16, 1, 47, 17]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_136 = new Int32Array([12, 151, 121, 7, 152, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_137 = new Int32Array([12, 75, 47, 26, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_138 = new Int32Array([39, 54, 24, 14, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_139 = new Int32Array([22, 45, 15, 41, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_140 = new Int32Array([6, 151, 121, 14, 152, 122]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_141 = new Int32Array([6, 75, 47, 34, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_142 = new Int32Array([46, 54, 24, 10, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_143 = new Int32Array([2, 45, 15, 64, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_144 = new Int32Array([17, 152, 122, 4, 153, 123]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_145 = new Int32Array([29, 74, 46, 14, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_146 = new Int32Array([49, 54, 24, 10, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_147 = new Int32Array([24, 45, 15, 46, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_148 = new Int32Array([4, 152, 122, 18, 153, 123]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_149 = new Int32Array([13, 74, 46, 32, 75, 47]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_150 = new Int32Array([48, 54, 24, 14, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_151 = new Int32Array([42, 45, 15, 32, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_152 = new Int32Array([20, 147, 117, 4, 148, 118]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_153 = new Int32Array([40, 75, 47, 7, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_154 = new Int32Array([43, 54, 24, 22, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_155 = new Int32Array([10, 45, 15, 67, 46, 16]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_156 = new Int32Array([19, 148, 118, 6, 149, 119]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_157 = new Int32Array([18, 75, 47, 31, 76, 48]);\n    // Inline function 'kotlin.intArrayOf' call\n    var tmp_158 = new Int32Array([34, 54, 24, 34, 55, 25]);\n    // Inline function 'kotlin.intArrayOf' call\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    tmp.gh_1 = [tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, tmp_11, tmp_12, tmp_13, tmp_14, tmp_15, tmp_16, tmp_17, tmp_18, tmp_19, tmp_20, tmp_21, tmp_22, tmp_23, tmp_24, tmp_25, tmp_26, tmp_27, tmp_28, tmp_29, tmp_30, tmp_31, tmp_32, tmp_33, tmp_34, tmp_35, tmp_36, tmp_37, tmp_38, tmp_39, tmp_40, tmp_41, tmp_42, tmp_43, tmp_44, tmp_45, tmp_46, tmp_47, tmp_48, tmp_49, tmp_50, tmp_51, tmp_52, tmp_53, tmp_54, tmp_55, tmp_56, tmp_57, tmp_58, tmp_59, tmp_60, tmp_61, tmp_62, tmp_63, tmp_64, tmp_65, tmp_66, tmp_67, tmp_68, tmp_69, tmp_70, tmp_71, tmp_72, tmp_73, tmp_74, tmp_75, tmp_76, tmp_77, tmp_78, tmp_79, tmp_80, tmp_81, tmp_82, tmp_83, tmp_84, tmp_85, tmp_86, tmp_87, tmp_88, tmp_89, tmp_90, tmp_91, tmp_92, tmp_93, tmp_94, tmp_95, tmp_96, tmp_97, tmp_98, tmp_99, tmp_100, tmp_101, tmp_102, tmp_103, tmp_104, tmp_105, tmp_106, tmp_107, tmp_108, tmp_109, tmp_110, tmp_111, tmp_112, tmp_113, tmp_114, tmp_115, tmp_116, tmp_117, tmp_118, tmp_119, tmp_120, tmp_121, tmp_122, tmp_123, tmp_124, tmp_125, tmp_126, tmp_127, tmp_128, tmp_129, tmp_130, tmp_131, tmp_132, tmp_133, tmp_134, tmp_135, tmp_136, tmp_137, tmp_138, tmp_139, tmp_140, tmp_141, tmp_142, tmp_143, tmp_144, tmp_145, tmp_146, tmp_147, tmp_148, tmp_149, tmp_150, tmp_151, tmp_152, tmp_153, tmp_154, tmp_155, tmp_156, tmp_157, tmp_158, new Int32Array([20, 45, 15, 61, 46, 16])];\n  }\n  protoOf(Companion_8).hh = function (typeNumber, errorCorrectionLevel) {\n    // Inline function 'kotlin.let' call\n    var rsBlock = this.gh_1[imul(typeNumber - 1 | 0, 4) + errorCorrectionLevel.y_1 | 0];\n    var tmp;\n    if (rsBlock.length === 3) {\n      var block = new RSBlock(rsBlock[1], rsBlock[2]);\n      var tmp_0 = 0;\n      var tmp_1 = rsBlock[0];\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_2 = Array(tmp_1);\n      while (tmp_0 < tmp_1) {\n        tmp_2[tmp_0] = block;\n        tmp_0 = tmp_0 + 1 | 0;\n      }\n      tmp = tmp_2;\n    } else {\n      var blocksSize = rsBlock[0] + rsBlock[3] | 0;\n      var firstBlock = new RSBlock(rsBlock[1], rsBlock[2]);\n      var secondBlock = new RSBlock(rsBlock[4], rsBlock[5]);\n      var tmp_3 = 0;\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_4 = Array(blocksSize);\n      while (tmp_3 < blocksSize) {\n        var tmp_5 = tmp_3;\n        var tmp_6;\n        if (tmp_5 < rsBlock[0]) {\n          tmp_6 = firstBlock;\n        } else {\n          tmp_6 = secondBlock;\n        }\n        tmp_4[tmp_5] = tmp_6;\n        tmp_3 = tmp_3 + 1 | 0;\n      }\n      tmp = tmp_4;\n    }\n    return tmp;\n  };\n  var Companion_instance_8;\n  function Companion_getInstance_8() {\n    if (Companion_instance_8 == null)\n      new Companion_8();\n    return Companion_instance_8;\n  }\n  function RSBlock(totalCount, dataCount) {\n    Companion_getInstance_8();\n    this.ih_1 = totalCount;\n    this.jh_1 = dataCount;\n  }\n  protoOf(RSBlock).toString = function () {\n    return 'RSBlock(totalCount=' + this.ih_1 + ', dataCount=' + this.jh_1 + ')';\n  };\n  protoOf(RSBlock).hashCode = function () {\n    var result = this.ih_1;\n    result = imul(result, 31) + this.jh_1 | 0;\n    return result;\n  };\n  protoOf(RSBlock).equals = function (other) {\n    if (this === other)\n      return true;\n    if (!(other instanceof RSBlock))\n      return false;\n    var tmp0_other_with_cast = other instanceof RSBlock ? other : THROW_CCE();\n    if (!(this.ih_1 === tmp0_other_with_cast.ih_1))\n      return false;\n    if (!(this.jh_1 === tmp0_other_with_cast.jh_1))\n      return false;\n    return true;\n  };\n  var ErrorCorrectionLevel_LOW_instance;\n  var ErrorCorrectionLevel_MEDIUM_instance;\n  var ErrorCorrectionLevel_HIGH_instance;\n  var ErrorCorrectionLevel_VERY_HIGH_instance;\n  function values_1() {\n    return [ErrorCorrectionLevel_LOW_getInstance(), ErrorCorrectionLevel_MEDIUM_getInstance(), ErrorCorrectionLevel_HIGH_getInstance(), ErrorCorrectionLevel_VERY_HIGH_getInstance()];\n  }\n  function valueOf_1(value) {\n    switch (value) {\n      case 'LOW':\n        return ErrorCorrectionLevel_LOW_getInstance();\n      case 'MEDIUM':\n        return ErrorCorrectionLevel_MEDIUM_getInstance();\n      case 'HIGH':\n        return ErrorCorrectionLevel_HIGH_getInstance();\n      case 'VERY_HIGH':\n        return ErrorCorrectionLevel_VERY_HIGH_getInstance();\n      default:\n        ErrorCorrectionLevel_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var ErrorCorrectionLevel_entriesInitialized;\n  function ErrorCorrectionLevel_initEntries() {\n    if (ErrorCorrectionLevel_entriesInitialized)\n      return Unit_instance;\n    ErrorCorrectionLevel_entriesInitialized = true;\n    ErrorCorrectionLevel_LOW_instance = new ErrorCorrectionLevel('LOW', 0, 1, 21);\n    ErrorCorrectionLevel_MEDIUM_instance = new ErrorCorrectionLevel('MEDIUM', 1, 0, 25);\n    ErrorCorrectionLevel_HIGH_instance = new ErrorCorrectionLevel('HIGH', 2, 3, 30);\n    ErrorCorrectionLevel_VERY_HIGH_instance = new ErrorCorrectionLevel('VERY_HIGH', 3, 2, 34);\n  }\n  function ErrorCorrectionLevel(name, ordinal, value, maxTypeNum) {\n    Enum.call(this, name, ordinal);\n    this.value = value;\n    this.maxTypeNum = maxTypeNum;\n  }\n  protoOf(ErrorCorrectionLevel).v = function () {\n    return this.value;\n  };\n  protoOf(ErrorCorrectionLevel).kh = function () {\n    return this.maxTypeNum;\n  };\n  var MaskPattern_PATTERN000_instance;\n  var MaskPattern_PATTERN001_instance;\n  var MaskPattern_PATTERN010_instance;\n  var MaskPattern_PATTERN011_instance;\n  var MaskPattern_PATTERN100_instance;\n  var MaskPattern_PATTERN101_instance;\n  var MaskPattern_PATTERN110_instance;\n  var MaskPattern_PATTERN111_instance;\n  function values_2() {\n    return [MaskPattern_PATTERN000_getInstance(), MaskPattern_PATTERN001_getInstance(), MaskPattern_PATTERN010_getInstance(), MaskPattern_PATTERN011_getInstance(), MaskPattern_PATTERN100_getInstance(), MaskPattern_PATTERN101_getInstance(), MaskPattern_PATTERN110_getInstance(), MaskPattern_PATTERN111_getInstance()];\n  }\n  function valueOf_2(value) {\n    switch (value) {\n      case 'PATTERN000':\n        return MaskPattern_PATTERN000_getInstance();\n      case 'PATTERN001':\n        return MaskPattern_PATTERN001_getInstance();\n      case 'PATTERN010':\n        return MaskPattern_PATTERN010_getInstance();\n      case 'PATTERN011':\n        return MaskPattern_PATTERN011_getInstance();\n      case 'PATTERN100':\n        return MaskPattern_PATTERN100_getInstance();\n      case 'PATTERN101':\n        return MaskPattern_PATTERN101_getInstance();\n      case 'PATTERN110':\n        return MaskPattern_PATTERN110_getInstance();\n      case 'PATTERN111':\n        return MaskPattern_PATTERN111_getInstance();\n      default:\n        MaskPattern_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var MaskPattern_entriesInitialized;\n  function MaskPattern_initEntries() {\n    if (MaskPattern_entriesInitialized)\n      return Unit_instance;\n    MaskPattern_entriesInitialized = true;\n    MaskPattern_PATTERN000_instance = new MaskPattern('PATTERN000', 0);\n    MaskPattern_PATTERN001_instance = new MaskPattern('PATTERN001', 1);\n    MaskPattern_PATTERN010_instance = new MaskPattern('PATTERN010', 2);\n    MaskPattern_PATTERN011_instance = new MaskPattern('PATTERN011', 3);\n    MaskPattern_PATTERN100_instance = new MaskPattern('PATTERN100', 4);\n    MaskPattern_PATTERN101_instance = new MaskPattern('PATTERN101', 5);\n    MaskPattern_PATTERN110_instance = new MaskPattern('PATTERN110', 6);\n    MaskPattern_PATTERN111_instance = new MaskPattern('PATTERN111', 7);\n  }\n  function MaskPattern(name, ordinal) {\n    Enum.call(this, name, ordinal);\n  }\n  var QRCodeDataType_NUMBERS_instance;\n  var QRCodeDataType_UPPER_ALPHA_NUM_instance;\n  var QRCodeDataType_DEFAULT_instance;\n  function values_3() {\n    return [QRCodeDataType_NUMBERS_getInstance(), QRCodeDataType_UPPER_ALPHA_NUM_getInstance(), QRCodeDataType_DEFAULT_getInstance()];\n  }\n  function valueOf_3(value) {\n    switch (value) {\n      case 'NUMBERS':\n        return QRCodeDataType_NUMBERS_getInstance();\n      case 'UPPER_ALPHA_NUM':\n        return QRCodeDataType_UPPER_ALPHA_NUM_getInstance();\n      case 'DEFAULT':\n        return QRCodeDataType_DEFAULT_getInstance();\n      default:\n        QRCodeDataType_initEntries();\n        THROW_IAE('No enum constant value.');\n        break;\n    }\n  }\n  var QRCodeDataType_entriesInitialized;\n  function QRCodeDataType_initEntries() {\n    if (QRCodeDataType_entriesInitialized)\n      return Unit_instance;\n    QRCodeDataType_entriesInitialized = true;\n    QRCodeDataType_NUMBERS_instance = new QRCodeDataType('NUMBERS', 0, 1);\n    QRCodeDataType_UPPER_ALPHA_NUM_instance = new QRCodeDataType('UPPER_ALPHA_NUM', 1, 2);\n    QRCodeDataType_DEFAULT_instance = new QRCodeDataType('DEFAULT', 2, 4);\n  }\n  function QRCodeDataType(name, ordinal, value) {\n    Enum.call(this, name, ordinal);\n    this.value = value;\n  }\n  protoOf(QRCodeDataType).v = function () {\n    return this.value;\n  };\n  function ErrorCorrectionLevel_LOW_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_LOW_instance;\n  }\n  function ErrorCorrectionLevel_MEDIUM_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_MEDIUM_instance;\n  }\n  function ErrorCorrectionLevel_HIGH_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_HIGH_instance;\n  }\n  function ErrorCorrectionLevel_VERY_HIGH_getInstance() {\n    ErrorCorrectionLevel_initEntries();\n    return ErrorCorrectionLevel_VERY_HIGH_instance;\n  }\n  function MaskPattern_PATTERN000_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN000_instance;\n  }\n  function MaskPattern_PATTERN001_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN001_instance;\n  }\n  function MaskPattern_PATTERN010_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN010_instance;\n  }\n  function MaskPattern_PATTERN011_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN011_instance;\n  }\n  function MaskPattern_PATTERN100_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN100_instance;\n  }\n  function MaskPattern_PATTERN101_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN101_instance;\n  }\n  function MaskPattern_PATTERN110_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN110_instance;\n  }\n  function MaskPattern_PATTERN111_getInstance() {\n    MaskPattern_initEntries();\n    return MaskPattern_PATTERN111_instance;\n  }\n  function QRCodeDataType_NUMBERS_getInstance() {\n    QRCodeDataType_initEntries();\n    return QRCodeDataType_NUMBERS_instance;\n  }\n  function QRCodeDataType_UPPER_ALPHA_NUM_getInstance() {\n    QRCodeDataType_initEntries();\n    return QRCodeDataType_UPPER_ALPHA_NUM_instance;\n  }\n  function QRCodeDataType_DEFAULT_getInstance() {\n    QRCodeDataType_initEntries();\n    return QRCodeDataType_DEFAULT_instance;\n  }\n  function Companion_9() {\n    this.DEFAULT_CELL_SIZE = 25;\n    this.ph_1 = 236;\n    this.qh_1 = 17;\n    this.MAXIMUM_INFO_DENSITY = 40;\n  }\n  protoOf(Companion_9).rh = function () {\n    return this.DEFAULT_CELL_SIZE;\n  };\n  protoOf(Companion_9).sh = function () {\n    return this.MAXIMUM_INFO_DENSITY;\n  };\n  protoOf(Companion_9).th = function (data, errorCorrectionLevel, dataType) {\n    var tmp;\n    switch (dataType.y_1) {\n      case 0:\n        tmp = new QRNumber(data);\n        break;\n      case 1:\n        tmp = new QRAlphaNum(data);\n        break;\n      case 2:\n        tmp = new QR8BitByte(data);\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    var qrCodeData = tmp;\n    var dataLength = qrCodeData.tg();\n    var inductionVariable = 1;\n    var last = errorCorrectionLevel.maxTypeNum;\n    if (inductionVariable < last)\n      do {\n        var typeNum = inductionVariable;\n        inductionVariable = inductionVariable + 1 | 0;\n        if (dataLength <= QRUtil_getInstance().dh(typeNum, dataType, errorCorrectionLevel)) {\n          return typeNum;\n        }\n      }\n       while (inductionVariable < last);\n    return 40;\n  };\n  protoOf(Companion_9).infoDensityForDataAndECL = function (data, errorCorrectionLevel, dataType, $super) {\n    dataType = dataType === VOID ? QRUtil_getInstance().fh(data) : dataType;\n    return $super === VOID ? this.th(data, errorCorrectionLevel, dataType) : $super.th.call(this, data, errorCorrectionLevel, dataType);\n  };\n  var Companion_instance_9;\n  function Companion_getInstance_9() {\n    return Companion_instance_9;\n  }\n  function createData($this, type) {\n    var rsBlocks = Companion_getInstance_8().hh(type, $this.vh_1);\n    var buffer = new BitBuffer();\n    buffer.he($this.xh_1.rg_1.value, 4);\n    buffer.he($this.xh_1.tg(), $this.xh_1.vg(type));\n    $this.xh_1.ug(buffer);\n    // Inline function 'kotlin.collections.sumOf' call\n    var sum = 0;\n    var inductionVariable = 0;\n    var last = rsBlocks.length;\n    while (inductionVariable < last) {\n      var element = rsBlocks[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      var tmp = sum;\n      sum = tmp + element.jh_1 | 0;\n    }\n    var tmp$ret$1 = sum;\n    var totalDataCount = imul(tmp$ret$1, 8);\n    if (buffer.fe_1 > totalDataCount) {\n      var errorMessage = 'Insufficient Information Density Parameter: ' + type + ' [neededBits=' + buffer.fe_1 + ', maximumBitsForDensityLevel=' + totalDataCount + '] - Try increasing the Information Density parameter value or use 0 (zero) to automatically compute the least amount needed to fit the QRCode data being encoded.';\n      throw new InsufficientInformationDensityException(errorMessage);\n    }\n    if ((buffer.fe_1 + 4 | 0) <= totalDataCount) {\n      buffer.he(0, 4);\n    }\n    while (!((buffer.fe_1 % 8 | 0) === 0)) {\n      buffer.putBit(false);\n    }\n    $l$loop_0: while (buffer.fe_1 < totalDataCount) {\n      buffer.he(236, 8);\n      if (buffer.fe_1 >= totalDataCount) {\n        break $l$loop_0;\n      }\n      buffer.he(17, 8);\n    }\n    return createBytes($this, buffer, rsBlocks);\n  }\n  function createBytes($this, buffer, rsBlocks) {\n    var offset = {_v: 0};\n    var maxDcCount = 0;\n    var maxEcCount = 0;\n    var totalCodeCount = 0;\n    var tmp = 0;\n    var tmp_0 = rsBlocks.length;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_1 = Array(tmp_0);\n    while (tmp < tmp_0) {\n      tmp_1[tmp] = new Int32Array(0);\n      tmp = tmp + 1 | 0;\n    }\n    var dcData = tmp_1;\n    var tmp_2 = 0;\n    var tmp_3 = rsBlocks.length;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_4 = Array(tmp_3);\n    while (tmp_2 < tmp_3) {\n      tmp_4[tmp_2] = new Int32Array(0);\n      tmp_2 = tmp_2 + 1 | 0;\n    }\n    var ecData = tmp_4;\n    // Inline function 'kotlin.collections.forEachIndexed' call\n    var index = 0;\n    var inductionVariable = 0;\n    var last = rsBlocks.length;\n    while (inductionVariable < last) {\n      var item = rsBlocks[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      var _unary__edvuaz = index;\n      index = _unary__edvuaz + 1 | 0;\n      var dcCount = item.jh_1;\n      var ecCount = item.ih_1 - dcCount | 0;\n      totalCodeCount = totalCodeCount + item.ih_1 | 0;\n      maxDcCount = coerceAtLeast(maxDcCount, dcCount);\n      maxEcCount = coerceAtLeast(maxEcCount, ecCount);\n      var tmp_5 = 0;\n      var tmp_6 = new Int32Array(dcCount);\n      while (tmp_5 < dcCount) {\n        var tmp_7 = tmp_5;\n        tmp_6[tmp_7] = 255 & buffer.ee_1[tmp_7 + offset._v | 0];\n        tmp_5 = tmp_5 + 1 | 0;\n      }\n      dcData[_unary__edvuaz] = tmp_6;\n      offset._v = offset._v + dcCount | 0;\n      var rsPoly = QRUtil_getInstance().eh(ecCount);\n      var rawPoly = new Polynomial(dcData[_unary__edvuaz], rsPoly.je() - 1 | 0);\n      var modPoly = rawPoly.ne(rsPoly);\n      var ecDataSize = rsPoly.je() - 1 | 0;\n      var tmp_8 = 0;\n      var tmp_9 = new Int32Array(ecDataSize);\n      while (tmp_8 < ecDataSize) {\n        var tmp_10 = tmp_8;\n        var modIndex = (tmp_10 + modPoly.je() | 0) - ecDataSize | 0;\n        tmp_9[tmp_10] = modIndex >= 0 ? modPoly.i(modIndex) : 0;\n        tmp_8 = tmp_8 + 1 | 0;\n      }\n      ecData[_unary__edvuaz] = tmp_9;\n    }\n    var index_0 = 0;\n    var data = new Int32Array(totalCodeCount);\n    var inductionVariable_0 = 0;\n    var last_0 = maxDcCount;\n    if (inductionVariable_0 < last_0)\n      do {\n        var i = inductionVariable_0;\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        var inductionVariable_1 = 0;\n        var last_1 = rsBlocks.length - 1 | 0;\n        if (inductionVariable_1 <= last_1)\n          do {\n            var r = inductionVariable_1;\n            inductionVariable_1 = inductionVariable_1 + 1 | 0;\n            if (i < dcData[r].length) {\n              var _unary__edvuaz_0 = index_0;\n              index_0 = _unary__edvuaz_0 + 1 | 0;\n              data[_unary__edvuaz_0] = dcData[r][i];\n            }\n          }\n           while (inductionVariable_1 <= last_1);\n      }\n       while (inductionVariable_0 < last_0);\n    var inductionVariable_2 = 0;\n    var last_2 = maxEcCount;\n    if (inductionVariable_2 < last_2)\n      do {\n        var i_0 = inductionVariable_2;\n        inductionVariable_2 = inductionVariable_2 + 1 | 0;\n        var inductionVariable_3 = 0;\n        var last_3 = rsBlocks.length - 1 | 0;\n        if (inductionVariable_3 <= last_3)\n          do {\n            var r_0 = inductionVariable_3;\n            inductionVariable_3 = inductionVariable_3 + 1 | 0;\n            if (i_0 < ecData[r_0].length) {\n              var _unary__edvuaz_1 = index_0;\n              index_0 = _unary__edvuaz_1 + 1 | 0;\n              data[_unary__edvuaz_1] = ecData[r_0][i_0];\n            }\n          }\n           while (inductionVariable_3 <= last_3);\n      }\n       while (inductionVariable_2 < last_2);\n    return data;\n  }\n  function QRCodeProcessor$render$lambda($cellSize, $darkColor, $brightColor) {\n    return function (x, y, cellData, graphics) {\n      var tmp;\n      if (cellData.dark) {\n        graphics.fillRect(x, y, $cellSize, $cellSize, $darkColor);\n        tmp = Unit_instance;\n      } else {\n        graphics.fillRect(x, y, $cellSize, $cellSize, $brightColor);\n        tmp = Unit_instance;\n      }\n      return Unit_instance;\n    };\n  }\n  function QRCodeProcessor(data, errorCorrectionLevel, dataType, graphicsFactory) {\n    errorCorrectionLevel = errorCorrectionLevel === VOID ? ErrorCorrectionLevel_MEDIUM_getInstance() : errorCorrectionLevel;\n    dataType = dataType === VOID ? QRUtil_getInstance().fh(data) : dataType;\n    graphicsFactory = graphicsFactory === VOID ? new QRCodeGraphicsFactory() : graphicsFactory;\n    this.uh_1 = data;\n    this.vh_1 = errorCorrectionLevel;\n    this.wh_1 = dataType;\n    this.graphicsFactory = graphicsFactory;\n    var tmp = this;\n    var tmp_0;\n    switch (this.wh_1.y_1) {\n      case 0:\n        tmp_0 = new QRNumber(this.uh_1);\n        break;\n      case 1:\n        tmp_0 = new QRAlphaNum(this.uh_1);\n        break;\n      case 2:\n        tmp_0 = new QR8BitByte(this.uh_1);\n        break;\n      default:\n        noWhenBranchMatchedException();\n        break;\n    }\n    tmp.xh_1 = tmp_0;\n  }\n  protoOf(QRCodeProcessor).j6 = function () {\n    return this.graphicsFactory;\n  };\n  protoOf(QRCodeProcessor).yh = function (cellSize, rawData) {\n    return this.computeImageSize(cellSize, rawData.length);\n  };\n  protoOf(QRCodeProcessor).computeImageSizeFromRawData = function (cellSize, rawData, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    rawData = rawData === VOID ? this.encode() : rawData;\n    return $super === VOID ? this.yh(cellSize, rawData) : $super.yh.call(this, cellSize, rawData);\n  };\n  protoOf(QRCodeProcessor).zh = function (cellSize, size) {\n    return imul(size, cellSize);\n  };\n  protoOf(QRCodeProcessor).computeImageSize = function (cellSize, size, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    return $super === VOID ? this.zh(cellSize, size) : $super.zh.call(this, cellSize, size);\n  };\n  protoOf(QRCodeProcessor).ai = function (cellSize, brightColor, darkColor) {\n    return this.renderComputed(cellSize, this.encode(), VOID, brightColor, darkColor);\n  };\n  protoOf(QRCodeProcessor).render = function (cellSize, brightColor, darkColor, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    brightColor = brightColor === VOID ? -1 : brightColor;\n    darkColor = darkColor === VOID ? -16777216 : darkColor;\n    return $super === VOID ? this.ai(cellSize, brightColor, darkColor) : $super.ai.call(this, cellSize, brightColor, darkColor);\n  };\n  protoOf(QRCodeProcessor).bi = function (cellSize, rawData, qrCodeGraphics, brightColor, darkColor) {\n    return this.renderShaded(cellSize, rawData, qrCodeGraphics, QRCodeProcessor$render$lambda(cellSize, darkColor, brightColor));\n  };\n  protoOf(QRCodeProcessor).renderComputed = function (cellSize, rawData, qrCodeGraphics, brightColor, darkColor, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    rawData = rawData === VOID ? this.encode() : rawData;\n    qrCodeGraphics = qrCodeGraphics === VOID ? this.graphicsFactory.newGraphicsSquare(this.computeImageSizeFromRawData(cellSize, rawData)) : qrCodeGraphics;\n    brightColor = brightColor === VOID ? -1 : brightColor;\n    darkColor = darkColor === VOID ? -16777216 : darkColor;\n    return $super === VOID ? this.bi(cellSize, rawData, qrCodeGraphics, brightColor, darkColor) : $super.bi.call(this, cellSize, rawData, qrCodeGraphics, brightColor, darkColor);\n  };\n  protoOf(QRCodeProcessor).ci = function (cellSize, rawData, qrCodeGraphics, renderer) {\n    // Inline function 'kotlin.collections.forEach' call\n    var inductionVariable = 0;\n    var last = rawData.length;\n    while (inductionVariable < last) {\n      var element = rawData[inductionVariable];\n      inductionVariable = inductionVariable + 1 | 0;\n      // Inline function 'kotlin.collections.forEach' call\n      var inductionVariable_0 = 0;\n      var last_0 = element.length;\n      while (inductionVariable_0 < last_0) {\n        var element_0 = element[inductionVariable_0];\n        inductionVariable_0 = inductionVariable_0 + 1 | 0;\n        if (!element_0.rendered) {\n          renderer(element_0.absoluteX(cellSize), element_0.absoluteY(cellSize), element_0, qrCodeGraphics);\n          element_0.rendered = true;\n        }\n      }\n    }\n    return qrCodeGraphics;\n  };\n  protoOf(QRCodeProcessor).renderShaded = function (cellSize, rawData, qrCodeGraphics, renderer, $super) {\n    cellSize = cellSize === VOID ? 25 : cellSize;\n    rawData = rawData === VOID ? this.encode() : rawData;\n    qrCodeGraphics = qrCodeGraphics === VOID ? this.graphicsFactory.newGraphicsSquare(this.computeImageSizeFromRawData(cellSize, rawData)) : qrCodeGraphics;\n    return $super === VOID ? this.ci(cellSize, rawData, qrCodeGraphics, renderer) : $super.ci.call(this, cellSize, rawData, qrCodeGraphics, renderer);\n  };\n  protoOf(QRCodeProcessor).di = function (type, maskPattern) {\n    var moduleCount = imul(type, 4) + 17 | 0;\n    var tmp = 0;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_0 = Array(moduleCount);\n    while (tmp < moduleCount) {\n      var tmp_1 = tmp;\n      var tmp_2 = 0;\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_3 = Array(moduleCount);\n      while (tmp_2 < moduleCount) {\n        tmp_3[tmp_2] = null;\n        tmp_2 = tmp_2 + 1 | 0;\n      }\n      tmp_0[tmp_1] = tmp_3;\n      tmp = tmp + 1 | 0;\n    }\n    var modules = tmp_0;\n    QRCodeSetup_instance.re(modules);\n    QRCodeSetup_instance.te(modules);\n    QRCodeSetup_instance.ve(modules);\n    QRCodeSetup_instance.we(type, modules);\n    QRCodeSetup_instance.df(moduleCount, modules);\n    QRCodeSetup_instance.ef(this.vh_1, maskPattern, moduleCount, modules);\n    if (type >= 7) {\n      QRCodeSetup_instance.if(type, moduleCount, modules);\n    }\n    var data = createData(this, type);\n    QRCodeSetup_instance.kf(data, maskPattern, moduleCount, modules);\n    var tmp_4 = 0;\n    // Inline function 'kotlin.arrayOfNulls' call\n    var tmp_5 = Array(moduleCount);\n    while (tmp_4 < moduleCount) {\n      var tmp_6 = tmp_4;\n      var tmp_7 = 0;\n      // Inline function 'kotlin.arrayOfNulls' call\n      var tmp_8 = Array(moduleCount);\n      while (tmp_7 < moduleCount) {\n        var tmp_9 = tmp_7;\n        var tmp0_elvis_lhs = modules[tmp_6][tmp_9];\n        tmp_8[tmp_9] = tmp0_elvis_lhs == null ? new QRCodeSquare(false, tmp_6, tmp_9, moduleCount) : tmp0_elvis_lhs;\n        tmp_7 = tmp_7 + 1 | 0;\n      }\n      tmp_5[tmp_6] = tmp_8;\n      tmp_4 = tmp_4 + 1 | 0;\n    }\n    return tmp_5;\n  };\n  protoOf(QRCodeProcessor).encode = function (type, maskPattern, $super) {\n    type = type === VOID ? Companion_instance_9.infoDensityForDataAndECL(this.uh_1, this.vh_1) : type;\n    maskPattern = maskPattern === VOID ? MaskPattern_PATTERN000_getInstance() : maskPattern;\n    return $super === VOID ? this.di(type, maskPattern) : $super.di.call(this, type, maskPattern);\n  };\n  protoOf(QRCodeProcessor).toString = function () {\n    return 'QRCode(data=' + this.uh_1 + (', errorCorrectionLevel=' + this.vh_1.toString()) + (', dataType=' + this.wh_1.toString()) + (', qrCodeData=' + getKClassFromExpression(this.xh_1).s3()) + ')';\n  };\n  function QRCodeGraphicsFactory() {\n  }\n  protoOf(QRCodeGraphicsFactory).newGraphicsSquare = function (size) {\n    return this.newGraphics(size, size);\n  };\n  protoOf(QRCodeGraphicsFactory).newGraphics = function (width, height) {\n    return new QRCodeGraphics(width, height);\n  };\n  function Companion_10() {\n  }\n  protoOf(Companion_10).defaultRadius = function (squareSize) {\n    return roundToInt(squareSize / 1.75);\n  };\n  protoOf(Companion_10).defaultInnerSpace = function (squareSize) {\n    return roundToInt(squareSize * 0.05);\n  };\n  var Companion_instance_10;\n  function Companion_getInstance_10() {\n    return Companion_instance_10;\n  }\n  function CircleShapeFunction(squareSize, innerSpace) {\n    squareSize = squareSize === VOID ? 25 : squareSize;\n    innerSpace = innerSpace === VOID ? Companion_instance_10.defaultInnerSpace(squareSize) : innerSpace;\n    RoundSquaresShapeFunction.call(this, squareSize, squareSize, innerSpace);\n  }\n  function drawSquaresLine($this, x, y, amount, skip, color, canvas) {\n    var progression = step(until(0, amount), skip);\n    var inductionVariable = progression.n_1;\n    var last = progression.o_1;\n    var step_0 = progression.p_1;\n    if (step_0 > 0 && inductionVariable <= last || (step_0 < 0 && last <= inductionVariable))\n      do {\n        var i = inductionVariable;\n        inductionVariable = inductionVariable + step_0 | 0;\n        $this.fillRect((x + imul($this.squareSize, i) | 0) + $this.ei_1 | 0, y + $this.ei_1 | 0, $this.squareSize - imul($this.ei_1, 2) | 0, $this.squareSize - imul($this.ei_1, 2) | 0, color, canvas);\n      }\n       while (!(i === last));\n  }\n  function DefaultShapeFunction(squareSize, innerSpace) {\n    squareSize = squareSize === VOID ? 25 : squareSize;\n    innerSpace = innerSpace === VOID ? 1 : innerSpace;\n    this.innerSpace = innerSpace;\n    this.ei_1 = coerceIn(this.innerSpace, numberRangeToNumber(0, squareSize / 2 | 0));\n    this.squareSize = squareSize;\n  }\n  protoOf(DefaultShapeFunction).fi = function () {\n    return this.innerSpace;\n  };\n  protoOf(DefaultShapeFunction).n6 = function () {\n    return this.squareSize;\n  };\n  protoOf(DefaultShapeFunction).resize = function (newSquareSize) {\n    var sizeRatio = newSquareSize / this.squareSize;\n    this.squareSize = newSquareSize;\n    this.ei_1 = coerceIn(numberToInt(this.innerSpace * sizeRatio), numberRangeToNumber(0, newSquareSize / 2 | 0));\n  };\n  protoOf(DefaultShapeFunction).renderSquare = function (x, y, colorFn, square, canvas, qrCode) {\n    var bg = colorFn.bg(square.row, square.col, qrCode, canvas);\n    var fg = colorFn.fg(square.row, square.col, qrCode, canvas);\n    var color = square.dark ? fg : bg;\n    this.fillRect(x + this.ei_1 | 0, y + this.ei_1 | 0, this.squareSize - imul(this.ei_1, 2) | 0, this.squareSize - imul(this.ei_1, 2) | 0, color, canvas);\n  };\n  protoOf(DefaultShapeFunction).renderControlSquare = function (xOffset, yOffset, colorFn, square, canvas, qrCode) {\n    var tmp0_elvis_lhs = square.parent;\n    var actualSquare = tmp0_elvis_lhs == null ? square : tmp0_elvis_lhs;\n    var bg = colorFn.bg(actualSquare.row, actualSquare.col, qrCode, canvas);\n    var fg = colorFn.fg(actualSquare.row, actualSquare.col, qrCode, canvas);\n    var size = imul(this.squareSize, actualSquare.rowSize);\n    var startX = xOffset + actualSquare.absoluteX(this.squareSize) | 0;\n    var startY = yOffset + actualSquare.absoluteY(this.squareSize) | 0;\n    if (actualSquare.squareInfo.type.y_1 === 0) {\n      canvas.fillRect(startX, startY, size + imul(this.squareSize, 2) | 0, size + imul(this.squareSize, 2) | 0, bg);\n      this.drawRect(startX + this.ei_1 | 0, startY + this.ei_1 | 0, size - imul(this.ei_1, 2) | 0, size - imul(this.ei_1, 2) | 0, fg, this.squareSize, canvas);\n      this.fillRect(startX + imul(this.squareSize, 2) | 0, startY + imul(this.squareSize, 2) | 0, size - imul(this.squareSize, 4) | 0, size - imul(this.squareSize, 4) | 0, fg, canvas);\n    } else {\n      canvas.fillRect(startX, startY, size, size, bg);\n      drawSquaresLine(this, startX, startY, 5, 1, fg, canvas);\n      drawSquaresLine(this, startX, startY + this.squareSize | 0, 5, 4, fg, canvas);\n      drawSquaresLine(this, startX, startY + imul(this.squareSize, 2) | 0, 5, 2, fg, canvas);\n      drawSquaresLine(this, startX, startY + imul(this.squareSize, 3) | 0, 5, 4, fg, canvas);\n      drawSquaresLine(this, startX, startY + imul(this.squareSize, 4) | 0, 5, 1, fg, canvas);\n    }\n  };\n  protoOf(DefaultShapeFunction).fillRect = function (x, y, width, height, color, canvas) {\n    canvas.fillRect(x, y, width, height, color);\n  };\n  protoOf(DefaultShapeFunction).drawRect = function (x, y, width, height, color, thickness, canvas) {\n    canvas.drawRect(x, y, width, height, color, thickness);\n  };\n  function QRCodeShapeFunction() {\n  }\n  function Companion_11() {\n  }\n  protoOf(Companion_11).defaultRadius = function (squareSize) {\n    return roundToInt(squareSize / 1.75);\n  };\n  protoOf(Companion_11).defaultInnerSpace = function (squareSize) {\n    return roundToInt(squareSize * 0.05);\n  };\n  var Companion_instance_11;\n  function Companion_getInstance_11() {\n    return Companion_instance_11;\n  }\n  function RoundSquaresShapeFunction(squareSize, radius, innerSpace) {\n    squareSize = squareSize === VOID ? 25 : squareSize;\n    radius = radius === VOID ? Companion_instance_11.defaultRadius(squareSize) : radius;\n    innerSpace = innerSpace === VOID ? Companion_instance_11.defaultInnerSpace(squareSize) : innerSpace;\n    DefaultShapeFunction.call(this, squareSize, innerSpace);\n    this.hi_1 = radius;\n  }\n  protoOf(RoundSquaresShapeFunction).fillRect = function (x, y, width, height, color, canvas) {\n    canvas.fillRoundRect(x, y, width, height, this.hi_1, color);\n  };\n  protoOf(RoundSquaresShapeFunction).drawRect = function (x, y, width, height, color, thickness, canvas) {\n    canvas.drawRoundRect(x, y, width, height, this.hi_1, color, thickness);\n  };\n  function Companion_12() {\n    this.ii_1 = 'Canvas seems to not be supported :(';\n    this.ji_1 = 6.283185307179586;\n  }\n  var Companion_instance_12;\n  function Companion_getInstance_12() {\n    return Companion_instance_12;\n  }\n  function rgba($this, color) {\n    var r = color >> 16 & 255;\n    var g = color >> 8 & 255;\n    var b = color >> 0 & 255;\n    var a = (color >> 24 & 255) / 255.0;\n    return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n  }\n  function draw_0($this, color, action) {\n    $this.li_1 = true;\n    var context = tryGet($this, QRCodeGraphics$draw$lambda($this));\n    var colorString = rgba($this, color);\n    context.fillStyle = colorString;\n    context.strokeStyle = colorString;\n    var lineWidth = context.lineWidth;\n    action(context);\n    context.lineWidth = lineWidth;\n  }\n  function tryGet($this, what) {\n    var tmp;\n    try {\n      tmp = what();\n    } catch ($p) {\n      var tmp_0;\n      if ($p instanceof Error) {\n        var t = $p;\n        throw Error_init_$Create$_0('Canvas seems to not be supported :(', t);\n      } else {\n        throw $p;\n      }\n    }\n    return tmp;\n  }\n  function QRCodeGraphics$lambda() {\n    var tmp = document.createElement('canvas');\n    return tmp instanceof HTMLCanvasElement ? tmp : THROW_CCE();\n  }\n  function QRCodeGraphics$draw$lambda(this$0) {\n    return function () {\n      var tmp = this$0.ki_1.getContext('2d');\n      return tmp instanceof CanvasRenderingContext2D ? tmp : THROW_CCE();\n    };\n  }\n  function QRCodeGraphics$reset$lambda(this$0) {\n    return function ($this$draw) {\n      $this$draw.clearRect(0.0, 0.0, this$0.width, this$0.height);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawLine$lambda($x1, $y1, $x2, $y2) {\n    return function ($this$draw) {\n      $this$draw.moveTo($x1, $y1);\n      $this$draw.lineTo($x2, $y2);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawRect$lambda($thickness, $x, $y, $width, $height) {\n    return function ($this$draw) {\n      $this$draw.lineWidth = $thickness;\n      var halfThickness = $thickness / 2.0;\n      $this$draw.strokeRect($x + halfThickness, $y + halfThickness, $width - $thickness, $height - $thickness);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$fillRect$lambda($x, $y, $width, $height) {\n    return function ($this$draw) {\n      $this$draw.fillRect($x, $y, $width, $height);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawEllipse$lambda($width, $height, $thickness, $x, $y) {\n    return function ($this$draw) {\n      var radiusX = $width / 2.0;\n      var radiusY = $height / 2.0;\n      $this$draw.lineWidth = $thickness;\n      $this$draw.beginPath();\n      $this$draw.ellipse(radiusX + $x, radiusY + $y, radiusX, radiusY, 0.0, 0.0, 6.283185307179586, false);\n      $this$draw.stroke();\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$fillEllipse$lambda($width, $height, $x, $y) {\n    return function ($this$draw) {\n      var radiusX = $width / 2.0;\n      var radiusY = $height / 2.0;\n      $this$draw.beginPath();\n      $this$draw.ellipse(radiusX + $x, radiusY + $y, radiusX, radiusY, 0.0, 0.0, 6.283185307179586, false);\n      $this$draw.fill();\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics$drawImage$lambda($rawData, this$0, $x, $y) {\n    return function ($this$draw) {\n      var imageData = new ImageData(new Uint8ClampedArray(toTypedArray($rawData)), this$0.width);\n      $this$draw.putImageData(imageData, $x, $y);\n      return Unit_instance;\n    };\n  }\n  function QRCodeGraphics(width, height) {\n    this.width = width;\n    this.height = height;\n    this.li_1 = false;\n    var canvas = tryGet(this, QRCodeGraphics$lambda);\n    canvas.width = this.width;\n    canvas.height = this.height;\n    this.ki_1 = canvas;\n  }\n  protoOf(QRCodeGraphics).mi = function () {\n    return this.width;\n  };\n  protoOf(QRCodeGraphics).ni = function () {\n    return this.height;\n  };\n  protoOf(QRCodeGraphics).changed = function () {\n    return this.li_1;\n  };\n  protoOf(QRCodeGraphics).reset = function () {\n    if (this.li_1) {\n      this.li_1 = false;\n      draw_0(this, 0, QRCodeGraphics$reset$lambda(this));\n    }\n  };\n  protoOf(QRCodeGraphics).dimensions = function () {\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return [this.width, this.height];\n  };\n  protoOf(QRCodeGraphics).oi = function (format) {\n    return this.ki_1.toDataURL(format);\n  };\n  protoOf(QRCodeGraphics).toDataURL = function (format, $super) {\n    format = format === VOID ? 'png' : format;\n    return $super === VOID ? this.oi(format) : $super.oi.call(this, format);\n  };\n  protoOf(QRCodeGraphics).toBlob = function (callback) {\n    return this.ki_1.toBlob(callback);\n  };\n  protoOf(QRCodeGraphics).getBytes = function () {\n    return this.getBytesForFormat('png');\n  };\n  protoOf(QRCodeGraphics).getBytesForFormat = function (format) {\n    return encodeToByteArray(this.ki_1.toDataURL(format));\n  };\n  protoOf(QRCodeGraphics).availableFormats = function () {\n    // Inline function 'kotlin.arrayOf' call\n    // Inline function 'kotlin.js.unsafeCast' call\n    // Inline function 'kotlin.js.asDynamic' call\n    return ['png'];\n  };\n  protoOf(QRCodeGraphics).nativeImage = function () {\n    return this.ki_1;\n  };\n  protoOf(QRCodeGraphics).drawLine = function (x1, y1, x2, y2, color, thickness) {\n    draw_0(this, color, QRCodeGraphics$drawLine$lambda(x1, y1, x2, y2));\n  };\n  protoOf(QRCodeGraphics).drawRect = function (x, y, width, height, color, thickness) {\n    draw_0(this, color, QRCodeGraphics$drawRect$lambda(thickness, x, y, width, height));\n  };\n  protoOf(QRCodeGraphics).fillRect = function (x, y, width, height, color) {\n    draw_0(this, color, QRCodeGraphics$fillRect$lambda(x, y, width, height));\n  };\n  protoOf(QRCodeGraphics).fill = function (color) {\n    this.fillRect(0, 0, this.width, this.height, color);\n  };\n  protoOf(QRCodeGraphics).drawRoundRect = function (x, y, width, height, borderRadius, color, thickness) {\n    this.drawRect(x, y, width, height, color, 1.0);\n  };\n  protoOf(QRCodeGraphics).fillRoundRect = function (x, y, width, height, borderRadius, color) {\n    this.fillRect(x, y, width, height, color);\n  };\n  protoOf(QRCodeGraphics).drawEllipse = function (x, y, width, height, color, thickness) {\n    draw_0(this, color, QRCodeGraphics$drawEllipse$lambda(width, height, thickness, x, y));\n  };\n  protoOf(QRCodeGraphics).fillEllipse = function (x, y, width, height, color) {\n    draw_0(this, color, QRCodeGraphics$fillEllipse$lambda(width, height, x, y));\n  };\n  protoOf(QRCodeGraphics).drawImageFromBytes = function (rawData, x, y) {\n    var tmp;\n    if (!(rawData == null)) {\n      // Inline function 'kotlin.collections.isNotEmpty' call\n      // Inline function 'kotlin.collections.isEmpty' call\n      tmp = !(rawData.length === 0);\n    } else {\n      tmp = false;\n    }\n    if (tmp) {\n      draw_0(this, 0, QRCodeGraphics$drawImage$lambda(rawData, this, x, y));\n    }\n  };\n  //region block: post-declaration\n  protoOf(InternalHashMap).o2 = containsAllEntries;\n  defineProp(protoOf(QRCode), 'typeNum', protoOf(QRCode).p6);\n  defineProp(protoOf(QRCode), 'computedSize', protoOf(QRCode).s6);\n  protoOf(DefaultColorFunction).colorFn = colorFn;\n  protoOf(DefaultColorFunction).beforeRender = beforeRender;\n  protoOf(LinearGradientColorFunction).colorFn = colorFn;\n  protoOf(LinearGradientColorFunction).beforeRender = beforeRender;\n  defineProp(protoOf(InsufficientInformationDensityException), 'message', function () {\n    return this.q3();\n  });\n  defineProp(protoOf(InsufficientInformationDensityException), 'cause', function () {\n    return this.r3();\n  });\n  defineProp(protoOf(QRCodeSquareType), 'name', protoOf(QRCodeSquareType).z);\n  defineProp(protoOf(QRCodeSquareType), 'ordinal', protoOf(QRCodeSquareType).a1);\n  defineProp(protoOf(QRCodeRegion), 'name', protoOf(QRCodeRegion).z);\n  defineProp(protoOf(QRCodeRegion), 'ordinal', protoOf(QRCodeRegion).a1);\n  defineProp(protoOf(ErrorCorrectionLevel), 'name', protoOf(ErrorCorrectionLevel).z);\n  defineProp(protoOf(ErrorCorrectionLevel), 'ordinal', protoOf(ErrorCorrectionLevel).a1);\n  defineProp(protoOf(MaskPattern), 'name', protoOf(MaskPattern).z);\n  defineProp(protoOf(MaskPattern), 'ordinal', protoOf(MaskPattern).a1);\n  defineProp(protoOf(QRCodeDataType), 'name', protoOf(QRCodeDataType).z);\n  defineProp(protoOf(QRCodeDataType), 'ordinal', protoOf(QRCodeDataType).a1);\n  protoOf(DefaultShapeFunction).beforeRender = beforeRender_0;\n  //endregion\n  //region block: init\n  Companion_instance = new Companion();\n  Unit_instance = new Unit();\n  Companion_instance_1 = new Companion_1();\n  Companion_instance_3 = new Companion_3();\n  Companion_instance_4 = new Companion_4();\n  EmptyIterator_instance = new EmptyIterator();\n  Companion_instance_6 = new Companion_6();\n  Colors_instance = new Colors();\n  QRCodeSetup_instance = new QRCodeSetup();\n  Companion_instance_9 = new Companion_9();\n  Companion_instance_10 = new Companion_10();\n  Companion_instance_11 = new Companion_11();\n  Companion_instance_12 = new Companion_12();\n  //endregion\n  //region block: exports\n  function $jsExportAll$(_) {\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    $qrcode.QRCode = QRCode;\n    defineProp($qrcode.QRCode, 'Companion', Companion_getInstance_7);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    $qrcode.QRCodeBuilder = QRCodeBuilder;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    defineProp($qrcode$color, 'Colors', Colors_getInstance);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    $qrcode$color.DefaultColorFunction = DefaultColorFunction;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    $qrcode$color.LinearGradientColorFunction = LinearGradientColorFunction;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$color = $qrcode.color || ($qrcode.color = {});\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$internals = $qrcode.internals || ($qrcode.internals = {});\n    $qrcode$internals.QRCodeSquare = QRCodeSquare;\n    $qrcode$internals.QRCodeSquareInfo = QRCodeSquareInfo;\n    $qrcode$internals.QRCodeSquareType = QRCodeSquareType;\n    $qrcode$internals.QRCodeSquareType.values = values;\n    $qrcode$internals.QRCodeSquareType.valueOf = valueOf;\n    defineProp($qrcode$internals.QRCodeSquareType, 'POSITION_PROBE', QRCodeSquareType_POSITION_PROBE_getInstance);\n    defineProp($qrcode$internals.QRCodeSquareType, 'POSITION_ADJUST', QRCodeSquareType_POSITION_ADJUST_getInstance);\n    defineProp($qrcode$internals.QRCodeSquareType, 'TIMING_PATTERN', QRCodeSquareType_TIMING_PATTERN_getInstance);\n    defineProp($qrcode$internals.QRCodeSquareType, 'DEFAULT', QRCodeSquareType_DEFAULT_getInstance);\n    $qrcode$internals.QRCodeRegion = QRCodeRegion;\n    $qrcode$internals.QRCodeRegion.values = values_0;\n    $qrcode$internals.QRCodeRegion.valueOf = valueOf_0;\n    defineProp($qrcode$internals.QRCodeRegion, 'TOP_LEFT_CORNER', QRCodeRegion_TOP_LEFT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'TOP_RIGHT_CORNER', QRCodeRegion_TOP_RIGHT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'TOP_MID', QRCodeRegion_TOP_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'LEFT_MID', QRCodeRegion_LEFT_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'RIGHT_MID', QRCodeRegion_RIGHT_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'CENTER', QRCodeRegion_CENTER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'BOTTOM_LEFT_CORNER', QRCodeRegion_BOTTOM_LEFT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'BOTTOM_RIGHT_CORNER', QRCodeRegion_BOTTOM_RIGHT_CORNER_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'BOTTOM_MID', QRCodeRegion_BOTTOM_MID_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'MARGIN', QRCodeRegion_MARGIN_getInstance);\n    defineProp($qrcode$internals.QRCodeRegion, 'UNKNOWN', QRCodeRegion_UNKNOWN_getInstance);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$raw = $qrcode.raw || ($qrcode.raw = {});\n    $qrcode$raw.ErrorCorrectionLevel = ErrorCorrectionLevel;\n    $qrcode$raw.ErrorCorrectionLevel.values = values_1;\n    $qrcode$raw.ErrorCorrectionLevel.valueOf = valueOf_1;\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'LOW', ErrorCorrectionLevel_LOW_getInstance);\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'MEDIUM', ErrorCorrectionLevel_MEDIUM_getInstance);\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'HIGH', ErrorCorrectionLevel_HIGH_getInstance);\n    defineProp($qrcode$raw.ErrorCorrectionLevel, 'VERY_HIGH', ErrorCorrectionLevel_VERY_HIGH_getInstance);\n    $qrcode$raw.MaskPattern = MaskPattern;\n    $qrcode$raw.MaskPattern.values = values_2;\n    $qrcode$raw.MaskPattern.valueOf = valueOf_2;\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN000', MaskPattern_PATTERN000_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN001', MaskPattern_PATTERN001_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN010', MaskPattern_PATTERN010_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN011', MaskPattern_PATTERN011_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN100', MaskPattern_PATTERN100_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN101', MaskPattern_PATTERN101_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN110', MaskPattern_PATTERN110_getInstance);\n    defineProp($qrcode$raw.MaskPattern, 'PATTERN111', MaskPattern_PATTERN111_getInstance);\n    $qrcode$raw.QRCodeDataType = QRCodeDataType;\n    $qrcode$raw.QRCodeDataType.values = values_3;\n    $qrcode$raw.QRCodeDataType.valueOf = valueOf_3;\n    defineProp($qrcode$raw.QRCodeDataType, 'NUMBERS', QRCodeDataType_NUMBERS_getInstance);\n    defineProp($qrcode$raw.QRCodeDataType, 'UPPER_ALPHA_NUM', QRCodeDataType_UPPER_ALPHA_NUM_getInstance);\n    defineProp($qrcode$raw.QRCodeDataType, 'DEFAULT', QRCodeDataType_DEFAULT_getInstance);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$raw = $qrcode.raw || ($qrcode.raw = {});\n    $qrcode$raw.QRCodeProcessor = QRCodeProcessor;\n    defineProp($qrcode$raw.QRCodeProcessor, 'Companion', Companion_getInstance_9);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$render = $qrcode.render || ($qrcode.render = {});\n    $qrcode$render.QRCodeGraphicsFactory = QRCodeGraphicsFactory;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    $qrcode$shape.CircleShapeFunction = CircleShapeFunction;\n    defineProp($qrcode$shape.CircleShapeFunction, 'Companion', Companion_getInstance_10);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    $qrcode$shape.DefaultShapeFunction = DefaultShapeFunction;\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$shape = $qrcode.shape || ($qrcode.shape = {});\n    $qrcode$shape.RoundSquaresShapeFunction = RoundSquaresShapeFunction;\n    defineProp($qrcode$shape.RoundSquaresShapeFunction, 'Companion', Companion_getInstance_11);\n    var $qrcode = _.qrcode || (_.qrcode = {});\n    var $qrcode$render = $qrcode.render || ($qrcode.render = {});\n    $qrcode$render.QRCodeGraphics = QRCodeGraphics;\n    defineProp($qrcode$render.QRCodeGraphics, 'Companion', Companion_getInstance_12);\n  }\n  $jsExportAll$(_);\n  //endregion\n  return _;\n}));\n\n//# sourceMappingURL=qrcode-kotlin.js.map\n"
  },
  {
    "path": "settings.gradle.kts",
    "content": "dependencyResolutionManagement {\n    repositories {\n        mavenCentral()\n        google()\n        gradlePluginPortal()\n        mavenLocal()\n    }\n}\n\npluginManagement {\n    repositories {\n        mavenCentral()\n        google()\n        gradlePluginPortal()\n        mavenLocal()\n    }\n}\n\nrootProject.name = \"qrcode-kotlin\"\n\n// Examples\ninclude(\"examples:kotlin\", \"examples:java\", \"examples:android\", \"examples:spring-web\")\n"
  },
  {
    "path": "src/androidMain/kotlin/qrcode/render/QRCodeGraphics.android.kt",
    "content": "package qrcode.render\n\nimport android.graphics.Bitmap\nimport android.graphics.Bitmap.CompressFormat\nimport android.graphics.Bitmap.CompressFormat.JPEG\nimport android.graphics.Bitmap.CompressFormat.PNG\nimport android.graphics.BitmapFactory\nimport androidx.compose.ui.graphics.drawscope.DrawScope\nimport qrcode.render.extensions.drawQRCode\nimport qrcode.render.graphics.AndroidDrawingInterface\nimport qrcode.render.graphics.BitmapGraphics\nimport java.io.ByteArrayOutputStream\nimport java.io.OutputStream\n\n@Suppress(\"MemberVisibilityCanBePrivate\")\nactual open class QRCodeGraphics actual constructor(\n    val width: Int,\n    val height: Int,\n) {\n    companion object {\n        val AVAILABLE_FORMATS: Array<String> = CompressFormat.entries.map { it.name }.toTypedArray()\n    }\n\n    /**\n     * Which [qrcode.render.graphics.AndroidDrawingInterface] will handle the actual drawing. By default, a [android.graphics.Bitmap] and\n     * [android.graphics.Canvas] will be used for compatibility reasons.\n     *\n     * If you're in a modern Android app using Jetpack Compose, please see the [drawQRCode] extension function.\n     */\n    var drawingInterface: AndroidDrawingInterface? = null\n\n    /** Whether any drawing operations were done or not. */\n    private var changed: Boolean = false\n\n    /** Returns `true` if **any** drawing was performed */\n    actual open fun changed() = changed\n\n    /** Simply changes the `changed` flag to true without doing anything else */\n    actual fun reset() {\n        if (changed) {\n            changed = false\n        }\n    }\n\n    /**\n     * Make sure we can use the [drawingInterface]. Never mind the name.\n     */\n    private fun useCanvas(): AndroidDrawingInterface {\n        if (drawingInterface == null) {\n            drawingInterface = BitmapGraphics(width, height)\n        }\n\n        return drawingInterface!!\n    }\n\n    /** Return the dimensions of this Graphics object as a pair of `width, height` */\n    actual open fun dimensions() = arrayOf(width, height)\n\n    /**\n     * Returns this image as a [ByteArray] encoded as PNG. Recommended to use [writeImage].\n     *\n     * @see writeImage\n     */\n    actual open fun getBytes(): ByteArray = getBytes(\"PNG\")\n\n    /**\n     * Returns this image as a [ByteArray] encoded as the specified format. Recommended to use [writeImage].\n     *\n     * @see writeImage\n     * @see availableFormats\n     */\n    actual open fun getBytes(format: String): ByteArray =\n        ByteArrayOutputStream().let {\n            writeImage(it, format)\n            it.toByteArray()\n        }\n\n    /**\n     * Writes the QRCode image in the specified [format] and [quality] into the destination [OutputStream].\n     *\n     * For app stability reasons if the specified [format] doesn't exist it'll be defaulted to [PNG].\n     *\n     * >**Note:** Please note that `JPG` is supported via the [JPEG] value, with an `E`.\n     *\n     * @see Bitmap.compress\n     * @see availableFormats\n     */\n    open fun writeImage(destination: OutputStream, format: String = \"PNG\", quality: Int = 100) {\n        val byteArray = drawingInterface?.getBytes(format, quality) ?: byteArrayOf()\n        destination.write(byteArray)\n    }\n\n    /**\n     * Returns the available formats to be passed as parameters to [getBytes].\n     *\n     * @see CompressFormat\n     * @see CompressFormat.PNG\n     * @see CompressFormat.JPEG\n     */\n    actual open fun availableFormats(): Array<String> = AVAILABLE_FORMATS\n\n    /** Returns the [Bitmap] or [DrawScope] (if Jetpack Compose is available) object being worked upon. */\n    actual open fun nativeImage(): Any = drawingInterface?.nativeImage() ?: throw NotImplementedError(\"Native image not supported\")\n\n    /** Draw a straight line from point `(x1,y1)` to `(x2,y2)`. */\n    actual open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double) {\n        useCanvas().drawLine(x1, y1, x2, y2, color, thickness)\n    }\n\n    /** Draw the edges of a rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        useCanvas().drawRect(x, y, width, height, color, thickness)\n    }\n\n    /** Fills the rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        useCanvas().fillRect(x, y, width, height, color)\n    }\n\n    /** Fill the whole area of this canvas with the specified [color]. */\n    actual open fun fill(color: Int) {\n        fillRect(0, 0, width, height, color)\n    }\n\n    /**\n     * Draw the edges of a round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        useCanvas().drawRoundRect(x, y, width, height, borderRadius, color, thickness)\n    }\n\n    /**\n     * Fills the round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) {\n        useCanvas().fillRoundRect(x, y, width, height, borderRadius, color)\n    }\n\n    /**\n     * Draw the edges of an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     */\n    actual fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        useCanvas().drawEllipse(x, y, width, height, color, thickness)\n    }\n\n    /**\n     * Fills an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     *\n     */\n    actual fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        useCanvas().fillEllipse(x, y, width, height, color)\n    }\n\n    /**\n     * Reads the specified image from [rawData] and draws it at `(x,y)`\n     */\n    actual fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        if (rawData != null && rawData.isNotEmpty()) { // NOSONAR\n            val imgBitmap = BitmapFactory.decodeByteArray(rawData, 0, rawData.size)\n            drawImage(imgBitmap, x, y)\n        }\n    }\n\n    /**\n     * Draws a [Bitmap] at the specified `(x,y)`\n     */\n    open fun drawImage(img: Bitmap, x: Int, y: Int) {\n        changed = true\n        useCanvas().drawBitmap(img, x, y)\n    }\n}\n"
  },
  {
    "path": "src/androidMain/kotlin/qrcode/render/extensions/AndroidComposeExtensions.kt",
    "content": "package qrcode.render.extensions\n\nimport androidx.compose.ui.geometry.Offset\nimport androidx.compose.ui.geometry.Size\nimport androidx.compose.ui.graphics.Canvas\nimport androidx.compose.ui.graphics.drawscope.DrawScope\nimport androidx.compose.ui.graphics.drawscope.translate\nimport qrcode.QRCode\nimport qrcode.render.graphics.DrawScopeGraphics\n\n/**\n * Extension function to make it easier to draw a [QRCode] into a modern Jetpack Compose [Canvas].\n *\n * Usage example:\n *\n * ```kotlin\n * import qrcode.render.extensions.drawQRCode\n *\n * @Composable\n * fun QRCodeKotlinQRCode(\n *     text: String,\n *     modifier: Modifier = Modifier,\n * ) {\n *     val qrCode = remember(text) {\n *         QRCode.ofRoundedSquares()\n *             .build(text)\n *     }\n *\n *     Canvas(\n *         modifier = modifier\n *             .aspectRatio(1f)\n *     ) {\n *         drawQRCode(qrCode) // Draw the QRCode at (0, 0)\n *     }\n * }\n * ```\n *\n * **Code sample by @dgmltn at GitHub**, used with authors' permission and lightly modified :)\n *\n * Original code: https://github.com/g0dkar/qrcode-kotlin/issues/141#issuecomment-2722041216\n *\n * @param qrCode The [QRCode] that will be drawn into the [DrawScope].\n * @param offsetTopLeft The [Offset] of the top-left corner where the QRCode will be drawn. Defaults to [Offset.Zero].\n * @param sizeToFitInto The area in which to fit the QRCode. Defaults to the `size` of the [DrawScope].\n *\n */\nfun DrawScope.drawQRCode(\n    qrCode: QRCode,\n    offsetTopLeft: Offset = Offset.Zero,\n    sizeToFitInto: Size = this.size,\n) {\n    val width = sizeToFitInto.width.toInt()\n    val height = sizeToFitInto.height.toInt()\n\n    qrCode.fitIntoArea(width, height)\n\n    val qrCodeGraphics = qrCode.graphics\n    val previousDrawingInterface = qrCodeGraphics.drawingInterface\n\n    val drawScopeGraphics = DrawScopeGraphics(this, qrCodeGraphics.width, qrCodeGraphics.height)\n    qrCodeGraphics.drawingInterface = drawScopeGraphics\n\n    translate(offsetTopLeft.x, offsetTopLeft.y) {\n        qrCode.render()\n    }\n\n    qrCodeGraphics.drawingInterface = previousDrawingInterface\n}\n"
  },
  {
    "path": "src/androidMain/kotlin/qrcode/render/graphics/AndroidDrawingInterface.kt",
    "content": "package qrcode.render.graphics\n\nimport android.graphics.Bitmap\n\ninterface AndroidDrawingInterface {\n    fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double)\n    fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double)\n    fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int)\n    fun fill(color: Int)\n    fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    )\n\n    fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int)\n    fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double)\n    fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int)\n    fun drawImage(rawData: ByteArray?, x: Int, y: Int)\n    fun drawBitmap(img: Bitmap, x: Int, y: Int)\n    fun nativeImage(): Any\n    fun getBytes(format: String = \"PNG\", quality: Int = 100): ByteArray\n}\n"
  },
  {
    "path": "src/androidMain/kotlin/qrcode/render/graphics/BitmapGraphics.kt",
    "content": "package qrcode.render.graphics\n\nimport android.graphics.Bitmap\nimport android.graphics.Bitmap.CompressFormat\nimport android.graphics.Bitmap.CompressFormat.PNG\nimport android.graphics.Bitmap.Config.ARGB_8888\nimport android.graphics.BitmapFactory\nimport android.graphics.Canvas\nimport android.graphics.Paint\nimport android.graphics.Paint.Style\nimport android.graphics.Paint.Style.FILL\nimport android.graphics.Paint.Style.STROKE\nimport android.graphics.Rect\nimport android.graphics.RectF\nimport java.io.ByteArrayOutputStream\nimport kotlin.math.roundToInt\n\n/**\n * An [AndroidDrawingInterface] that uses a [Canvas] (here referred to as \"Classic Canvas\") to draw into a [Bitmap].\n *\n * For a modern Canvas, see [DrawScopeGraphics] which uses Jetpack Compose.\n */\nopen class BitmapGraphics(\n    val width: Int,\n    val height: Int,\n    val image: Bitmap = Bitmap.createBitmap(width, height, ARGB_8888),\n) : AndroidDrawingInterface {\n    val canvas: Canvas = Canvas(image)\n\n    /** Cache of [Paint] objects being used. Just to try and use the least amount of CPU/memory possible. */\n    private val paintCache = mutableMapOf<Int, Paint>()\n\n    /**\n     * Keeps a simple color cache. The default style is [FILL].\n     */\n    protected fun paintFromCache(color: Int, paintStyle: Style = FILL, thickness: Double = 0.0): Paint {\n        return paintCache.getOrPut(color) {\n            Paint().apply { setColor(color) }\n        }.apply {\n            if (style != paintStyle) {\n                style = paintStyle\n            }\n            this.strokeWidth = thickness.toFloat()\n        }\n    }\n\n    private fun rectF(x: Int, y: Int, width: Int, height: Int): RectF =\n        RectF(x.toFloat(), y.toFloat(), (x + width).toFloat(), (y + height).toFloat())\n\n    override fun drawLine(\n        x1: Int,\n        y1: Int,\n        x2: Int,\n        y2: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        canvas.drawLine(\n            x1.toFloat(),\n            y1.toFloat(),\n            x2.toFloat(),\n            y2.toFloat(),\n            paintFromCache(color, STROKE, thickness),\n        )\n    }\n\n    override fun drawRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        val halfThickness = (thickness / 2.0).roundToInt()\n        val rect = Rect(\n            x + halfThickness,\n            y + halfThickness,\n            x + width - halfThickness,\n            y + height - halfThickness,\n        )\n\n        canvas.drawRect(rect, paintFromCache(color, STROKE, thickness))\n    }\n\n    override fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        canvas.drawRect(\n            Rect(x, y, x + width, y + height),\n            paintFromCache(color),\n        )\n    }\n\n    override fun fill(color: Int) {\n        fillRect(0, 0, width, height, color)\n    }\n\n    override fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        val floatRadius = borderRadius.toFloat()\n        val halfThickness = (thickness / 2.0).roundToInt()\n\n        canvas.drawRoundRect(\n            rectF(\n                x + halfThickness,\n                y + halfThickness,\n                width - halfThickness * 2,\n                height - halfThickness * 2,\n            ),\n            floatRadius,\n            floatRadius,\n            paintFromCache(color, STROKE, thickness),\n        )\n    }\n\n    override fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) {\n        val floatRadius = borderRadius.toFloat()\n        val rectF = rectF(x, y, width, height)\n        val paint = paintFromCache(color)\n\n        canvas.drawRoundRect(\n            rectF,\n            floatRadius,\n            floatRadius,\n            paint,\n        )\n    }\n\n    override fun drawEllipse(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        canvas.drawOval(\n            rectF(x, y, width, height),\n            paintFromCache(color, STROKE, thickness),\n        )\n    }\n\n    override fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        canvas.drawOval(\n            rectF(x, y, width, height),\n            paintFromCache(color),\n        )\n    }\n\n    override fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        if (rawData != null && rawData.isNotEmpty()) { // NOSONAR\n            val imgBitmap = BitmapFactory.decodeByteArray(rawData, 0, rawData.size)\n            drawBitmap(imgBitmap, x, y)\n        }\n    }\n\n    override fun drawBitmap(img: Bitmap, x: Int, y: Int) {\n        canvas.drawBitmap(img, x.toFloat(), y.toFloat(), null)\n    }\n\n    override fun nativeImage() = image\n\n    override fun getBytes(format: String, quality: Int): ByteArray {\n        val compressFormat = toCompressFormat(format)\n        val byteArrayOutputStream = ByteArrayOutputStream()\n\n        image.compress(compressFormat, quality.coerceIn(0, 100), byteArrayOutputStream)\n\n        return byteArrayOutputStream.toByteArray()\n    }\n\n    /**\n     * Tries to convert a [String] into a [CompressFormat] returning [PNG] if it fails to do so.\n     */\n    private fun toCompressFormat(format: String) =\n        try {\n            CompressFormat.valueOf(format.uppercase())\n        } catch (_: Throwable) {\n            PNG\n        }\n}\n"
  },
  {
    "path": "src/androidMain/kotlin/qrcode/render/graphics/DrawScopeGraphics.kt",
    "content": "package qrcode.render.graphics\n\nimport android.graphics.Bitmap\nimport androidx.compose.ui.geometry.CornerRadius\nimport androidx.compose.ui.geometry.Offset\nimport androidx.compose.ui.geometry.Size\nimport androidx.compose.ui.graphics.Color\nimport androidx.compose.ui.graphics.drawscope.DrawScope\nimport androidx.compose.ui.graphics.drawscope.Fill\nimport androidx.compose.ui.graphics.drawscope.Stroke\nimport qrcode.color.Colors\n\nclass DrawScopeGraphics(\n    val drawScope: DrawScope, val width: Int, val height: Int,\n) : AndroidDrawingInterface {\n    private val paintCache = mutableMapOf<Int, Color>()\n\n    private fun composeColor(color: Int): Color {\n        return paintCache.getOrPut(color) {\n            val (r, g, b, a) = Colors.getRGBA(color)\n            Color(r, g, b, a)\n        }\n    }\n\n    private fun offset(x: Int, y: Int) = Offset(x.toFloat(), y.toFloat())\n\n    private fun offsetSize(x: Int, y: Int, width: Int, height: Int): Pair<Offset, Size> =\n        Pair(offset(x, y), Size(width.toFloat(), height.toFloat()))\n\n    private fun stroke(thickness: Double) = Stroke(width = thickness.toFloat())\n\n    override fun drawLine(\n        x1: Int,\n        y1: Int,\n        x2: Int,\n        y2: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        val startXY = offset(x1, y1)\n        val endXY = offset(x2, y2)\n        drawScope.drawLine(\n            color = composeColor(color),\n            start = startXY,\n            end = endXY,\n            strokeWidth = thickness.toFloat(),\n        )\n    }\n\n    override fun drawRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        val halfThickness = (thickness / 2.0).toInt()\n        val (topLeft, size) = offsetSize(\n            x + halfThickness,\n            y + halfThickness,\n            width - halfThickness * 2,\n            height - halfThickness * 2,\n        )\n\n        drawScope.drawRect(\n            color = composeColor(color),\n            topLeft = topLeft,\n            size = size,\n            style = stroke(thickness),\n        )\n    }\n\n    override fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        val (topLeft, size) = offsetSize(x, y, width, height)\n\n        drawScope.drawRect(\n            color = composeColor(color),\n            topLeft = topLeft,\n            size = size,\n            style = Fill,\n        )\n    }\n\n    override fun fill(color: Int) {\n        fillRect(0, 0, width, height, color)\n    }\n\n    override fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        val halfThickness = (thickness / 2.0).toInt()\n        val (topLeft, size) = offsetSize(\n            x + halfThickness,\n            y + halfThickness,\n            width - halfThickness * 2,\n            height - halfThickness * 2,\n        )\n\n        drawScope.drawRoundRect(\n            color = composeColor(color),\n            topLeft = topLeft,\n            size = size,\n            cornerRadius = CornerRadius(borderRadius.toFloat(), borderRadius.toFloat()),\n            style = stroke(thickness),\n        )\n    }\n\n    override fun fillRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n    ) {\n        val (topLeft, size) = offsetSize(x, y, width, height)\n        val cornerRadius = CornerRadius(borderRadius.toFloat(), borderRadius.toFloat())\n\n        drawScope.drawRoundRect(\n            color = composeColor(color),\n            topLeft = topLeft,\n            size = size,\n            cornerRadius = cornerRadius,\n            style = Fill,\n        )\n    }\n\n    override fun drawEllipse(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        val halfThickness = (thickness / 2.0).toInt()\n        val (topLeft, size) = offsetSize(\n            x + halfThickness,\n            y + halfThickness,\n            width - halfThickness * 2,\n            height - halfThickness * 2,\n        )\n\n        drawScope.drawOval(\n            color = composeColor(color),\n            topLeft = topLeft,\n            size = size,\n            style = stroke(thickness),\n        )\n    }\n\n    override fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        val (topLeft, size) = offsetSize(x, y, width, height)\n\n        drawScope.drawOval(\n            color = composeColor(color),\n            topLeft = topLeft,\n            size = size,\n            style = Fill,\n        )\n    }\n\n    override fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        TODO(\"Unsupported operation\")\n    }\n\n    override fun drawBitmap(img: Bitmap, x: Int, y: Int) {\n        TODO(\"Unsupported operation\")\n    }\n\n    override fun nativeImage(): Any = drawScope\n\n    override fun getBytes(format: String, quality: Int): ByteArray {\n        TODO(\"Unsupported operation\")\n    }\n\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/QRCode.kt",
    "content": "package qrcode\n\nimport qrcode.QRCode.Companion.DEFAULT_QRCODE_SIZE\nimport qrcode.QRCode.Companion.DEFAULT_SQUARE_SIZE\nimport qrcode.QRCode.Companion.EMPTY_FN\nimport qrcode.QRCode.Companion.ofCircles\nimport qrcode.QRCode.Companion.ofRoundedSquares\nimport qrcode.QRCode.Companion.ofSquares\nimport qrcode.QRCodeShapesEnum.CIRCLE\nimport qrcode.QRCodeShapesEnum.CUSTOM\nimport qrcode.QRCodeShapesEnum.ROUNDED_SQUARE\nimport qrcode.QRCodeShapesEnum.SQUARE\nimport qrcode.color.DefaultColorFunction\nimport qrcode.color.QRCodeColorFunction\nimport qrcode.internals.QRCodeSquareType.POSITION_ADJUST\nimport qrcode.internals.QRCodeSquareType.POSITION_PROBE\nimport qrcode.raw.ErrorCorrectionLevel\nimport qrcode.raw.MaskPattern\nimport qrcode.raw.QRCodeProcessor\nimport qrcode.raw.QRCodeProcessor.Companion.DEFAULT_CELL_SIZE\nimport qrcode.raw.QRCodeRawData\nimport qrcode.render.QRCodeGraphics\nimport qrcode.render.QRCodeGraphicsFactory\nimport qrcode.shape.CircleShapeFunction\nimport qrcode.shape.DefaultShapeFunction\nimport qrcode.shape.QRCodeShapeFunction\nimport qrcode.shape.RoundSquaresShapeFunction\nimport kotlin.jvm.JvmOverloads\nimport kotlin.jvm.JvmStatic\nimport kotlin.math.floor\nimport kotlin.math.min\n\n/**\n * A simple class to create easily create aesthetic pleasing QRCodes.\n *\n * It'll create a [QRCodeProcessor] and build a custom render function on top of it.\n *\n * It includes things like:\n *\n * - QR Codes with a logo at the center\n * - QR Codes with dots instead of squares\n * - Colorful QR Codes (including linear gradient colors)\n *\n * If you have a suggestion for a nice QR Code style, feel free to open a PR, or an Issue with your suggestion :)\n *\n * @see QRCodeBuilder\n * @see ofSquares\n * @see ofCircles\n * @see ofRoundedSquares\n *\n * @author Rafael Lins - g0dkar\n *\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\", \"MemberVisibilityCanBePrivate\")\nclass QRCode @JvmOverloads constructor(\n    /** Data that will be encoded. */\n    val data: String,\n    /** Size in pixels of each square of the QR Code - Defaults to [DEFAULT_SQUARE_SIZE] (25px) */\n    squareSize: Int = DEFAULT_SQUARE_SIZE,\n    /** Size in pixels of the whole QR Code canvas - Defaults to [DEFAULT_QRCODE_SIZE] (0 = compute size automatically) */\n    canvasSize: Int = DEFAULT_QRCODE_SIZE,\n    /** Offset drawing the QRCode by this amount on the X axis (horizontal) - Defaults to `0` (zero) */\n    val xOffset: Int = DEFAULT_X_OFFSET,\n    /** Offset drawing the QRCode by this amount on the Y axis (vertical) - Defaults to `0` (zero) */\n    val yOffset: Int = DEFAULT_Y_OFFSET,\n    /** Function that will handle color processing (which color is \"light\" and which is \"dark\") - Defaults to [DefaultColorFunction]. */\n    val colorFn: QRCodeColorFunction = DefaultColorFunction(),\n    /** Function that will handle drawing the shapes of each square - Defaults to [DefaultShapeFunction] with `innerSpace = 0`. */\n    val shapeFn: QRCodeShapeFunction = DefaultShapeFunction(squareSize, innerSpace = 0),\n    /** Factory of [QRCodeGraphics] instances - Defaults to [QRCodeGraphicsFactory]. */\n    var graphicsFactory: QRCodeGraphicsFactory = QRCodeGraphicsFactory(),\n    /** Error Correction Level to add to embed in the QRCode. The higher the ErrorCorrectionLevel is, the higher will be the QRCode tolerance to damage - Defaults to [ErrorCorrectionLevel.LOW]. */\n    val errorCorrectionLevel: ErrorCorrectionLevel = ErrorCorrectionLevel.LOW,\n    /** Information Density (formerly known as `typeNum`). A number that represents how much data this QRCode can hold - Defaults to a value computed by [QRCodeProcessor.infoDensityForDataAndECL]. */\n    val informationDensity: Int = QRCodeProcessor.infoDensityForDataAndECL(data, errorCorrectionLevel),\n    /** Which mask pattern to apply to the QRCode. Slightly change the squares. Mostly for aesthetics. */\n    val maskPattern: MaskPattern = MaskPattern.PATTERN000,\n    /** Code to run BEFORE rendering the whole QRCode - Defaults to [EMPTY_FN] */\n    private val doBefore: QRCode.(QRCodeGraphics, Int, Int) -> Unit = EMPTY_FN,\n    /** Code to run AFTER rendering the whole QRCode - Defaults to [EMPTY_FN] */\n    private val doAfter: QRCode.(QRCodeGraphics, Int, Int) -> Unit = EMPTY_FN,\n) {\n    companion object {\n        /** Used to have an empty `doBefore` and `doAfter` function */\n        internal val EMPTY_FN: QRCode.(QRCodeGraphics, Int, Int) -> Unit = { _, _, _ -> }\n\n        /** Default value of [squareSize]. Same value as [DEFAULT_CELL_SIZE] (value = 25) */\n        const val DEFAULT_SQUARE_SIZE = DEFAULT_CELL_SIZE\n\n        /** Default value of [canvasSize]. If <= 0, the size will be computed automatically. */\n        const val DEFAULT_QRCODE_SIZE = 0\n\n        /** Default value of [xOffset] (value = 0) */\n        const val DEFAULT_X_OFFSET = 0\n\n        /** Default value of [yOffset] (value = 0) */\n        const val DEFAULT_Y_OFFSET = 0\n\n        /**\n         * Creates a new [QRCodeBuilder] to build a Fancy QRCode which uses squares as the base shape (this is the default)\n         *\n         * @see DefaultShapeFunction\n         */\n        @JvmStatic\n        fun ofSquares(): QRCodeBuilder = QRCodeBuilder(SQUARE)\n\n        /**\n         * Creates a new [QRCodeBuilder] to build a Fancy QRCode which uses circles as the base shape.\n         *\n         * This one was based on an Apple Music QRCode.\n         *\n         * @see CircleShapeFunction\n         */\n        @JvmStatic\n        fun ofCircles(): QRCodeBuilder = QRCodeBuilder(CIRCLE)\n\n        /**\n         * Creates a new [QRCodeBuilder] to build a Fancy QRCode which uses rounded squares as the base shape.\n         *\n         * @see RoundSquaresShapeFunction\n         */\n        @JvmStatic\n        fun ofRoundedSquares(): QRCodeBuilder = QRCodeBuilder(ROUNDED_SQUARE)\n\n        /**\n         * Creates a new [QRCodeBuilder] to build a QRCode which uses a custom shape function.\n         *\n         * @see QRCodeShapeFunction\n         * @see DefaultShapeFunction\n         */\n        @JvmStatic\n        fun ofCustomShape(customShapeFunction: QRCodeShapeFunction): QRCodeBuilder =\n            QRCodeBuilder(CUSTOM, customShapeFunction)\n    }\n\n    var squareSize: Int = squareSize\n        private set\n\n    /** The underlying [QRCodeProcessor] object that will do all calculations */\n    val qrCodeProcessor: QRCodeProcessor =\n        QRCodeProcessor(data, errorCorrectionLevel, graphicsFactory = graphicsFactory)\n\n    /** Computed type number for the given [data] parameter. Renamed/replaced with [informationDensity]. */\n    @Deprecated(\"Please use informationDensity instead.\")\n    val typeNum: Int\n        get() = informationDensity\n\n    /** Raw QRCode data computed by [QRCodeProcessor] */\n    val rawData: QRCodeRawData = qrCodeProcessor.encode(informationDensity, maskPattern)\n\n    /**\n     * Size of the canvas where the QRCode will be drawn into (the final image will be a square of `canvasSize` by `canvasSize`)\n     *\n     *\n     *\n     */\n    var canvasSize: Int =\n        if (canvasSize > DEFAULT_QRCODE_SIZE) canvasSize else qrCodeProcessor.computeImageSize(squareSize, rawData)\n        private set\n\n    /** Size of the canvas where the QRCode will be drawn into. */\n    @Deprecated(\"Please use canvasSize instead.\")\n    val computedSize: Int\n        get() = canvasSize\n\n    /** The [QRCodeGraphics] (aka \"canvas\") where all the drawing will happen */\n    var graphics: QRCodeGraphics = graphicsFactory.newGraphicsSquare(this.canvasSize)\n        private set\n\n    private fun draw(\n        xOffset: Int,\n        yOffset: Int,\n        rawData: QRCodeRawData,\n        canvas: QRCodeGraphics,\n    ): QRCodeGraphics =\n        qrCodeProcessor.renderShaded(\n            cellSize = squareSize,\n            rawData = rawData,\n            qrCodeGraphics = canvas,\n        ) { x, y, currentSquare, _ ->\n            val actualSquare = currentSquare.parent ?: currentSquare\n\n            if (!actualSquare.rendered) {\n                when (currentSquare.squareInfo.type) {\n                    POSITION_PROBE, POSITION_ADJUST -> shapeFn.renderControlSquare(\n                        xOffset,\n                        yOffset,\n                        colorFn,\n                        actualSquare,\n                        canvas,\n                        this,\n                    )\n\n                    else -> shapeFn.renderSquare(\n                        xOffset + x,\n                        yOffset + y,\n                        colorFn,\n                        currentSquare,\n                        canvas,\n                        this,\n                    )\n                }\n\n                actualSquare.rendered = true\n            }\n        }\n\n    /**\n     * Computes a [squareSize] to make sure the QRCode can fit into an area of width by height pixels\n     */\n    fun resize(size: Int): QRCode {\n        canvasSize = size\n        graphics = graphicsFactory.newGraphicsSquare(canvasSize)\n\n        return this\n    }\n\n    /**\n     * Computes a [squareSize] to make sure the QRCode can fit into an area of width by height pixels\n     */\n    fun fitIntoArea(width: Int, height: Int): QRCode {\n        val reference = min(width, height)\n        squareSize = floor(reference / rawData.size.toDouble()).toInt()\n        shapeFn.resize(squareSize)\n        canvasSize = reference\n        graphics = graphicsFactory.newGraphicsSquare(canvasSize)\n\n        return this\n    }\n\n    /** Executes all the drawing of the QRCode and returns the [QRCodeGraphics] of the complete QRCode. */\n    @JvmOverloads\n    fun render(\n        qrCodeGraphics: QRCodeGraphics = graphics,\n        xOffset: Int = this.xOffset,\n        yOffset: Int = this.yOffset,\n    ): QRCodeGraphics {\n        colorFn.beforeRender(this, qrCodeGraphics)\n        shapeFn.beforeRender(this, qrCodeGraphics)\n\n        // Fill the whole area with the Background Color.\n        graphics.fill(colorFn.bg(0, 0, this, graphics))\n\n        doBefore(qrCodeGraphics, xOffset, yOffset)\n        return draw(xOffset, yOffset, rawData, qrCodeGraphics)\n            .also { doAfter(it, xOffset, yOffset) }\n    }\n\n    /** Calls [render] and then returns the bytes of a [format] (default = PNG) render of the QRCode. */\n    @JvmOverloads\n    fun renderToBytes(\n        qrCodeGraphics: QRCodeGraphics = graphics,\n        xOffset: Int = this.xOffset,\n        yOffset: Int = this.yOffset,\n        format: String = \"PNG\",\n    ): ByteArray {\n        return render(qrCodeGraphics, xOffset, yOffset).getBytes(format)\n    }\n\n    /**\n     * Completely resets the QRCode drawing. After this, you can call [renderToBytes] or [render] to redraw the\n     * whole QRCode. Useful when you want, for example, a transparent background QRCode to add to a larger image and\n     * then the same QRCode drawn on top of a custom background.\n     */\n    fun reset() {\n        rawData.forEach { row ->\n            row.forEach { cell ->\n                cell.rendered = false\n                cell.parent?.rendered = false\n            }\n        }\n        graphics.reset()\n    }\n\n    override fun toString(): String =\n        \"QRCode(data=$data, squareSize=$squareSize, canvasSize=$canvasSize, xOffset=$xOffset, yOffset=$yOffset\" +\n            \", errorCorrectionLevel=$errorCorrectionLevel, informationDensity=$informationDensity\" +\n            \", maskPattern=$maskPattern)\"\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/QRCodeBuilder.kt",
    "content": "package qrcode\n\nimport qrcode.QRCode.Companion.EMPTY_FN\nimport qrcode.QRCodeShapesEnum.CIRCLE\nimport qrcode.QRCodeShapesEnum.CUSTOM\nimport qrcode.QRCodeShapesEnum.ROUNDED_SQUARE\nimport qrcode.QRCodeShapesEnum.SQUARE\nimport qrcode.color.Colors\nimport qrcode.color.DefaultColorFunction\nimport qrcode.color.LinearGradientColorFunction\nimport qrcode.color.QRCodeColorFunction\nimport qrcode.internals.QRMath\nimport qrcode.raw.ErrorCorrectionLevel\nimport qrcode.raw.MaskPattern\nimport qrcode.raw.QRCodeProcessor\nimport qrcode.raw.QRCodeProcessor.Companion.MAXIMUM_INFO_DENSITY\nimport qrcode.render.QRCodeGraphics\nimport qrcode.render.QRCodeGraphicsFactory\nimport qrcode.shape.CircleShapeFunction\nimport qrcode.shape.DefaultShapeFunction\nimport qrcode.shape.QRCodeShapeFunction\nimport qrcode.shape.RoundSquaresShapeFunction\nimport kotlin.jvm.JvmOverloads\n\nclass QRCodeBuilder @JvmOverloads constructor(\n    private var shape: QRCodeShapesEnum,\n    private var customShapeFunction: QRCodeShapeFunction? = null,\n) {\n    private var customColorFunction: QRCodeColorFunction? = null\n\n    private var squareSize: Int = QRCodeProcessor.DEFAULT_CELL_SIZE\n    private var color: Int = Colors.BLACK\n    private var endColor: Int? = null\n    private var vertical: Boolean = true\n    private var background: Int = Colors.TRANSPARENT\n    private var innerSpace: Int = innerSpace()\n    private var radiusInPixels: Int = RoundSquaresShapeFunction.defaultRadius(squareSize)\n    private var drawLogoAction: QRCode.(QRCodeGraphics, Int, Int) -> Unit = EMPTY_FN\n    private var drawLogoBeforeAction: QRCode.(QRCodeGraphics, Int, Int) -> Unit = EMPTY_FN\n    private var userDoAfter: QRCode.(QRCodeGraphics, Int, Int) -> Unit = EMPTY_FN\n    private var userDoBefore: QRCode.(QRCodeGraphics, Int, Int) -> Unit = EMPTY_FN\n    private var graphicsFactory: QRCodeGraphicsFactory = QRCodeGraphicsFactory()\n    private var errorCorrectionLevel: ErrorCorrectionLevel = ErrorCorrectionLevel.LOW\n    private var informationDensity: Int = 0\n    private var maskPattern: MaskPattern = MaskPattern.PATTERN000\n    private var canvasSize: Int = QRCode.DEFAULT_QRCODE_SIZE\n    private var xOffset: Int = 0\n    private var yOffset: Int = 0\n    private var margin: Int = 0\n\n    private fun innerSpace() =\n        when (shape) {\n            SQUARE -> 1\n            CIRCLE -> CircleShapeFunction.defaultInnerSpace(squareSize)\n            ROUNDED_SQUARE -> RoundSquaresShapeFunction.defaultInnerSpace(squareSize)\n            CUSTOM -> 0\n        }.takeIf { it < squareSize } ?: 0\n\n    /**\n     * Changes the Shape of the QRCode.\n     *\n     * @see QRCodeShapesEnum\n     */\n    fun withShape(shape: QRCodeShapesEnum): QRCodeBuilder {\n        this.shape = shape\n        return withInnerSpacing(innerSpace())\n    }\n\n    /** Size of each individual space in the QRCode (each cell). */\n    fun withSize(size: Int): QRCodeBuilder {\n        squareSize = size.coerceAtLeast(1)\n        return withInnerSpacing(innerSpace())\n    }\n\n    /**\n     * Color of the cells of the QRCode.\n     *\n     * Expected to be the Integer that represents an RGBA color. In short, use the [Colors] helpers ;)\n     *\n     * @see Colors\n     * @see Colors.css\n     * @see Colors.rgba\n     * @see Colors.withAlpha\n     */\n    fun withColor(color: Int): QRCodeBuilder {\n        this.color = color\n        return this\n    }\n\n    /**\n     * Background color of the QRCode.\n     *\n     * Expected to be the Integer that represents an RGBA color. In short, use the [Colors] helpers ;)\n     *\n     * @see Colors\n     */\n    fun withBackgroundColor(bgColor: Int): QRCodeBuilder {\n        background = bgColor\n        return this\n    }\n\n    /**\n     * Uses a [LinearGradientColorFunction] to choose colors for the QRCode.\n     *\n     * By default, the gradient will be a vertical one (top-to-bottom)\n     *\n     * If [endColor] is `null`, a [DefaultColorFunction] will be used instead.\n     *\n     * @see Colors\n     */\n    @JvmOverloads\n    fun withGradientColor(startColor: Int, endColor: Int?, vertical: Boolean = true): QRCodeBuilder {\n        color = startColor\n        this.endColor = endColor\n        this.vertical = vertical\n        return this\n    }\n\n    /**\n     * Radius of the edges of the Rounded Squares. Only applies for Rounded Squares. If set to a negative number,\n     * the default radius will be used.\n     */\n    fun withRadius(radius: Int): QRCodeBuilder {\n        radiusInPixels = radius.takeIf { it >= 0 } ?: RoundSquaresShapeFunction.defaultRadius(squareSize)\n        return this\n    }\n\n    /** How much space there should be around each QRCode Cell. Defaults to 1 pixel, or 0 if a custom shape function is being used. */\n    @JvmOverloads\n    fun withInnerSpacing(innerSpacing: Int? = null): QRCodeBuilder {\n        innerSpace = innerSpacing?.takeIf { it >= 0 } ?: innerSpace()\n        return this\n    }\n\n    /**\n     * Adds an image on top of the QRCode, at the center of it.\n     *\n     * If [clearLogoArea] is `false` the cells behind the logo will be drawn as normal.\n     *\n     */\n    @JvmOverloads\n    fun withLogo(logo: ByteArray?, width: Int, height: Int, clearLogoArea: Boolean = true): QRCodeBuilder {\n        if (logo != null) {\n            if (clearLogoArea) {\n                drawLogoBeforeAction = { _, _, _ ->\n                    val logoX = (canvasSize - width) / 2\n                    val logoY = (canvasSize - height) / 2\n\n                    rawData.forEach { row ->\n                        row.forEach { cell ->\n                            val cellX = cell.absoluteX(squareSize)\n                            val cellY = cell.absoluteY(squareSize)\n\n                            cell.rendered = !QRMath.rectsIntersect(\n                                logoX,\n                                logoY,\n                                width,\n                                height,\n                                cellX,\n                                cellY,\n                                squareSize,\n                                squareSize,\n                            )\n                        }\n                    }\n                }\n            } else {\n                drawLogoBeforeAction = EMPTY_FN\n            }\n\n            drawLogoAction = { canvas, xOffset, yOffset ->\n                val logoX = xOffset + (canvasSize - width) / 2\n                val logoY = yOffset + (canvasSize - height) / 2\n\n                canvas.drawImage(logo, logoX, logoY)\n            }\n        }\n\n        return this\n    }\n\n    /** Run a piece of code after the rendering is done. */\n    fun withAfterRenderAction(action: QRCode.(QRCodeGraphics) -> Unit): QRCodeBuilder {\n        userDoAfter = { it, _, _ -> action(it) }\n        return this\n    }\n\n    /** Run a piece of code before the rendering is done. */\n    fun withBeforeRenderAction(action: QRCode.(QRCodeGraphics) -> Unit): QRCodeBuilder {\n        userDoBefore = { it, _, _ -> action(it) }\n        return this\n    }\n\n    /**\n     * Use a custom [QRCodeGraphicsFactory] instead of the default. Use this to have a way to better control how and\n     * where the QRCode drawing will occur.\n     *\n     * The currently available implementations on this library are:\n     *\n     * - **Android:**`qrcode.render.AndroidQRCodeGraphicsFactory`\n     * - **JVM:** `qrcode.render.JvmQRCodeGraphicsFactory`\n     */\n    fun withGraphicsFactory(factory: QRCodeGraphicsFactory): QRCodeBuilder {\n        graphicsFactory = factory\n        return this\n    }\n\n    /**\n     * Sets the [QRCode.colorFn] value to a custom one. If set, the builder will ignore [color] and [background].\n     *\n     * Default is `null`, meaning a [DefaultColorFunction] will be created from the [color] and [background] values.\n     *\n     * @see QRCodeColorFunction\n     * @see DefaultColorFunction\n     */\n    fun withCustomColorFunction(colorFn: QRCodeColorFunction?): QRCodeBuilder {\n        this.customColorFunction = colorFn\n        return this\n    }\n\n    /**\n     * Sets the [QRCode.shapeFn] value to a custom one. If set, the builder will ignore the [shape] parameter.\n     *\n     * Default is `null`, meaning a [QRCodeShapeFunction] will be created for the selected [shape].\n     *\n     * If [shape] is [CUSTOM] but [customShapeFunction] is not set, a [DefaultShapeFunction] will be used.\n     *\n     * @see QRCodeShapeFunction\n     * @see DefaultShapeFunction\n     * @see RoundSquaresShapeFunction\n     * @see CircleShapeFunction\n     */\n    fun withCustomShapeFunction(shapeFn: QRCodeShapeFunction?): QRCodeBuilder {\n        this.customShapeFunction = shapeFn\n        return this\n    }\n\n    /**\n     * The level of error correction to apply to the QR Code. Defaults to [ErrorCorrectionLevel.LOW].\n     *\n     * In short, this configures how much data loss we can tolerate. Higher error correction = Readable QR Codes even\n     * with large parts hidden/crumpled/deformed.\n     *\n     * @see ErrorCorrectionLevel\n     */\n    fun withErrorCorrectionLevel(ecl: ErrorCorrectionLevel): QRCodeBuilder {\n        this.errorCorrectionLevel = ecl\n        return this\n    }\n\n    /**\n     * The level of \"information density\" this QRCode will support.\n     *\n     * **Defaults to `0`. Meaning the minimum possible value will be computed and used.**\n     *\n     * Must be a value between `1` and `40`. **If this value is `0` (zero), the minimum possible value for it will be\n     * computed and used instead.**\n     *\n     * This is complex to explain, but basically the lower this value the fewer squares the QRCode have. The catch is:\n     * the fewer squares the QRCode have, the harder it'll be to read damaged/obstructed versions of it.\n     *\n     * In short:\n     *\n     * - Ease of reading: Bump it as high as you want. Up to `6` is enough for a LOT of cases, even with logos.\n     * - Smaller size: Go with the computed value =)\n     *\n     * @see QRCodeProcessor.infoDensityForDataAndECL\n     *\n     */\n    fun withInformationDensity(informationDensity: Int): QRCodeBuilder {\n        this.informationDensity = informationDensity.coerceIn(0..MAXIMUM_INFO_DENSITY)\n        return this\n    }\n\n    /**\n     * Which [MaskPattern] to apply on the QRCode. Mostly for aesthetics. Defaults to [MaskPattern.PATTERN000].\n     *\n     * @see MaskPattern\n     */\n    fun withMaskPattern(maskPattern: MaskPattern): QRCodeBuilder {\n        this.maskPattern = maskPattern\n        return this\n    }\n\n    /**\n     * Size, in pixels, of the canvas the QRCode will be drawn into.\n     * The resulting image will be a square of [size] by [size].\n     *\n     * If this value is `<= 0` than the size will be computed from the data.\n     *\n     * Defaults to `0` (meaning the code will compute it from the data to be encoded)\n     *\n     * @param size Size, in pixels, of the canvas where to draw the QRCode. Defaults to `0` meaning it'll be computed from the data to be encoded.\n     */\n    fun withCanvasSize(size: Int): QRCodeBuilder {\n        this.canvasSize = size\n        return this\n    }\n\n    /**\n     * Offset drawing the QRCode on the X-axis (horizontal) by this many pixels.\n     *\n     * @param xOffset X-axis offset\n     */\n    fun withXOffset(xOffset: Int): QRCodeBuilder {\n        this.xOffset = xOffset\n        return this\n    }\n\n    /**\n     * Offset drawing the QRCode on the Y-axis (vertical) by this many pixels.\n     *\n     * @param yOffset Y-axis offset\n     */\n    fun withYOffset(yOffset: Int): QRCodeBuilder {\n        this.yOffset = yOffset\n        return this\n    }\n\n    /**\n     * Adds extra space around the QRCode.\n     *\n     * @param margin How many extra pixels to add around the QRCode\n     */\n    fun withMargin(margin: Int): QRCodeBuilder {\n        this.margin = margin\n        return this\n    }\n\n    private val beforeFn: QRCode.(QRCodeGraphics, Int, Int) -> Unit\n        get() = { canvas, xOffset, yOffset ->\n            drawLogoBeforeAction(canvas, xOffset, yOffset)\n            userDoBefore(canvas, xOffset, yOffset)\n        }\n\n    private val afterFn: QRCode.(QRCodeGraphics, Int, Int) -> Unit\n        get() = { canvas, xOffset, yOffset ->\n            drawLogoAction(canvas, xOffset, yOffset)\n            userDoAfter(canvas, xOffset, yOffset)\n        }\n\n    private val colorFunction: QRCodeColorFunction\n        get() = when (endColor) {\n            null -> customColorFunction ?: DefaultColorFunction(foreground = color, background)\n            else -> customColorFunction ?: LinearGradientColorFunction(\n                startForegroundColor = color,\n                endForegroundColor = endColor!!,\n                background,\n            )\n        }\n\n    /**\n     * Builds a [QRCode] instance ready to use.\n     *\n     * **Important:** if you want to use your own drawing instrument (for example an Android `Canvas` or a JVM\n     * `BufferedImage`) call `freshlyBuiltQrCode.graphics\n     *\n     * @see QRCode.renderToBytes\n     * @see QRCode.render\n     */\n    fun build(data: String) =\n        QRCode(\n            data = data,\n            squareSize = squareSize,\n            canvasSize = canvasSize,\n            xOffset = xOffset + margin,\n            yOffset = yOffset + margin,\n            colorFn = colorFunction,\n            shapeFn = customShapeFunction ?: when (shape) {\n                SQUARE, CUSTOM -> DefaultShapeFunction(squareSize, innerSpace = innerSpace)\n                CIRCLE -> CircleShapeFunction(squareSize, innerSpace = innerSpace)\n                ROUNDED_SQUARE -> RoundSquaresShapeFunction(squareSize, radiusInPixels, innerSpace = innerSpace)\n            },\n            graphicsFactory = graphicsFactory,\n            errorCorrectionLevel = errorCorrectionLevel,\n            informationDensity = when (informationDensity) {\n                0 -> QRCodeProcessor.infoDensityForDataAndECL(data, errorCorrectionLevel)\n                else -> informationDensity\n            },\n            maskPattern = maskPattern,\n            doBefore = beforeFn,\n            doAfter = afterFn,\n        ).apply {\n            if (margin > 0) {\n                resize(canvasSize + margin * 2)\n            }\n        }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/QRCodeShapesEnum.kt",
    "content": "package qrcode\n\nenum class QRCodeShapesEnum {\n    SQUARE,\n    CIRCLE,\n    ROUNDED_SQUARE,\n    CUSTOM\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/color/ColorType.kt",
    "content": "package qrcode.color\n\ntypealias ColorType = Int\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/color/Colors.kt",
    "content": "package qrcode.color\n\nimport qrcode.color.Colors.css\nimport qrcode.color.Colors.getRGBA\nimport qrcode.color.Colors.withAlpha\nimport kotlin.jvm.JvmStatic\n\n/**\n * Just a lot of colors to use when drawing :)\n *\n * The constants are all the CSS colors, taken from https://www.w3schools.com/colors/colors_names.asp\n *\n * @author Rafael Lins - g0dkar\n *\n * @see css\n * @see getRGBA\n * @see withAlpha\n */\n@Suppress(\"MemberVisibilityCanBePrivate\", \"unused\")\nobject Colors {\n    /** Very simple function to turn \"#cc0000\" into a color. */\n    @JvmStatic\n    fun css(str: String): Int =\n        str.substring(1..6).toInt(16) or 0xFF000000.toInt()\n\n    /** Builds an RGBA color value from its numerical components. All values must be between `0..255`. */\n    @JvmStatic\n    fun rgba(r: Int, g: Int, b: Int, a: Int = 255): Int =\n        a.coerceIn(0..255) and 0xFF shl 24 or\n            (r.coerceIn(0..255) and 0xFF shl 16) or\n            (g.coerceIn(0..255) and 0xFF shl 8) or\n            (b.coerceIn(0..255) and 0xFF shl 0)\n\n    /** Compute the R, G, B and Alpha components of a color. All values between `0..255`. */\n    @JvmStatic\n    fun getRGBA(color: Int): IntArray =\n        intArrayOf(\n            (color shr 16) and 0xFF,\n            (color shr 8) and 0xFF,\n            (color shr 0) and 0xFF,\n            (color shr 24) and 0xFF,\n        )\n\n    /** Compute the R, G, B and Alpha components of a color. All values between `0..255`. */\n    @JvmStatic\n    fun getRGBAPercentages(color: Int, maxValue: Double = 255.0): DoubleArray =\n        doubleArrayOf(\n            ((color shr 16) and 0xFF) / maxValue,\n            ((color shr 8) and 0xFF) / maxValue,\n            ((color shr 0) and 0xFF) / maxValue,\n            ((color shr 24) and 0xFF) / maxValue,\n        )\n\n    /**\n     * Returns the specified color with an added alpha channel. That means a transparent/opaque color.\n     *\n     * `alpha` ranges from 0 (completely transparent) to 255 (completely visible). Values outside this\n     * range are [coerced][coerceIn] into it.\n     */\n    @JvmStatic\n    fun withAlpha(color: Int, alpha: Int): Int =\n        (alpha.coerceIn(0..255) shl 24) + (color and 0xFFFFFF)\n\n    const val TRANSPARENT = 0x00000000\n    const val ALICE_BLUE = 0xFFF0F8FF.toInt()\n    const val ANTIQUE_WHITE = 0xFFFAEBD7.toInt()\n    const val AQUA = 0xFF00FFFF.toInt()\n    const val AQUAMARINE = 0xFF7FFFD4.toInt()\n    const val AZURE = 0xFFF0FFFF.toInt()\n    const val BEIGE = 0xFFF5F5DC.toInt()\n    const val BISQUE = 0xFFFFE4C4.toInt()\n    const val BLACK = 0xFF000000.toInt()\n    const val BLANCHED_ALMOND = 0xFFFFEBCD.toInt()\n    const val BLUE = 0xFF0000FF.toInt()\n    const val BLUE_VIOLET = 0xFF8A2BE2.toInt()\n    const val BROWN = 0xFFA52A2A.toInt()\n    const val BURLY_WOOD = 0xFFDEB887.toInt()\n    const val CADET_BLUE = 0xFF5F9EA0.toInt()\n    const val CHARTREUSE = 0xFF7FFF00.toInt()\n    const val CHOCOLATE = 0xFFD2691E.toInt()\n    const val CORAL = 0xFFFF7F50.toInt()\n    const val CORNFLOWER_BLUE = 0xFF6495ED.toInt()\n    const val CORNSILK = 0xFFFFF8DC.toInt()\n    const val CRIMSON = 0xFFDC143C.toInt()\n    const val CYAN = 0xFF00FFFF.toInt()\n    const val DARK_BLUE = 0xFF00008B.toInt()\n    const val DARK_CYAN = 0xFF008B8B.toInt()\n    const val DARK_GOLDEN_ROD = 0xFFB8860B.toInt()\n    const val DARK_GRAY = 0xFFA9A9A9.toInt()\n    const val DARK_GREY = 0xFFA9A9A9.toInt()\n    const val DARK_GREEN = 0xFF006400.toInt()\n    const val DARK_KHAKI = 0xFFBDB76B.toInt()\n    const val DARK_MAGENTA = 0xFF8B008B.toInt()\n    const val DARK_OLIVE_GREEN = 0xFF556B2F.toInt()\n    const val DARK_ORANGE = 0xFFFF8C00.toInt()\n    const val DARK_ORCHID = 0xFF9932CC.toInt()\n    const val DARK_RED = 0xFF8B0000.toInt()\n    const val DARK_SALMON = 0xFFE9967A.toInt()\n    const val DARK_SEA_GREEN = 0xFF8FBC8F.toInt()\n    const val DARK_SLATE_BLUE = 0xFF483D8B.toInt()\n    const val DARK_SLATE_GRAY = 0xFF2F4F4F.toInt()\n    const val DARK_SLATE_GREY = 0xFF2F4F4F.toInt()\n    const val DARK_TURQUOISE = 0xFF00CED1.toInt()\n    const val DARK_VIOLET = 0xFF9400D3.toInt()\n    const val DEEP_PINK = 0xFFFF1493.toInt()\n    const val DEEP_SKY_BLUE = 0xFF00BFFF.toInt()\n    const val DIM_GRAY = 0xFF696969.toInt()\n    const val DIM_GREY = 0xFF696969.toInt()\n    const val DODGER_BLUE = 0xFF1E90FF.toInt()\n    const val FIRE_BRICK = 0xFFB22222.toInt()\n    const val FLORAL_WHITE = 0xFFFFFAF0.toInt()\n    const val FOREST_GREEN = 0xFF228B22.toInt()\n    const val FUCHSIA = 0xFFFF00FF.toInt()\n    const val GAINSBORO = 0xFFDCDCDC.toInt()\n    const val GHOST_WHITE = 0xFFF8F8FF.toInt()\n    const val GOLD = 0xFFFFD700.toInt()\n    const val GOLDEN_ROD = 0xFFDAA520.toInt()\n    const val GRAY = 0xFF808080.toInt()\n    const val GREY = 0xFF808080.toInt()\n    const val GREEN = 0xFF008000.toInt()\n    const val GREEN_YELLOW = 0xFFADFF2F.toInt()\n    const val HONEY_DEW = 0xFFF0FFF0.toInt()\n    const val HOT_PINK = 0xFFFF69B4.toInt()\n    const val INDIAN_RED = 0xFFCD5C5C.toInt()\n    const val INDIGO = 0xFF4B0082.toInt()\n    const val IVORY = 0xFFFFFFF0.toInt()\n    const val KHAKI = 0xFFF0E68C.toInt()\n    const val LAVENDER = 0xFFE6E6FA.toInt()\n    const val LAVENDER_BLUSH = 0xFFFFF0F5.toInt()\n    const val LAWN_GREEN = 0xFF7CFC00.toInt()\n    const val LEMON_CHIFFON = 0xFFFFFACD.toInt()\n    const val LIGHT_BLUE = 0xFFADD8E6.toInt()\n    const val LIGHT_CORAL = 0xFFF08080.toInt()\n    const val LIGHT_CYAN = 0xFFE0FFFF.toInt()\n    const val LIGHT_GOLDEN_ROD_YELLOW = 0xFFFAFAD2.toInt()\n    const val LIGHT_GRAY = 0xFFD3D3D3.toInt()\n    const val LIGHT_GREY = 0xFFD3D3D3.toInt()\n    const val LIGHT_GREEN = 0xFF90EE90.toInt()\n    const val LIGHT_PINK = 0xFFFFB6C1.toInt()\n    const val LIGHT_SALMON = 0xFFFFA07A.toInt()\n    const val LIGHT_SEA_GREEN = 0xFF20B2AA.toInt()\n    const val LIGHT_SKY_BLUE = 0xFF87CEFA.toInt()\n    const val LIGHT_SLATE_GRAY = 0xFF778899.toInt()\n    const val LIGHT_SLATE_GREY = 0xFF778899.toInt()\n    const val LIGHT_STEEL_BLUE = 0xFFB0C4DE.toInt()\n    const val LIGHT_YELLOW = 0xFFFFFFE0.toInt()\n    const val LIME = 0xFF00FF00.toInt()\n    const val LIME_GREEN = 0xFF32CD32.toInt()\n    const val LINEN = 0xFFFAF0E6.toInt()\n    const val MAGENTA = 0xFFFF00FF.toInt()\n    const val MAROON = 0xFF800000.toInt()\n    const val MEDIUM_AQUA_MARINE = 0xFF66CDAA.toInt()\n    const val MEDIUM_BLUE = 0xFF0000CD.toInt()\n    const val MEDIUM_ORCHID = 0xFFBA55D3.toInt()\n    const val MEDIUM_PURPLE = 0xFF9370DB.toInt()\n    const val MEDIUM_SEA_GREEN = 0xFF3CB371.toInt()\n    const val MEDIUM_SLATE_BLUE = 0xFF7B68EE.toInt()\n    const val MEDIUM_SPRING_GREEN = 0xFF00FA9A.toInt()\n    const val MEDIUM_TURQUOISE = 0xFF48D1CC.toInt()\n    const val MEDIUM_VIOLET_RED = 0xFFC71585.toInt()\n    const val MIDNIGHT_BLUE = 0xFF191970.toInt()\n    const val MINT_CREAM = 0xFFF5FFFA.toInt()\n    const val MISTY_ROSE = 0xFFFFE4E1.toInt()\n    const val MOCCASIN = 0xFFFFE4B5.toInt()\n    const val NAVAJO_WHITE = 0xFFFFDEAD.toInt()\n    const val NAVY = 0xFF000080.toInt()\n    const val OLD_LACE = 0xFFFDF5E6.toInt()\n    const val OLIVE = 0xFF808000.toInt()\n    const val OLIVE_DRAB = 0xFF6B8E23.toInt()\n    const val ORANGE = 0xFFFFA500.toInt()\n    const val ORANGE_RED = 0xFFFF4500.toInt()\n    const val ORCHID = 0xFFDA70D6.toInt()\n    const val PALE_GOLDEN_ROD = 0xFFEEE8AA.toInt()\n    const val PALE_GREEN = 0xFF98FB98.toInt()\n    const val PALE_TURQUOISE = 0xFFAFEEEE.toInt()\n    const val PALE_VIOLET_RED = 0xFFDB7093.toInt()\n    const val PAPAYA_WHIP = 0xFFFFEFD5.toInt()\n    const val PEACH_PUFF = 0xFFFFDAB9.toInt()\n    const val PERU = 0xFFCD853F.toInt()\n    const val PINK = 0xFFFFC0CB.toInt()\n    const val PLUM = 0xFFDDA0DD.toInt()\n    const val POWDER_BLUE = 0xFFB0E0E6.toInt()\n    const val PURPLE = 0xFF800080.toInt()\n    const val REBECCA_PURPLE = 0xFF663399.toInt()\n    const val RED = 0xFFFF0000.toInt()\n    const val ROSY_BROWN = 0xFFBC8F8F.toInt()\n    const val ROYAL_BLUE = 0xFF4169E1.toInt()\n    const val SADDLE_BROWN = 0xFF8B4513.toInt()\n    const val SALMON = 0xFFFA8072.toInt()\n    const val SANDY_BROWN = 0xFFF4A460.toInt()\n    const val SEA_GREEN = 0xFF2E8B57.toInt()\n    const val SEA_SHELL = 0xFFFFF5EE.toInt()\n    const val SIENNA = 0xFFA0522D.toInt()\n    const val SILVER = 0xFFC0C0C0.toInt()\n    const val SKY_BLUE = 0xFF87CEEB.toInt()\n    const val SLATE_BLUE = 0xFF6A5ACD.toInt()\n    const val SLATE_GRAY = 0xFF708090.toInt()\n    const val SLATE_GREY = 0xFF708090.toInt()\n    const val SNOW = 0xFFFFFAFA.toInt()\n    const val SPRING_GREEN = 0xFF00FF7F.toInt()\n    const val STEEL_BLUE = 0xFF4682B4.toInt()\n    const val TAN = 0xFFD2B48C.toInt()\n    const val TEAL = 0xFF008080.toInt()\n    const val THISTLE = 0xFFD8BFD8.toInt()\n    const val TOMATO = 0xFFFF6347.toInt()\n    const val TURQUOISE = 0xFF40E0D0.toInt()\n    const val VIOLET = 0xFFEE82EE.toInt()\n    const val WHEAT = 0xFFF5DEB3.toInt()\n    const val WHITE = 0xFFFFFFFF.toInt()\n    const val WHITE_SMOKE = 0xFFF5F5F5.toInt()\n    const val YELLOW = 0xFFFFFF00.toInt()\n    const val YELLOW_GREEN = 0xFF9ACD32.toInt()\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/color/DefaultColorFunction.kt",
    "content": "package qrcode.color\n\nimport qrcode.QRCode\nimport qrcode.render.QRCodeGraphics\n\n/**\n * Default function for the QRCode cell color. Returns a color for the foreground (\"dark\") and another for the\n * background and margin.\n *\n * The default colors is [Colors.BLACK] for the foreground and [Colors.WHITE] for the background.\n */\nopen class DefaultColorFunction(\n    private val foreground: Int = Colors.BLACK,\n    private val background: Int = Colors.TRANSPARENT,\n) : QRCodeColorFunction {\n    override fun fg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int = foreground\n    override fun bg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int = background\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/color/LinearGradientColorFunction.kt",
    "content": "package qrcode.color\n\nimport qrcode.QRCode\nimport qrcode.render.QRCodeGraphics\nimport kotlin.jvm.JvmOverloads\nimport kotlin.math.roundToInt\n\n@Suppress(\"MemberVisibilityCanBePrivate\")\nclass LinearGradientColorFunction @JvmOverloads constructor(\n    val startForegroundColor: Int,\n    val endForegroundColor: Int,\n    val backgroundColor: Int = Colors.WHITE,\n    var vertical: Boolean = true,\n) : QRCodeColorFunction {\n    private val startComponents = Colors.getRGBA(startForegroundColor)\n    private val endComponents = Colors.getRGBA(endForegroundColor)\n\n    override fun fg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int {\n        val pct: Double = if (vertical) {\n            row\n        } else {\n            col\n        } / qrCode.rawData.size.toDouble()\n\n        val r = startComponents[0] * (1 - pct) + endComponents[0] * pct\n        val g = startComponents[1] * (1 - pct) + endComponents[1] * pct\n        val b = startComponents[2] * (1 - pct) + endComponents[2] * pct\n\n        return Colors.rgba(\n            r.roundToInt().coerceIn(0..255),\n            g.roundToInt().coerceIn(0..255),\n            b.roundToInt().coerceIn(0..255),\n            255,\n        )\n    }\n\n    override fun bg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int = backgroundColor\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/color/QRCodeColorFunction.kt",
    "content": "package qrcode.color\n\nimport qrcode.QRCode\nimport qrcode.internals.QRCodeSquare\nimport qrcode.render.QRCodeGraphics\n\n/**\n * A function that selects a color for a give square. The default implementation chooses between [fg], [bg] and [margin]\n * given what should be rendered.\n */\ninterface QRCodeColorFunction {\n    fun colorFn(square: QRCodeSquare, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int =\n        when (square.dark) {\n            true -> fg(square.row, square.col, qrCode, qrCodeGraphics)\n            else -> bg(square.row, square.col, qrCode, qrCodeGraphics)\n        }\n\n    /**\n     * Called before rendering starts, to setup something if needed\n     */\n    fun beforeRender(qrCode: QRCode, qrCodeGraphics: QRCodeGraphics) {\n        // Do nothing\n    }\n\n    /**\n     * What is the foreground color\n     */\n    fun fg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int\n\n    /**\n     * What is the background color\n     */\n    fun bg(row: Int, col: Int, qrCode: QRCode, qrCodeGraphics: QRCodeGraphics): Int\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/exception/InsufficientInformationDensityException.kt",
    "content": "package qrcode.exception\n\n/**\n * Thrown when the Information Density parameter is not enough to hold all the data that needs to be encoded in the\n * QRCode.\n */\nclass InsufficientInformationDensityException(\n    override val message: String? = null,\n    override val cause: Throwable? = null,\n) : IllegalArgumentException(message, cause)\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/BitBuffer.kt",
    "content": "package qrcode.internals\n\nimport kotlin.js.JsName\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/BitBuffer.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\ninternal class BitBuffer {\n    var buffer: IntArray\n        private set\n    var lengthInBits: Int\n        private set\n    private val increments = 32\n\n    private operator fun get(index: Int): Boolean =\n        buffer[index / 8] ushr 7 - index % 8 and 1 == 1\n\n    fun put(num: Int, length: Int) {\n        for (i in 0 until length) {\n            put(num ushr length - i - 1 and 1 == 1)\n        }\n    }\n\n    @JsName(\"putBit\")\n    fun put(bit: Boolean) {\n        if (lengthInBits == buffer.size * 8) {\n            buffer = buffer.copyOf(buffer.size + increments)\n        }\n        if (bit) {\n            buffer[lengthInBits / 8] = buffer[lengthInBits / 8] or (0x80 ushr lengthInBits % 8)\n        }\n        lengthInBits++\n    }\n\n    init {\n        buffer = IntArray(increments)\n        lengthInBits = 0\n    }\n\n    override fun toString(): String {\n        val buffer = StringBuilder()\n        for (i in 0 until lengthInBits) {\n            buffer.append(if (get(i)) '1' else '0')\n        }\n        return buffer.toString()\n    }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/ErrorMessage.kt",
    "content": "package qrcode.internals\n\n/**\n * Helps generates error messages.\n *\n * @author Rafael Lins - g0dkar\n */\ninternal object ErrorMessage {\n    private const val BUG_REPORT_URL =\n        \"https://github.com/g0dkar/qrcode-kotlin/issues/new?assignees=g0dkar&labels=bug&template=bug_report.md&title=\"\n\n    /** Generates an error message with a \"Please report\" appended to it. */\n    fun error(string: String) =\n        \"$string - Please, report this error via this URL: $BUG_REPORT_URL\"\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/Polynomial.kt",
    "content": "package qrcode.internals\n\nimport qrcode.internals.QRMath.gexp\nimport qrcode.internals.QRMath.glog\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/Polynomial.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\ninternal class Polynomial(num: IntArray, shift: Int = 0) {\n    val data: IntArray\n\n    init {\n        val offset = num.indexOfFirst { it != 0 }.coerceAtLeast(0)\n        this.data = IntArray(num.size - offset + shift) { 0 }\n        arraycopy(num, offset, this.data, 0, num.size - offset)\n    }\n\n    private fun arraycopy(from: IntArray, fromPos: Int, to: IntArray, toPos: Int, length: Int) {\n        for (i in 0 until length) {\n            to[toPos + i] = from[fromPos + i]\n        }\n    }\n\n    operator fun get(i: Int) = data[i]\n\n    fun len(): Int = data.size\n\n    fun multiply(other: Polynomial): Polynomial =\n        IntArray(len() + other.len() - 1) { 0 }\n            .let {\n                for (i in 0 until len()) {\n                    for (j in 0 until other.len()) {\n                        it[i + j] = it[i + j] xor gexp(glog(this[i]) + glog(other[j]))\n                    }\n                }\n\n                Polynomial(it)\n            }\n\n    fun mod(other: Polynomial): Polynomial =\n        if (len() - other.len() < 0) {\n            this\n        } else {\n            val ratio = glog(this[0]) - glog(other[0])\n            val result = data.copyOf()\n\n            other.data.forEachIndexed { i, it ->\n                result[i] = result[i] xor gexp(glog(it) + ratio)\n            }\n\n            Polynomial(result).mod(other)\n        }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/QRCodeSetup.kt",
    "content": "package qrcode.internals\n\nimport qrcode.internals.QRCodeRegion.BOTTOM_LEFT_CORNER\nimport qrcode.internals.QRCodeRegion.BOTTOM_MID\nimport qrcode.internals.QRCodeRegion.BOTTOM_RIGHT_CORNER\nimport qrcode.internals.QRCodeRegion.CENTER\nimport qrcode.internals.QRCodeRegion.LEFT_MID\nimport qrcode.internals.QRCodeRegion.MARGIN\nimport qrcode.internals.QRCodeRegion.RIGHT_MID\nimport qrcode.internals.QRCodeRegion.TOP_LEFT_CORNER\nimport qrcode.internals.QRCodeRegion.TOP_MID\nimport qrcode.internals.QRCodeRegion.TOP_RIGHT_CORNER\nimport qrcode.internals.QRCodeRegion.UNKNOWN\nimport qrcode.internals.QRCodeSquareType.POSITION_ADJUST\nimport qrcode.internals.QRCodeSquareType.POSITION_PROBE\nimport qrcode.internals.QRCodeSquareType.TIMING_PATTERN\nimport qrcode.raw.ErrorCorrectionLevel\nimport qrcode.raw.MaskPattern\n\n/**\n * Object with helper methods and constants to setup stuff into the QRCode such as Position Probes and Timing Probes.\n *\n * @author Rafael Lins - g0dkar\n */\n@Suppress(\"MemberVisibilityCanBePrivate\")\ninternal object QRCodeSetup {\n    private const val DEFAULT_PROBE_SIZE = 7\n\n    fun setupTopLeftPositionProbePattern(\n        modules: Array<Array<QRCodeSquare?>>,\n        probeSize: Int = DEFAULT_PROBE_SIZE,\n    ) {\n        setupPositionProbePattern(0, 0, modules, probeSize)\n    }\n\n    fun setupTopRightPositionProbePattern(\n        modules: Array<Array<QRCodeSquare?>>,\n        probeSize: Int = DEFAULT_PROBE_SIZE,\n    ) {\n        setupPositionProbePattern(modules.size - probeSize, 0, modules, probeSize)\n    }\n\n    fun setupBottomLeftPositionProbePattern(\n        modules: Array<Array<QRCodeSquare?>>,\n        probeSize: Int = DEFAULT_PROBE_SIZE,\n    ) {\n        setupPositionProbePattern(0, modules.size - probeSize, modules, probeSize)\n    }\n\n    fun setupPositionProbePattern(\n        rowOffset: Int,\n        colOffset: Int,\n        modules: Array<Array<QRCodeSquare?>>,\n        probeSize: Int = DEFAULT_PROBE_SIZE,\n    ) {\n        val modulesSize = modules.size\n\n        val squareData = QRCodeSquare(\n            dark = false,\n            row = rowOffset,\n            col = colOffset,\n            rowSize = probeSize,\n            colSize = probeSize,\n            squareInfo = QRCodeSquareInfo(POSITION_PROBE, UNKNOWN),\n            moduleSize = modulesSize,\n        )\n\n        for (row in -1..probeSize) {\n            for (col in -1..probeSize) {\n                if (!isInsideModules(row, rowOffset, col, colOffset, modulesSize)) {\n                    continue\n                }\n\n                val isDark = isTopBottomRowSquare(row, col, probeSize) ||\n                    isLeftRightColSquare(row, col, probeSize) ||\n                    isMidSquare(row, col, probeSize)\n\n                val region = findSquareRegion(row, col, probeSize)\n\n                modules[row + rowOffset][col + colOffset] = QRCodeSquare(\n                    dark = isDark,\n                    row = row + rowOffset,\n                    col = col + colOffset,\n                    squareInfo = QRCodeSquareInfo(POSITION_PROBE, region),\n                    moduleSize = modulesSize,\n                    parent = squareData,\n                )\n            }\n        }\n    }\n\n    private fun isInsideModules(row: Int, rowOffset: Int, col: Int, colOffset: Int, modulesSize: Int) =\n        row + rowOffset in 0 until modulesSize && col + colOffset in 0 until modulesSize\n\n    private fun isTopBottomRowSquare(row: Int, col: Int, probeSize: Int) =\n        col in 0 until probeSize && (row == 0 || row == probeSize - 1)\n\n    private fun isLeftRightColSquare(row: Int, col: Int, probeSize: Int) =\n        row in 0 until probeSize && (col == 0 || col == probeSize - 1)\n\n    private fun isMidSquare(row: Int, col: Int, probeSize: Int) =\n        row in 2 until (probeSize - 2) && 2 <= col && col <= probeSize - 3\n\n    private fun findSquareRegion(row: Int, col: Int, probeSize: Int) =\n        when (row) {\n            0 -> when (col) { // 0 x ?: ┌───┐\n                0 -> TOP_LEFT_CORNER // 0 x 0: ┌\n                probeSize - 1 -> TOP_RIGHT_CORNER // 0 x MAX: ┐\n                probeSize -> MARGIN // Outside boundaries\n                else -> TOP_MID // between: ─\n            }\n\n            probeSize - 1 -> when (col) { // MAX x ?: └───┘\n                0 -> BOTTOM_LEFT_CORNER // MAX x 0: └\n                probeSize - 1 -> BOTTOM_RIGHT_CORNER // MAX x MAX: ┘\n                probeSize -> MARGIN // Outside boundaries\n                else -> BOTTOM_MID // between: ─\n            }\n\n            probeSize -> MARGIN // Outside boundaries\n\n            else -> when (col) { // Inside boundaries but not in any edge\n                0 -> LEFT_MID\n                probeSize - 1 -> RIGHT_MID\n                probeSize -> MARGIN // Outside boundaries\n                else -> CENTER // Middle/Center square\n            }\n        }\n\n    fun setupPositionAdjustPattern(type: Int, modules: Array<Array<QRCodeSquare?>>) {\n        val pos = QRUtil.getPatternPosition(type)\n\n        for (i in pos.indices) {\n            for (j in pos.indices) {\n                val row = pos[i]\n                val col = pos[j]\n\n                if (modules[row][col] != null) {\n                    continue\n                }\n\n                val squareData = QRCodeSquare(\n                    dark = false,\n                    row = row - 2,\n                    col = col - 2,\n                    rowSize = 6,\n                    colSize = 6,\n                    squareInfo = QRCodeSquareInfo(POSITION_ADJUST, UNKNOWN),\n                    moduleSize = modules.size,\n                )\n\n                for (r in -2..2) {\n                    for (c in -2..2) {\n                        modules[row + r][col + c] = QRCodeSquare(\n                            dark = r == -2 || r == 2 || c == -2 || c == 2 || r == 0 && c == 0,\n                            row = row + r,\n                            col = col + c,\n                            squareInfo = QRCodeSquareInfo(POSITION_ADJUST, UNKNOWN),\n                            moduleSize = modules.size,\n                            parent = squareData,\n                        )\n                    }\n                }\n            }\n        }\n    }\n\n    fun setupTimingPattern(moduleCount: Int, modules: Array<Array<QRCodeSquare?>>) {\n        for (r in 8 until moduleCount - 8) {\n            if (modules[r][6] != null) {\n                continue\n            }\n\n            modules[r][6] = QRCodeSquare(\n                dark = r % 2 == 0,\n                row = r,\n                col = 6,\n                squareInfo = QRCodeSquareInfo(TIMING_PATTERN, UNKNOWN),\n                moduleSize = modules.size,\n                parent = null,\n            )\n        }\n\n        for (c in 8 until moduleCount - 8) {\n            if (modules[6][c] != null) {\n                continue\n            }\n\n            modules[6][c] = QRCodeSquare(\n                dark = c % 2 == 0,\n                row = 6,\n                col = c,\n                squareInfo = QRCodeSquareInfo(TIMING_PATTERN, UNKNOWN),\n                moduleSize = modules.size,\n                parent = null,\n            )\n        }\n    }\n\n    fun setupTypeInfo(\n        errorCorrectionLevel: ErrorCorrectionLevel,\n        maskPattern: MaskPattern,\n        moduleCount: Int,\n        modules: Array<Array<QRCodeSquare?>>,\n    ) {\n        val data = errorCorrectionLevel.value shl 3 or maskPattern.ordinal\n        val bits = QRUtil.getBCHTypeInfo(data)\n\n        for (i in 0..14) {\n            val mod = bits shr i and 1 == 1\n\n            if (i < 6) {\n                set(i, 8, mod, modules)\n            } else if (i < 8) {\n                set(i + 1, 8, mod, modules)\n            } else {\n                set(moduleCount - 15 + i, 8, mod, modules)\n            }\n        }\n\n        for (i in 0..14) {\n            val mod = bits shr i and 1 == 1\n\n            if (i < 8) {\n                set(8, moduleCount - i - 1, mod, modules)\n            } else if (i < 9) {\n                set(8, 15 - i, mod, modules)\n            } else {\n                set(8, 15 - i - 1, mod, modules)\n            }\n        }\n\n        set(moduleCount - 8, 8, true, modules)\n    }\n\n    fun setupTypeNumber(type: Int, moduleCount: Int, modules: Array<Array<QRCodeSquare?>>) {\n        val bits = QRUtil.getBCHTypeNumber(type)\n\n        for (i in 0..17) {\n            val mod = bits shr i and 1 == 1\n            set(i / 3, i % 3 + moduleCount - 8 - 3, mod, modules)\n        }\n\n        for (i in 0..17) {\n            val mod = bits shr i and 1 == 1\n            set(i % 3 + moduleCount - 8 - 3, i / 3, mod, modules)\n        }\n    }\n\n    fun applyMaskPattern(\n        data: IntArray,\n        maskPattern: MaskPattern,\n        moduleCount: Int,\n        modules: Array<Array<QRCodeSquare?>>,\n    ) {\n        var inc = -1\n        var bitIndex = 7\n        var byteIndex = 0\n        var row = moduleCount - 1\n        var col = moduleCount - 1\n\n        while (col > 0) {\n            if (col == 6) {\n                col--\n            }\n\n            while (true) {\n                for (c in 0..1) {\n                    if (modules[row][col - c] == null) {\n                        var dark = false\n\n                        if (byteIndex < data.size) {\n                            dark = (data[byteIndex] ushr bitIndex) and 1 == 1\n                        }\n\n                        val mask = QRUtil.getMask(maskPattern, row, col - c)\n                        if (mask) {\n                            dark = !dark\n                        }\n\n                        set(row, col - c, dark, modules)\n\n                        bitIndex--\n                        if (bitIndex == -1) {\n                            byteIndex++\n                            bitIndex = 7\n                        }\n                    }\n                }\n\n                row += inc\n                if (row < 0 || moduleCount <= row) {\n                    row -= inc\n                    inc = -inc\n                    break\n                }\n            }\n\n            col -= 2\n        }\n    }\n\n    private fun set(\n        row: Int,\n        col: Int,\n        value: Boolean,\n        modules: Array<Array<QRCodeSquare?>>,\n        parent: QRCodeSquare? = null,\n    ) {\n        val qrCodeSquare = modules[row][col]\n\n        if (qrCodeSquare != null) {\n            qrCodeSquare.dark = value\n        } else {\n            modules[row][col] = QRCodeSquare(\n                dark = value,\n                row = row,\n                col = col,\n                moduleSize = modules.size,\n                parent = parent,\n            )\n        }\n    }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/QRCodeSquare.kt",
    "content": "package qrcode.internals\n\nimport qrcode.internals.QRCodeRegion.BOTTOM_LEFT_CORNER\nimport qrcode.internals.QRCodeRegion.BOTTOM_RIGHT_CORNER\nimport qrcode.internals.QRCodeRegion.TOP_LEFT_CORNER\nimport qrcode.internals.QRCodeRegion.TOP_RIGHT_CORNER\nimport qrcode.internals.QRCodeRegion.UNKNOWN\nimport qrcode.internals.QRCodeSquareType.DEFAULT\nimport qrcode.raw.QRCodeProcessor\nimport kotlin.jvm.JvmOverloads\n\n/**\n * Represents a single QRCode square unit. It has information about its \"color\" (either dark or bright),\n * its position (row and column) and what it represents.\n *\n * It can be part of a position probe (aka those big squares at the extremities), part of a position\n * adjustment square, part of a timing pattern or just another square as any other :)\n *\n * @author Rafael Lins - g0dkar\n */\ndata class QRCodeSquare(\n    /** Is this a painted square? */\n    var dark: Boolean,\n    /** The row (top-to-bottom) that this square represents. */\n    val row: Int,\n    /** The column (left-to-right) that this square represents. */\n    val col: Int,\n    /** How big is the whole QRCode matrix? (e.g. if this is \"16\" then this is part of a 16x16 matrix) */\n    val moduleSize: Int,\n    /** What does this square represent within the QRCode? */\n    val squareInfo: QRCodeSquareInfo = QRCodeSquareInfo(DEFAULT, UNKNOWN),\n    /** How many actual QRCode squares this one take up? (1 = a single square, >1 = likely a probe) */\n    val rowSize: Int = 1,\n    /** How many actual QRCode squares this one take up? (1 = a single square, >1 = likely a probe) */\n    val colSize: Int = 1,\n    /** Filled if this square is part of a larger one (like a [QRCodeSquareType.POSITION_PROBE]) */\n    val parent: QRCodeSquare? = null,\n) {\n    var rendered: Boolean = false\n\n    /** Calculates where is the X position where this square will be in the main QRCode image given a [cellSize]. */\n    @JvmOverloads\n    fun absoluteX(cellSize: Int = QRCodeProcessor.DEFAULT_CELL_SIZE): Int = col * cellSize\n\n    /** Calculates where is the Y position where this square will be in the main QRCode image given a [cellSize]. */\n    @JvmOverloads\n    fun absoluteY(cellSize: Int = QRCodeProcessor.DEFAULT_CELL_SIZE): Int = row * cellSize\n\n    override fun equals(other: Any?): Boolean {\n        if (this === other) return true\n        if (other == null || this::class != other::class) return false\n\n        other as QRCodeSquare\n\n        if (row != other.row) return false\n        if (col != other.col) return false\n        if (rowSize != other.rowSize) return false\n        if (colSize != other.colSize) return false\n\n        return true\n    }\n\n    override fun hashCode(): Int {\n        var result = row\n        result = 31 * result + col\n        result = 31 * result + rowSize\n        result = 31 * result + colSize\n        return result\n    }\n}\n\n/**\n * Returns information on the square itself. It has the [type] of square and its [region] within its relative type.\n *\n * For example, if `type = POSITION_PROBE` then [region] will represent where within the Position Probe this square\n * is positioned. A [region] of [QRCodeRegion.TOP_LEFT_CORNER] for example represents the top left corner of the\n * position probe this particular square is part of (a QRCode have 3 position probes).\n */\ndata class QRCodeSquareInfo(\n    val type: QRCodeSquareType,\n    val region: QRCodeRegion,\n)\n\n/**\n * The types available for squares in a QRCode.\n *\n * @author Rafael Lins - g0dkar\n */\nenum class QRCodeSquareType {\n    /** Part of a position probe: one of those big squares at the extremities of the QRCode. */\n    POSITION_PROBE,\n\n    /** Part of a position adjustment pattern: just like a position probe, but much smaller. */\n    POSITION_ADJUST,\n\n    /** Part of the timing pattern. Make it a square like any other :) */\n    TIMING_PATTERN,\n\n    /** Anything special. Just a square. */\n    DEFAULT,\n}\n\n/**\n * Represents which part/region of a given square type a particular, single square is.\n *\n * For example, a position probe is visually composed of multiple squares that form a bigger one.\n *\n * For example, this is what a position probe normally looks like (squares spaced for ease of understanding):\n *\n * ```\n * A■■■■B\n * ■ ■■ ■\n * ■ ■■ ■\n * C■■■■D\n * ```\n *\n * The positions marked with `A`, `B`, `C` and `D` would be regions [TOP_LEFT_CORNER], [TOP_RIGHT_CORNER],\n * [BOTTOM_LEFT_CORNER] and [BOTTOM_RIGHT_CORNER] respectively.\n */\nenum class QRCodeRegion {\n    TOP_LEFT_CORNER,\n    TOP_RIGHT_CORNER,\n    TOP_MID,\n    LEFT_MID,\n    RIGHT_MID,\n    CENTER,\n    BOTTOM_LEFT_CORNER,\n    BOTTOM_RIGHT_CORNER,\n    BOTTOM_MID,\n    MARGIN,\n    UNKNOWN\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/QRData.kt",
    "content": "package qrcode.internals\n\nimport qrcode.raw.QRCodeDataType\nimport qrcode.raw.QRCodeDataType.DEFAULT\nimport qrcode.raw.QRCodeDataType.NUMBERS\nimport qrcode.raw.QRCodeDataType.UPPER_ALPHA_NUM\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/QRData.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\ninternal abstract class QRData(val dataType: QRCodeDataType, val data: String) {\n    abstract fun length(): Int\n\n    abstract fun write(buffer: BitBuffer)\n\n    fun getLengthInBits(type: Int): Int =\n        when (type) {\n            in 1..9 -> {\n                when (dataType) {\n                    NUMBERS -> 10\n                    UPPER_ALPHA_NUM -> 9\n                    DEFAULT -> 8\n                }\n            }\n            in 1..26 -> {\n                when (dataType) {\n                    NUMBERS -> 12\n                    UPPER_ALPHA_NUM -> 11\n                    DEFAULT -> 16\n                }\n            }\n            in 1..40 -> {\n                when (dataType) {\n                    NUMBERS -> 14\n                    UPPER_ALPHA_NUM -> 13\n                    DEFAULT -> 16\n                }\n            }\n            else -> {\n                throw IllegalArgumentException(\"'type' must be greater than 0 and cannot be greater than 40: $type\")\n            }\n        }\n}\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/QR8BitByte.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\ninternal class QR8BitByte(data: String) : QRData(DEFAULT, data) {\n    private val dataBytes = data.encodeToByteArray()\n\n    override fun write(buffer: BitBuffer) {\n        for (i in dataBytes.indices) {\n            buffer.put(dataBytes[i].toInt(), 8)\n        }\n    }\n\n    override fun length(): Int =\n        dataBytes.size\n}\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/QRAlphaNum.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\ninternal class QRAlphaNum(data: String) : QRData(UPPER_ALPHA_NUM, data) {\n    override fun write(buffer: BitBuffer) {\n        var i = 0\n        val dataLength = data.length\n        while (i + 1 < dataLength) {\n            buffer.put(charCode(data[i]) * 45 + charCode(data[i + 1]), 11)\n            i += 2\n        }\n        if (i < dataLength) {\n            buffer.put(charCode(data[i]), 6)\n        }\n    }\n\n    override fun length(): Int = data.length\n\n    private fun charCode(c: Char): Int =\n        when (c) {\n            in '0'..'9' -> c - '0'\n            in 'A'..'Z' -> c - 'A' + 10\n            else -> {\n                when (c) {\n                    ' ' -> 36\n                    '$' -> 37\n                    '%' -> 38\n                    '*' -> 39\n                    '+' -> 40\n                    '-' -> 41\n                    '.' -> 42\n                    '/' -> 43\n                    ':' -> 44\n                    else -> throw IllegalArgumentException(\"Illegal character: $c\")\n                }\n            }\n        }\n}\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/QRNumber.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\ninternal class QRNumber(data: String) : QRData(NUMBERS, data) {\n    override fun write(buffer: BitBuffer) {\n        var i = 0\n        val len = length()\n\n        while (i + 2 < len) {\n            val num = data.substring(i, i + 3).toInt()\n            buffer.put(num, 10)\n            i += 3\n        }\n\n        if (i < len) {\n            if (len - i == 1) {\n                val num = data.substring(i, i + 1).toInt()\n                buffer.put(num, 4)\n            } else if (len - i == 2) {\n                val num = data.substring(i, i + 2).toInt()\n                buffer.put(num, 7)\n            }\n        }\n    }\n\n    override fun length(): Int = data.length\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/QRMath.kt",
    "content": "package qrcode.internals\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/QRMath.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\ninternal object QRMath {\n    private val EXP_TABLE = IntArray(256)\n    private val LOG_TABLE = IntArray(256)\n\n    fun glog(n: Int): Int = LOG_TABLE[n]\n\n    fun gexp(n: Int): Int {\n        var i = n\n        while (i < 0) {\n            i += 255\n        }\n        while (i >= 256) {\n            i -= 255\n        }\n        return EXP_TABLE[i]\n    }\n\n    /**\n     * From https://math.stackexchange.com/a/3086626/874981\n     */\n    fun rectsIntersect(x1: Int, y1: Int, w1: Int, h1: Int, x2: Int, y2: Int, w2: Int, h2: Int): Boolean {\n        val x1End = x1 + w1\n        val y1End = y1 + h1\n        val x2End = x2 + w2\n        val y2End = y2 + h2\n\n        return x1End < x2 || x1 > x2End || y1End < y2 || y1 > y2End\n    }\n\n    init {\n        for (i in 0..7) {\n            EXP_TABLE[i] = 1 shl i\n        }\n\n        for (i in 8..255) {\n            EXP_TABLE[i] = (\n                EXP_TABLE[i - 4]\n                    xor EXP_TABLE[i - 5]\n                    xor EXP_TABLE[i - 6]\n                    xor EXP_TABLE[i - 8]\n                )\n        }\n\n        for (i in 0..254) {\n            LOG_TABLE[EXP_TABLE[i]] = i\n        }\n    }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/QRUtil.kt",
    "content": "package qrcode.internals\n\nimport qrcode.raw.ErrorCorrectionLevel\nimport qrcode.raw.MaskPattern\nimport qrcode.raw.MaskPattern.PATTERN000\nimport qrcode.raw.MaskPattern.PATTERN001\nimport qrcode.raw.MaskPattern.PATTERN010\nimport qrcode.raw.MaskPattern.PATTERN011\nimport qrcode.raw.MaskPattern.PATTERN100\nimport qrcode.raw.MaskPattern.PATTERN101\nimport qrcode.raw.MaskPattern.PATTERN110\nimport qrcode.raw.MaskPattern.PATTERN111\nimport qrcode.raw.QRCodeDataType\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/QRUtil.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\ninternal object QRUtil {\n    fun getPatternPosition(typeNumber: Int): IntArray = PATTERN_POSITION_TABLE[typeNumber - 1]\n\n    private val PATTERN_POSITION_TABLE = arrayOf(\n        intArrayOf(),\n        intArrayOf(6, 18),\n        intArrayOf(6, 22),\n        intArrayOf(6, 26),\n        intArrayOf(6, 30),\n        intArrayOf(6, 34),\n        intArrayOf(6, 22, 38),\n        intArrayOf(6, 24, 42),\n        intArrayOf(6, 26, 46),\n        intArrayOf(6, 28, 50),\n        intArrayOf(6, 30, 54),\n        intArrayOf(6, 32, 58),\n        intArrayOf(6, 34, 62),\n        intArrayOf(6, 26, 46, 66),\n        intArrayOf(6, 26, 48, 70),\n        intArrayOf(6, 26, 50, 74),\n        intArrayOf(6, 30, 54, 78),\n        intArrayOf(6, 30, 56, 82),\n        intArrayOf(6, 30, 58, 86),\n        intArrayOf(6, 34, 62, 90),\n        intArrayOf(6, 28, 50, 72, 94),\n        intArrayOf(6, 26, 50, 74, 98),\n        intArrayOf(6, 30, 54, 78, 102),\n        intArrayOf(6, 28, 54, 80, 106),\n        intArrayOf(6, 32, 58, 84, 110),\n        intArrayOf(6, 30, 58, 86, 114),\n        intArrayOf(6, 34, 62, 90, 118),\n        intArrayOf(6, 26, 50, 74, 98, 122),\n        intArrayOf(6, 30, 54, 78, 102, 126),\n        intArrayOf(6, 26, 52, 78, 104, 130),\n        intArrayOf(6, 30, 56, 82, 108, 134),\n        intArrayOf(6, 34, 60, 86, 112, 138),\n        intArrayOf(6, 30, 58, 86, 114, 142),\n        intArrayOf(6, 34, 62, 90, 118, 146),\n        intArrayOf(6, 30, 54, 78, 102, 126, 150),\n        intArrayOf(6, 24, 50, 76, 102, 128, 154),\n        intArrayOf(6, 28, 54, 80, 106, 132, 158),\n        intArrayOf(6, 32, 58, 84, 110, 136, 162),\n        intArrayOf(6, 26, 54, 82, 110, 138, 166),\n        intArrayOf(6, 30, 58, 86, 114, 142, 170)\n    )\n\n    private val MAX_LENGTH = arrayOf(\n        arrayOf(\n            intArrayOf(41, 25, 17, 10),\n            intArrayOf(34, 20, 14, 8),\n            intArrayOf(27, 16, 11, 7),\n            intArrayOf(17, 10, 7, 4)\n        ),\n        arrayOf(\n            intArrayOf(77, 47, 32, 20),\n            intArrayOf(63, 38, 26, 16),\n            intArrayOf(48, 29, 20, 12),\n            intArrayOf(34, 20, 14, 8)\n        ),\n        arrayOf(\n            intArrayOf(127, 77, 53, 32),\n            intArrayOf(101, 61, 42, 26),\n            intArrayOf(77, 47, 32, 20),\n            intArrayOf(58, 35, 24, 15)\n        ),\n        arrayOf(\n            intArrayOf(187, 114, 78, 48),\n            intArrayOf(149, 90, 62, 38),\n            intArrayOf(111, 67, 46, 28),\n            intArrayOf(82, 50, 34, 21)\n        ),\n        arrayOf(\n            intArrayOf(255, 154, 106, 65),\n            intArrayOf(202, 122, 84, 52),\n            intArrayOf(144, 87, 60, 37),\n            intArrayOf(106, 64, 44, 27)\n        ),\n        arrayOf(\n            intArrayOf(322, 195, 134, 82),\n            intArrayOf(255, 154, 106, 65),\n            intArrayOf(178, 108, 74, 45),\n            intArrayOf(139, 84, 58, 36)\n        ),\n        arrayOf(\n            intArrayOf(370, 224, 154, 95),\n            intArrayOf(293, 178, 122, 75),\n            intArrayOf(207, 125, 86, 53),\n            intArrayOf(154, 93, 64, 39)\n        ),\n        arrayOf(\n            intArrayOf(461, 279, 192, 118),\n            intArrayOf(365, 221, 152, 93),\n            intArrayOf(259, 157, 108, 66),\n            intArrayOf(202, 122, 84, 52)\n        ),\n        arrayOf(\n            intArrayOf(552, 335, 230, 141),\n            intArrayOf(432, 262, 180, 111),\n            intArrayOf(312, 189, 130, 80),\n            intArrayOf(235, 143, 98, 60)\n        ),\n        arrayOf(\n            intArrayOf(652, 395, 271, 167),\n            intArrayOf(513, 311, 213, 131),\n            intArrayOf(364, 221, 151, 93),\n            intArrayOf(288, 174, 119, 74)\n        ),\n        arrayOf(\n            intArrayOf(772, 468, 321, 198),\n            intArrayOf(604, 366, 251, 155),\n            intArrayOf(427, 259, 177, 109),\n            intArrayOf(331, 200, 137, 85)\n        ),\n        arrayOf(\n            intArrayOf(883, 535, 367, 226),\n            intArrayOf(691, 419, 287, 177),\n            intArrayOf(489, 296, 203, 125),\n            intArrayOf(374, 227, 155, 96)\n        ),\n        arrayOf(\n            intArrayOf(1022, 619, 425, 262),\n            intArrayOf(796, 483, 331, 204),\n            intArrayOf(580, 352, 241, 149),\n            intArrayOf(427, 259, 177, 109)\n        ),\n        arrayOf(\n            intArrayOf(1101, 667, 458, 282),\n            intArrayOf(871, 528, 362, 223),\n            intArrayOf(621, 376, 258, 159),\n            intArrayOf(468, 283, 194, 120)\n        ),\n        arrayOf(\n            intArrayOf(1250, 758, 520, 320),\n            intArrayOf(991, 600, 412, 254),\n            intArrayOf(703, 426, 292, 180),\n            intArrayOf(530, 321, 220, 136)\n        ),\n        arrayOf(\n            intArrayOf(1408, 854, 586, 361),\n            intArrayOf(1082, 656, 450, 277),\n            intArrayOf(775, 470, 322, 198),\n            intArrayOf(602, 365, 250, 154)\n        ),\n        arrayOf(\n            intArrayOf(1548, 938, 644, 397),\n            intArrayOf(1212, 734, 504, 310),\n            intArrayOf(876, 531, 364, 224),\n            intArrayOf(674, 408, 280, 173)\n        ),\n        arrayOf(\n            intArrayOf(1725, 1046, 718, 442),\n            intArrayOf(1346, 816, 560, 345),\n            intArrayOf(948, 574, 394, 243),\n            intArrayOf(746, 452, 310, 191)\n        ),\n        arrayOf(\n            intArrayOf(1903, 1153, 792, 488),\n            intArrayOf(1500, 909, 624, 384),\n            intArrayOf(1063, 644, 442, 272),\n            intArrayOf(813, 493, 338, 208)\n        ),\n        arrayOf(\n            intArrayOf(2061, 1249, 858, 528),\n            intArrayOf(1600, 970, 666, 410),\n            intArrayOf(1159, 702, 482, 297),\n            intArrayOf(919, 557, 382, 235)\n        ),\n        arrayOf(\n            intArrayOf(2232, 1352, 929, 572),\n            intArrayOf(1708, 1035, 711, 438),\n            intArrayOf(1224, 742, 509, 314),\n            intArrayOf(969, 587, 403, 248)\n        ),\n        arrayOf(\n            intArrayOf(2409, 1460, 1003, 618),\n            intArrayOf(1872, 1134, 779, 480),\n            intArrayOf(1358, 823, 565, 348),\n            intArrayOf(1056, 640, 439, 270)\n        ),\n        arrayOf(\n            intArrayOf(2620, 1588, 1091, 672),\n            intArrayOf(2059, 1248, 857, 528),\n            intArrayOf(1468, 890, 611, 376),\n            intArrayOf(1108, 672, 461, 284)\n        ),\n        arrayOf(\n            intArrayOf(2812, 1704, 1171, 721),\n            intArrayOf(2188, 1326, 911, 561),\n            intArrayOf(1588, 963, 661, 407),\n            intArrayOf(1228, 744, 511, 315)\n        ),\n        arrayOf(\n            intArrayOf(3057, 1853, 1273, 784),\n            intArrayOf(2395, 1451, 997, 614),\n            intArrayOf(1718, 1041, 715, 440),\n            intArrayOf(1286, 779, 535, 330)\n        ),\n        arrayOf(\n            intArrayOf(3283, 1990, 1367, 842),\n            intArrayOf(2544, 1542, 1059, 652),\n            intArrayOf(1804, 1094, 751, 462),\n            intArrayOf(1425, 864, 593, 365)\n        ),\n        arrayOf(\n            intArrayOf(3517, 2132, 1465, 902),\n            intArrayOf(2701, 1637, 1125, 692),\n            intArrayOf(1933, 1172, 805, 496),\n            intArrayOf(1501, 910, 625, 385)\n        ),\n        arrayOf(\n            intArrayOf(3669, 2223, 1528, 940),\n            intArrayOf(2857, 1732, 1190, 732),\n            intArrayOf(2085, 1263, 868, 534),\n            intArrayOf(1581, 958, 658, 405)\n        ),\n        arrayOf(\n            intArrayOf(3909, 2369, 1628, 1002),\n            intArrayOf(3035, 1839, 1264, 778),\n            intArrayOf(2181, 1322, 908, 559),\n            intArrayOf(1677, 1016, 698, 430)\n        ),\n        arrayOf(\n            intArrayOf(4158, 2520, 1732, 1066),\n            intArrayOf(3289, 1994, 1370, 843),\n            intArrayOf(2358, 1429, 982, 604),\n            intArrayOf(1782, 1080, 742, 457)\n        ),\n        arrayOf(\n            intArrayOf(4417, 2677, 1840, 1132),\n            intArrayOf(3486, 2113, 1452, 894),\n            intArrayOf(2473, 1499, 1030, 634),\n            intArrayOf(1897, 1150, 790, 486)\n        ),\n        arrayOf(\n            intArrayOf(4686, 2840, 1952, 1201),\n            intArrayOf(3693, 2238, 1538, 947),\n            intArrayOf(2670, 1618, 1112, 684),\n            intArrayOf(2022, 1226, 842, 518)\n        ),\n        arrayOf(\n            intArrayOf(4965, 3009, 2068, 1273),\n            intArrayOf(3909, 2369, 1628, 1002),\n            intArrayOf(2805, 1700, 1168, 719),\n            intArrayOf(2157, 1307, 898, 553)\n        ),\n        arrayOf(\n            intArrayOf(5253, 3183, 2188, 1347),\n            intArrayOf(4134, 2506, 1722, 1060),\n            intArrayOf(2949, 1787, 1228, 756),\n            intArrayOf(2301, 1394, 958, 590)\n        )\n    )\n\n    fun getMaxLength(typeNumber: Int, dataType: QRCodeDataType, errorCorrectionLevel: ErrorCorrectionLevel): Int =\n        MAX_LENGTH[typeNumber - 1][errorCorrectionLevel.ordinal][dataType.ordinal]\n\n    @Suppress(\"NON_EXPORTABLE_TYPE\")\n    fun getErrorCorrectPolynomial(errorCorrectLength: Int): Polynomial {\n        var a = Polynomial(intArrayOf(1))\n        for (i in 0 until errorCorrectLength) {\n            a = a.multiply(Polynomial(intArrayOf(1, QRMath.gexp(i))))\n        }\n        return a\n    }\n\n    /**\n     * Each Mask Pattern [applies a different formula](https://www.thonky.com/qr-code-tutorial/mask-patterns).\n     */\n    fun getMask(maskPattern: MaskPattern, i: Int, j: Int): Boolean =\n        when (maskPattern) {\n            PATTERN000 -> (i + j) % 2 == 0\n            PATTERN001 -> i % 2 == 0\n            PATTERN010 -> j % 3 == 0\n            PATTERN011 -> (i + j) % 3 == 0\n            PATTERN100 -> (i / 2 + j / 3) % 2 == 0\n            PATTERN101 -> (i * j) % 2 + (i * j) % 3 == 0\n            PATTERN110 -> ((i * j) % 2 + (i * j) % 3) % 2 == 0\n            PATTERN111 -> ((i * j) % 3 + (i + j) % 2) % 2 == 0\n        }\n\n    /**\n     * Returns a suitable [QRCodeDataType] to the given input String based on a simple matching.\n     *\n     * @see QRCodeDataType\n     */\n    fun getDataType(s: String): QRCodeDataType =\n        if (isAlphaNum(s)) {\n            if (isNumber(s)) {\n                QRCodeDataType.NUMBERS\n            } else {\n                QRCodeDataType.UPPER_ALPHA_NUM\n            }\n        } else {\n            QRCodeDataType.DEFAULT\n        }\n\n    private fun isNumber(s: String) = s.matches(Regex(\"^\\\\d+$\"))\n    private fun isAlphaNum(s: String) = s.matches(Regex(\"^[0-9A-Z $%*+\\\\-./:]+$\"))\n\n    private const val G15 = (\n        1 shl 10 or (1 shl 8) or (1 shl 5)\n            or (1 shl 4) or (1 shl 2) or (1 shl 1) or (1 shl 0)\n        )\n    private const val G18 = (\n        1 shl 12 or (1 shl 11) or (1 shl 10)\n            or (1 shl 9) or (1 shl 8) or (1 shl 5) or (1 shl 2) or (1 shl 0)\n        )\n    private const val G15_MASK = (\n        1 shl 14 or (1 shl 12) or (1 shl 10)\n            or (1 shl 4) or (1 shl 1)\n        )\n\n    fun getBCHTypeInfo(data: Int): Int {\n        var d = data shl 10\n        while (getBCHDigit(d) - getBCHDigit(G15) >= 0) {\n            d = d xor (G15 shl getBCHDigit(d) - getBCHDigit(G15))\n        }\n        return data shl 10 or d xor G15_MASK\n    }\n\n    fun getBCHTypeNumber(data: Int): Int {\n        var d = data shl 12\n        while (getBCHDigit(d) - getBCHDigit(G18) >= 0) {\n            d = d xor (G18 shl getBCHDigit(d) - getBCHDigit(G18))\n        }\n        return data shl 12 or d\n    }\n\n    private fun getBCHDigit(data: Int): Int {\n        var i = data\n        var digit = 0\n        while (i != 0) {\n            digit++\n            i = i ushr 1\n        }\n        return digit\n    }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/internals/RSBlock.kt",
    "content": "package qrcode.internals\n\nimport qrcode.raw.ErrorCorrectionLevel\n\n/**\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/RSBlock.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\ninternal data class RSBlock(val totalCount: Int, val dataCount: Int) {\n    companion object {\n        private val RS_BLOCK_TABLE = arrayOf(\n            intArrayOf(1, 26, 19),\n            intArrayOf(1, 26, 16),\n            intArrayOf(1, 26, 13),\n            intArrayOf(1, 26, 9),\n            intArrayOf(1, 44, 34),\n            intArrayOf(1, 44, 28),\n            intArrayOf(1, 44, 22),\n            intArrayOf(1, 44, 16),\n            intArrayOf(1, 70, 55),\n            intArrayOf(1, 70, 44),\n            intArrayOf(2, 35, 17),\n            intArrayOf(2, 35, 13),\n            intArrayOf(1, 100, 80),\n            intArrayOf(2, 50, 32),\n            intArrayOf(2, 50, 24),\n            intArrayOf(4, 25, 9),\n            intArrayOf(1, 134, 108),\n            intArrayOf(2, 67, 43),\n            intArrayOf(2, 33, 15, 2, 34, 16),\n            intArrayOf(2, 33, 11, 2, 34, 12),\n            intArrayOf(2, 86, 68),\n            intArrayOf(4, 43, 27),\n            intArrayOf(4, 43, 19),\n            intArrayOf(4, 43, 15),\n            intArrayOf(2, 98, 78),\n            intArrayOf(4, 49, 31),\n            intArrayOf(2, 32, 14, 4, 33, 15),\n            intArrayOf(4, 39, 13, 1, 40, 14),\n            intArrayOf(2, 121, 97),\n            intArrayOf(2, 60, 38, 2, 61, 39),\n            intArrayOf(4, 40, 18, 2, 41, 19),\n            intArrayOf(4, 40, 14, 2, 41, 15),\n            intArrayOf(2, 146, 116),\n            intArrayOf(3, 58, 36, 2, 59, 37),\n            intArrayOf(4, 36, 16, 4, 37, 17),\n            intArrayOf(4, 36, 12, 4, 37, 13),\n            intArrayOf(2, 86, 68, 2, 87, 69),\n            intArrayOf(4, 69, 43, 1, 70, 44),\n            intArrayOf(6, 43, 19, 2, 44, 20),\n            intArrayOf(6, 43, 15, 2, 44, 16),\n            intArrayOf(4, 101, 81),\n            intArrayOf(1, 80, 50, 4, 81, 51),\n            intArrayOf(4, 50, 22, 4, 51, 23),\n            intArrayOf(3, 36, 12, 8, 37, 13),\n            intArrayOf(2, 116, 92, 2, 117, 93),\n            intArrayOf(6, 58, 36, 2, 59, 37),\n            intArrayOf(4, 46, 20, 6, 47, 21),\n            intArrayOf(7, 42, 14, 4, 43, 15),\n            intArrayOf(4, 133, 107),\n            intArrayOf(8, 59, 37, 1, 60, 38),\n            intArrayOf(8, 44, 20, 4, 45, 21),\n            intArrayOf(12, 33, 11, 4, 34, 12),\n            intArrayOf(3, 145, 115, 1, 146, 116),\n            intArrayOf(4, 64, 40, 5, 65, 41),\n            intArrayOf(11, 36, 16, 5, 37, 17),\n            intArrayOf(11, 36, 12, 5, 37, 13),\n            intArrayOf(5, 109, 87, 1, 110, 88),\n            intArrayOf(5, 65, 41, 5, 66, 42),\n            intArrayOf(5, 54, 24, 7, 55, 25),\n            intArrayOf(11, 36, 12, 7, 37, 13),\n            intArrayOf(5, 122, 98, 1, 123, 99),\n            intArrayOf(7, 73, 45, 3, 74, 46),\n            intArrayOf(15, 43, 19, 2, 44, 20),\n            intArrayOf(3, 45, 15, 13, 46, 16),\n            intArrayOf(1, 135, 107, 5, 136, 108),\n            intArrayOf(10, 74, 46, 1, 75, 47),\n            intArrayOf(1, 50, 22, 15, 51, 23),\n            intArrayOf(2, 42, 14, 17, 43, 15),\n            intArrayOf(5, 150, 120, 1, 151, 121),\n            intArrayOf(9, 69, 43, 4, 70, 44),\n            intArrayOf(17, 50, 22, 1, 51, 23),\n            intArrayOf(2, 42, 14, 19, 43, 15),\n            intArrayOf(3, 141, 113, 4, 142, 114),\n            intArrayOf(3, 70, 44, 11, 71, 45),\n            intArrayOf(17, 47, 21, 4, 48, 22),\n            intArrayOf(9, 39, 13, 16, 40, 14),\n            intArrayOf(3, 135, 107, 5, 136, 108),\n            intArrayOf(3, 67, 41, 13, 68, 42),\n            intArrayOf(15, 54, 24, 5, 55, 25),\n            intArrayOf(15, 43, 15, 10, 44, 16),\n            intArrayOf(4, 144, 116, 4, 145, 117),\n            intArrayOf(17, 68, 42),\n            intArrayOf(17, 50, 22, 6, 51, 23),\n            intArrayOf(19, 46, 16, 6, 47, 17),\n            intArrayOf(2, 139, 111, 7, 140, 112),\n            intArrayOf(17, 74, 46),\n            intArrayOf(7, 54, 24, 16, 55, 25),\n            intArrayOf(34, 37, 13),\n            intArrayOf(4, 151, 121, 5, 152, 122),\n            intArrayOf(4, 75, 47, 14, 76, 48),\n            intArrayOf(11, 54, 24, 14, 55, 25),\n            intArrayOf(16, 45, 15, 14, 46, 16),\n            intArrayOf(6, 147, 117, 4, 148, 118),\n            intArrayOf(6, 73, 45, 14, 74, 46),\n            intArrayOf(11, 54, 24, 16, 55, 25),\n            intArrayOf(30, 46, 16, 2, 47, 17),\n            intArrayOf(8, 132, 106, 4, 133, 107),\n            intArrayOf(8, 75, 47, 13, 76, 48),\n            intArrayOf(7, 54, 24, 22, 55, 25),\n            intArrayOf(22, 45, 15, 13, 46, 16),\n            intArrayOf(10, 142, 114, 2, 143, 115),\n            intArrayOf(19, 74, 46, 4, 75, 47),\n            intArrayOf(28, 50, 22, 6, 51, 23),\n            intArrayOf(33, 46, 16, 4, 47, 17),\n            intArrayOf(8, 152, 122, 4, 153, 123),\n            intArrayOf(22, 73, 45, 3, 74, 46),\n            intArrayOf(8, 53, 23, 26, 54, 24),\n            intArrayOf(12, 45, 15, 28, 46, 16),\n            intArrayOf(3, 147, 117, 10, 148, 118),\n            intArrayOf(3, 73, 45, 23, 74, 46),\n            intArrayOf(4, 54, 24, 31, 55, 25),\n            intArrayOf(11, 45, 15, 31, 46, 16),\n            intArrayOf(7, 146, 116, 7, 147, 117),\n            intArrayOf(21, 73, 45, 7, 74, 46),\n            intArrayOf(1, 53, 23, 37, 54, 24),\n            intArrayOf(19, 45, 15, 26, 46, 16),\n            intArrayOf(5, 145, 115, 10, 146, 116),\n            intArrayOf(19, 75, 47, 10, 76, 48),\n            intArrayOf(15, 54, 24, 25, 55, 25),\n            intArrayOf(23, 45, 15, 25, 46, 16),\n            intArrayOf(13, 145, 115, 3, 146, 116),\n            intArrayOf(2, 74, 46, 29, 75, 47),\n            intArrayOf(42, 54, 24, 1, 55, 25),\n            intArrayOf(23, 45, 15, 28, 46, 16),\n            intArrayOf(17, 145, 115),\n            intArrayOf(10, 74, 46, 23, 75, 47),\n            intArrayOf(10, 54, 24, 35, 55, 25),\n            intArrayOf(19, 45, 15, 35, 46, 16),\n            intArrayOf(17, 145, 115, 1, 146, 116),\n            intArrayOf(14, 74, 46, 21, 75, 47),\n            intArrayOf(29, 54, 24, 19, 55, 25),\n            intArrayOf(11, 45, 15, 46, 46, 16),\n            intArrayOf(13, 145, 115, 6, 146, 116),\n            intArrayOf(14, 74, 46, 23, 75, 47),\n            intArrayOf(44, 54, 24, 7, 55, 25),\n            intArrayOf(59, 46, 16, 1, 47, 17),\n            intArrayOf(12, 151, 121, 7, 152, 122),\n            intArrayOf(12, 75, 47, 26, 76, 48),\n            intArrayOf(39, 54, 24, 14, 55, 25),\n            intArrayOf(22, 45, 15, 41, 46, 16),\n            intArrayOf(6, 151, 121, 14, 152, 122),\n            intArrayOf(6, 75, 47, 34, 76, 48),\n            intArrayOf(46, 54, 24, 10, 55, 25),\n            intArrayOf(2, 45, 15, 64, 46, 16),\n            intArrayOf(17, 152, 122, 4, 153, 123),\n            intArrayOf(29, 74, 46, 14, 75, 47),\n            intArrayOf(49, 54, 24, 10, 55, 25),\n            intArrayOf(24, 45, 15, 46, 46, 16),\n            intArrayOf(4, 152, 122, 18, 153, 123),\n            intArrayOf(13, 74, 46, 32, 75, 47),\n            intArrayOf(48, 54, 24, 14, 55, 25),\n            intArrayOf(42, 45, 15, 32, 46, 16),\n            intArrayOf(20, 147, 117, 4, 148, 118),\n            intArrayOf(40, 75, 47, 7, 76, 48),\n            intArrayOf(43, 54, 24, 22, 55, 25),\n            intArrayOf(10, 45, 15, 67, 46, 16),\n            intArrayOf(19, 148, 118, 6, 149, 119),\n            intArrayOf(18, 75, 47, 31, 76, 48),\n            intArrayOf(34, 54, 24, 34, 55, 25),\n            intArrayOf(20, 45, 15, 61, 46, 16)\n        )\n\n        fun getRSBlocks(typeNumber: Int, errorCorrectionLevel: ErrorCorrectionLevel): Array<RSBlock> =\n            RS_BLOCK_TABLE[(typeNumber - 1) * 4 + errorCorrectionLevel.ordinal]\n                .let { rsBlock ->\n                    if (rsBlock.size == 3) {\n                        val block = RSBlock(rsBlock[1], rsBlock[2])\n                        Array(rsBlock[0]) { block }\n                    } else {\n                        val blocksSize = rsBlock[0] + rsBlock[3]\n                        val firstBlock = RSBlock(rsBlock[1], rsBlock[2])\n                        val secondBlock = RSBlock(rsBlock[4], rsBlock[5])\n\n                        Array(blocksSize) {\n                            if (it < rsBlock[0]) {\n                                firstBlock\n                            } else {\n                                secondBlock\n                            }\n                        }\n                    }\n                }\n    }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/raw/QRCodeEnums.kt",
    "content": "package qrcode.raw\n\nimport qrcode.raw.ErrorCorrectionLevel.HIGH\nimport qrcode.raw.ErrorCorrectionLevel.VERY_HIGH\n\n/**\n * The level of Error Correction to apply to the QR Code image. The Higher the Error Correction, the lower quality\n * **print** the QRCode can be (think of \"wow, even with the paper a bit crumpled, it still read the QR Code!\" - that\n * is likely a [HIGH] or [VERY_HIGH] error correction).\n *\n * The trade-off is the amount of data you can encode. The higher the error correction level, the less amount of data\n * you'll be able to encode.\n *\n * Please consult [Kazuhiko's Online Demo](https://kazuhikoarase.github.io/qrcode-generator/js/demo/) where at the time\n * of writing a handy table showed how many bytes can be encoded given a data type ([QRCodeDataType]) and Error Correction Level.\n *\n * This library automatically tries to fit ~2048 bytes into the QR Code regardless of error correction level. That is\n * the reason and meaning of [maxTypeNum].\n *\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/ErrorCorrectionLevel.java)\n *\n * @param value Value associated with this error correction level\n * @param maxTypeNum Maximum `type` value which can fit 2048 bytes. Used to automatically calculate the `type` value.\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\nenum class ErrorCorrectionLevel(val value: Int, val maxTypeNum: Int) {\n    LOW(1, 21),\n    MEDIUM(0, 25),\n    HIGH(3, 30),\n    VERY_HIGH(2, 34),\n}\n\n/**\n * Patterns to apply to the QRCode. They change how the QRCode looks in the end.\n *\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/MaskPattern.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\nenum class MaskPattern {\n    /** This is the default pattern (no pattern is applied) */\n    PATTERN000,\n    PATTERN001,\n    PATTERN010,\n    PATTERN011,\n    PATTERN100,\n    PATTERN101,\n    PATTERN110,\n    PATTERN111\n}\n\n/**\n * QRCode Modes. Basically represents which kind of data is being encoded.\n *\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/Mode.java)\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n */\nenum class QRCodeDataType(val value: Int) {\n    /** Strictly numerical data. Like huge integers. These can be way bigger than [Long.MAX_VALUE]. */\n    NUMBERS(1 shl 0),\n\n    /** Represents Uppercase Alphanumerical data. Allowed characters: `[0-9A-Z $%*+\\-./:]`. */\n    UPPER_ALPHA_NUM(1 shl 1),\n\n    /** This can be any kind of data. With this you can encode Strings, URLs, images, files, anything. */\n    DEFAULT(1 shl 2)\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/raw/QRCodeProcessor.kt",
    "content": "package qrcode.raw\n\nimport qrcode.QRCode\nimport qrcode.color.Colors\nimport qrcode.exception.InsufficientInformationDensityException\nimport qrcode.internals.BitBuffer\nimport qrcode.internals.Polynomial\nimport qrcode.internals.QR8BitByte\nimport qrcode.internals.QRAlphaNum\nimport qrcode.internals.QRCodeSetup.applyMaskPattern\nimport qrcode.internals.QRCodeSetup.setupBottomLeftPositionProbePattern\nimport qrcode.internals.QRCodeSetup.setupPositionAdjustPattern\nimport qrcode.internals.QRCodeSetup.setupTimingPattern\nimport qrcode.internals.QRCodeSetup.setupTopLeftPositionProbePattern\nimport qrcode.internals.QRCodeSetup.setupTopRightPositionProbePattern\nimport qrcode.internals.QRCodeSetup.setupTypeInfo\nimport qrcode.internals.QRCodeSetup.setupTypeNumber\nimport qrcode.internals.QRCodeSquare\nimport qrcode.internals.QRData\nimport qrcode.internals.QRNumber\nimport qrcode.internals.QRUtil\nimport qrcode.internals.RSBlock\nimport qrcode.raw.QRCodeDataType.DEFAULT\nimport qrcode.raw.QRCodeDataType.NUMBERS\nimport qrcode.raw.QRCodeDataType.UPPER_ALPHA_NUM\nimport qrcode.raw.QRCodeProcessor.Companion.MAXIMUM_INFO_DENSITY\nimport qrcode.raw.QRCodeProcessor.Companion.infoDensityForDataAndECL\nimport qrcode.render.QRCodeGraphics\nimport qrcode.render.QRCodeGraphicsFactory\nimport kotlin.js.JsName\nimport kotlin.jvm.JvmOverloads\nimport kotlin.jvm.JvmStatic\n\n/**\n * A Class/Library that helps encode data as QR Code images without any external dependencies.\n *\n * Rewritten in Kotlin from the [original (GitHub)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/java/src/main/java/com/d_project/qrcode/QRCode.java).\n *\n * To create a QR Code you can simply do the following:\n *\n * ```kotlin\n * val dataToEncode = \"Hello QRCode!\"\n * val eachQRCodeSquareSize = 10 // In Pixels!\n * val qrCodeRenderer = QRCode(dataToEncode).render(eachQRCodeSquareSize)\n * ```\n *\n * You can now use `qrCodeRenderer` to render your QRCode into any `OutputStream` (as a PNG by default)\n *\n * For example, to simply save it on the disk:\n *\n * ```kotlin\n * val qrCodeFile = File(\"qrcode.png\")\n * qrCodeFile.outputStream().use { qrCodeRenderer.writeImage(it) }\n * ```\n *\n * Or maybe have it as a byte array, to be sent as a response to a server request:\n *\n * ```kotlin\n * val imageBytes = ByteArrayOutputStream()\n *     .also { qrCodeRenderer.writeImage(it) }\n *     .toByteArray()\n * ```\n *\n * @param data String that will be encoded in the QR Code.\n * @param errorCorrectionLevel The level of Error Correction that should be applied to the QR Code. Defaults to [ErrorCorrectionLevel.MEDIUM].\n * @param dataType One of the available [QRCodeDataType]. By default, the code tries to guess which one is the best fitting one from your input data.\n *\n * @author Rafael Lins - g0dkar\n * @author Kazuhiko Arase - kazuhikoarase\n *\n * @see ErrorCorrectionLevel\n * @see QRUtil.getDataType\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\", \"MemberVisibilityCanBePrivate\")\nclass QRCodeProcessor @JvmOverloads constructor(\n    private val data: String,\n    private val errorCorrectionLevel: ErrorCorrectionLevel = ErrorCorrectionLevel.MEDIUM,\n    private val dataType: QRCodeDataType = QRUtil.getDataType(data),\n    val graphicsFactory: QRCodeGraphicsFactory = QRCodeGraphicsFactory(),\n) {\n    private val qrCodeData: QRData = when (dataType) {\n        NUMBERS -> QRNumber(data)\n        UPPER_ALPHA_NUM -> QRAlphaNum(data)\n        DEFAULT -> QR8BitByte(data)\n    }\n\n    companion object {\n        const val DEFAULT_CELL_SIZE = 25\n        private const val PAD0 = 0xEC\n        private const val PAD1 = 0x11\n        const val MAXIMUM_INFO_DENSITY = 40\n\n        /**\n         * Infer what is the least amount of the [QRCode.informationDensity] parameter to fit the specified [data]\n         * at the given [errorCorrectionLevel].\n         *\n         * If it cannot determine the value, the maximum value for it will be returned: `40`.\n         *\n         * @see QRCode.informationDensity\n         * @see MAXIMUM_INFO_DENSITY\n         */\n        @JvmStatic\n        @JvmOverloads\n        fun infoDensityForDataAndECL(\n            data: String,\n            errorCorrectionLevel: ErrorCorrectionLevel,\n            dataType: QRCodeDataType = QRUtil.getDataType(data),\n        ): Int {\n            val qrCodeData = when (dataType) {\n                NUMBERS -> QRNumber(data)\n                UPPER_ALPHA_NUM -> QRAlphaNum(data)\n                DEFAULT -> QR8BitByte(data)\n            }\n            val dataLength = qrCodeData.length()\n\n            for (typeNum in 1 until errorCorrectionLevel.maxTypeNum) {\n                if (dataLength <= QRUtil.getMaxLength(typeNum, dataType, errorCorrectionLevel)) {\n                    return typeNum\n                }\n            }\n\n            return MAXIMUM_INFO_DENSITY\n        }\n    }\n\n    /**\n     * Compute the final size of the image of this QRCode based on the given a `cellSize`.\n     *\n     * This means this QRCode will be `<size> x <size>` pixels. For example, if this method returns 100, the resulting\n     * image will be 100x100 pixels.\n     */\n    @JsName(\"computeImageSizeFromRawData\")\n    fun computeImageSize(\n        cellSize: Int = DEFAULT_CELL_SIZE,\n        rawData: QRCodeRawData = encode(),\n    ): Int = computeImageSize(cellSize, rawData.size)\n\n    /**\n     * Compute the final size of the image of this QRCode based on the given a `cellSize`.\n     *\n     * This means this QRCode will be `<size> x <size>` pixels. For example, if this method returns 100, the resulting\n     * image will be 100x100 pixels.\n     */\n    fun computeImageSize(\n        cellSize: Int = DEFAULT_CELL_SIZE,\n        size: Int,\n    ): Int = size * cellSize\n\n    /**\n     * Renders a QR Code image based on its [computed data][encode]. This function exists to ease the interop with\n     * Java :)\n     *\n     * @param cellSize The size **in pixels** of each square (cell) in the QR Code. Defaults to `25`.\n     * @param brightColor Color to be used for the \"bright\" parts of the QR Code. In RGBA space. Defaults to [white][Colors.WHITE].\n     * @param darkColor Color to be used for the \"dark\" parts of the QR Code. In RGBA space. Defaults to [black][Colors.BLACK].\n     *\n     * @return A [QRCodeGraphics] with the QR Code rendered on it. It can then be saved or manipulated as desired.\n     *\n     * @see renderShaded\n     * @see QRCodeSquare\n     * @see QRCodeGraphics\n     * @see Colors\n     */\n    fun render(\n        cellSize: Int = DEFAULT_CELL_SIZE,\n        brightColor: Int = Colors.WHITE,\n        darkColor: Int = Colors.BLACK,\n    ) =\n        render(\n            cellSize = cellSize,\n            rawData = encode(),\n            brightColor = brightColor,\n            darkColor = darkColor,\n        )\n\n    /**\n     * Renders a QR Code image based on its [computed data][encode].\n     *\n     * @param cellSize The size **in pixels** of each square (cell) in the QR Code. Defaults to `25`.\n     * @param rawData The data matrix of the QR Code. Defaults to [this.encode()][encode].\n     * @param qrCodeGraphics The [QRCodeGraphics] where the QRCode will be painted into.\n     * @param brightColor Color to be used for the \"bright\" parts of the QR Code. In RGBA space. Defaults to [white][Colors.WHITE].\n     * @param darkColor Color to be used for the \"dark\" parts of the QR Code. In RGBA space. Defaults to [black][Colors.BLACK].\n     *\n     * @return A [QRCodeGraphics] with the QR Code rendered on it. It can then be saved or manipulated as desired.\n     *\n     * @see renderShaded\n     * @see QRCodeSquare\n     * @see QRCodeGraphics\n     * @see Colors\n     */\n    @JvmOverloads\n    @JsName(\"renderComputed\")\n    fun render(\n        cellSize: Int = DEFAULT_CELL_SIZE,\n        rawData: QRCodeRawData = encode(),\n        qrCodeGraphics: QRCodeGraphics = graphicsFactory.newGraphicsSquare(computeImageSize(cellSize, rawData)),\n        brightColor: Int = Colors.WHITE,\n        darkColor: Int = Colors.BLACK,\n    ) =\n        renderShaded(\n            cellSize,\n            rawData,\n            qrCodeGraphics,\n        ) { x, y, cellData, graphics ->\n            if (cellData.dark) {\n                graphics.fillRect(x, y, cellSize, cellSize, darkColor)\n            } else {\n                graphics.fillRect(x, y, cellSize, cellSize, brightColor)\n            }\n        }\n\n    /**\n     * Renders a QR Code image based on its [computed data][encode].\n     *\n     * This function provides a way to implement more artistic QRCodes. The [renderer] is a function that draws a single\n     * square of the QRCode. It receives 4 parameters: the `(x, y)` coordinates where the square is, the\n     * [cellData][QRCodeSquare] and the [QRCodeGraphics] for it to freely draw.\n     *\n     * _Tip: for better looking QR Codes, try using [QRCode] instead ;)_\n     *\n     * @param cellSize The size **in pixels** of each square (cell) in the QR Code. Defaults to `25`.\n     * @param rawData The data matrix of the QR Code. Defaults to [this.encode()][encode].\n     * @param qrCodeGraphics The [QRCodeGraphics] where the QRCode will be painted into.\n     * @param renderer Lambda that draws a single QRCode square. It receives as parameters the `(x, y)` of the cell,\n     * the [QRCodeSquare] (aka \"cell\") being drawn and a [QRCodeGraphics] for it to draw the square.\n     *\n     * @return A [QRCodeGraphics] with the QR Code rendered on it. It can then be saved or manipulated as desired.\n     *\n     * @see QRCode\n     * @see QRCode.ofSquares\n     * @see QRCode.ofCircles\n     * @see QRCode.ofRoundedSquares\n     * @see QRCodeSquare\n     * @see QRCodeGraphics\n     * @see Colors\n     */\n    @JvmOverloads\n    fun renderShaded(\n        cellSize: Int = DEFAULT_CELL_SIZE,\n        rawData: QRCodeRawData = encode(),\n        qrCodeGraphics: QRCodeGraphics = graphicsFactory.newGraphicsSquare(computeImageSize(cellSize, rawData)),\n        renderer: (Int, Int, QRCodeSquare, QRCodeGraphics) -> Unit,\n    ): QRCodeGraphics {\n        rawData.forEach { rowData ->\n            rowData.forEach { cell ->\n                if (!cell.rendered) {\n                    renderer(cell.absoluteX(cellSize), cell.absoluteY(cellSize), cell, qrCodeGraphics)\n                    cell.rendered = true\n                }\n            }\n        }\n\n        return qrCodeGraphics\n    }\n\n    /**\n     * Computes and encodes the [data] of this object into a QR Code. This method returns the raw data of the QR Code.\n     *\n     * If you just want to render (create) a QR Code image, you are probably looking for the [renderShaded] method.\n     *\n     * @param type `type` value for the QRCode computation. Between 0 and 40. Read more about it [here][ErrorCorrectionLevel].\n     * Defaults to an [automatically calculated value][infoDensityForDataAndECL] based on [data] and the [errorCorrectionLevel].\n     * @param maskPattern Mask Pattern to apply to the final QR Code. Basically changes how the QR Code looks at the end.\n     * Read more about it [here][MaskPattern]. Defaults to [MaskPattern.PATTERN000].\n     *\n     * @return The byte matrix of the encoded QRCode.\n     *\n     * @see infoDensityForDataAndECL\n     * @see ErrorCorrectionLevel\n     * @see MaskPattern\n     * @see renderShaded\n     */\n    @JvmOverloads\n    fun encode(\n        type: Int = infoDensityForDataAndECL(data, errorCorrectionLevel),\n        maskPattern: MaskPattern = MaskPattern.PATTERN000,\n    ): QRCodeRawData {\n        val moduleCount = type * 4 + 17\n        val modules: Array<Array<QRCodeSquare?>> =\n            Array(moduleCount) { Array(moduleCount) { null } }\n\n        setupTopLeftPositionProbePattern(modules)\n        setupTopRightPositionProbePattern(modules)\n        setupBottomLeftPositionProbePattern(modules)\n\n        setupPositionAdjustPattern(type, modules)\n        setupTimingPattern(moduleCount, modules)\n        setupTypeInfo(errorCorrectionLevel, maskPattern, moduleCount, modules)\n\n        if (type >= 7) {\n            setupTypeNumber(type, moduleCount, modules)\n        }\n\n        val data = createData(type)\n\n        applyMaskPattern(data, maskPattern, moduleCount, modules)\n\n        return Array(moduleCount) { row ->\n            Array(moduleCount) { column ->\n                modules[row][column] ?: QRCodeSquare(false, row, column, moduleCount)\n            }\n        }\n    }\n\n    private fun createData(type: Int): IntArray {\n        val rsBlocks = RSBlock.getRSBlocks(type, errorCorrectionLevel)\n        val buffer = BitBuffer()\n\n        buffer.put(qrCodeData.dataType.value, 4)\n        buffer.put(qrCodeData.length(), qrCodeData.getLengthInBits(type))\n        qrCodeData.write(buffer)\n\n        val totalDataCount = rsBlocks.sumOf { it.dataCount } * 8\n\n        if (buffer.lengthInBits > totalDataCount) {\n            val errorMessage =\n                \"Insufficient Information Density Parameter: $type [neededBits=${buffer.lengthInBits}, maximumBitsForDensityLevel=$totalDataCount] - Try increasing the Information Density parameter value or use 0 (zero) to automatically compute the least amount needed to fit the QRCode data being encoded.\"\n            throw InsufficientInformationDensityException(errorMessage)\n        }\n\n        if (buffer.lengthInBits + 4 <= totalDataCount) {\n            buffer.put(0, 4)\n        }\n\n        while (buffer.lengthInBits % 8 != 0) {\n            buffer.put(false)\n        }\n\n        while (true) {\n            if (buffer.lengthInBits >= totalDataCount) {\n                break\n            }\n\n            buffer.put(PAD0, 8)\n\n            if (buffer.lengthInBits >= totalDataCount) {\n                break\n            }\n\n            buffer.put(PAD1, 8)\n        }\n\n        return createBytes(buffer, rsBlocks)\n    }\n\n    private fun createBytes(buffer: BitBuffer, rsBlocks: Array<RSBlock>): IntArray {\n        var offset = 0\n        var maxDcCount = 0\n        var maxEcCount = 0\n        var totalCodeCount = 0\n        val dcData = Array(rsBlocks.size) { IntArray(0) }\n        val ecData = Array(rsBlocks.size) { IntArray(0) }\n\n        rsBlocks.forEachIndexed { i, it ->\n            val dcCount = it.dataCount\n            val ecCount = it.totalCount - dcCount\n\n            totalCodeCount += it.totalCount\n            maxDcCount = maxDcCount.coerceAtLeast(dcCount)\n            maxEcCount = maxEcCount.coerceAtLeast(ecCount)\n\n            // Init dcData[i]\n            dcData[i] = IntArray(dcCount) { idx -> 0xff and buffer.buffer[idx + offset] }\n            offset += dcCount\n\n            // Init ecData[i]\n            val rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount)\n            val rawPoly = Polynomial(dcData[i], rsPoly.len() - 1)\n            val modPoly = rawPoly.mod(rsPoly)\n            val ecDataSize = rsPoly.len() - 1\n\n            ecData[i] = IntArray(ecDataSize) { idx ->\n                val modIndex = idx + modPoly.len() - ecDataSize\n                if ((modIndex >= 0)) modPoly[modIndex] else 0\n            }\n        }\n\n        var index = 0\n        val data = IntArray(totalCodeCount)\n\n        for (i in 0 until maxDcCount) {\n            for (r in rsBlocks.indices) {\n                if (i < dcData[r].size) {\n                    data[index++] = dcData[r][i]\n                }\n            }\n        }\n\n        for (i in 0 until maxEcCount) {\n            for (r in rsBlocks.indices) {\n                if (i < ecData[r].size) {\n                    data[index++] = ecData[r][i]\n                }\n            }\n        }\n\n        return data\n    }\n\n    override fun toString(): String =\n        \"QRCode(data=$data\" +\n            \", errorCorrectionLevel=$errorCorrectionLevel\" +\n            \", dataType=$dataType\" +\n            \", qrCodeData=${qrCodeData::class.simpleName}\" +\n            \")\"\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/raw/QRCodeRawData.kt",
    "content": "package qrcode.raw\n\nimport qrcode.internals.QRCodeSquare\n\n/**\n * Alias for a matrix of [QRCodeSquare]\n */\ntypealias QRCodeRawData = Array<Array<QRCodeSquare>>\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/render/QRCodeGraphics.kt",
    "content": "package qrcode.render\n\nexpect class QRCodeGraphics(width: Int, height: Int) {\n    /** Returns `true` if **any** drawing was performed */\n    fun changed(): Boolean\n\n    /** Completely reset this object. It is expected that `changed()` returns false and the canvas is completely blank after invoking this. */\n    fun reset()\n\n    /** Return the dimensions of this Graphics object as a pair of `width, height` */\n    fun dimensions(): Array<Int>\n\n    /** Returns this image as a [ByteArray] encoded as PNG. */\n    fun getBytes(): ByteArray\n\n    /** Returns this image as a [ByteArray] encoded as the specified format (e.g. `PNG`, `JPG`, `BMP`, ...). */\n    fun getBytes(format: String): ByteArray\n\n    /** Returns the available formats to be passed as parameters to [getBytes]. */\n    fun availableFormats(): Array<String>\n\n    /** Returns the native image object this QRCodeGraphics is working upon. */\n    fun nativeImage(): Any\n\n    /** Draw a straight line from point `(x1,y1)` to `(x2,y2)`. */\n    fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double)\n\n    /** Draw the edges of a rectangle starting at point `(x,y)` and having `width` by `height`. */\n    fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double)\n\n    /** Fills the rectangle starting at point `(x,y)` and having `width` by `height`. */\n    fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int)\n\n    /** Fill the whole area of this canvas with the specified [color]. */\n    fun fill(color: Int)\n\n    /**\n     * Draw the edges of a round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    fun drawRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int, thickness: Double)\n\n    /**\n     * Fills the round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * fillRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int)\n\n    /**\n     * Draw the edges of an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     */\n    fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double)\n\n    /**\n     * Fills an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     *\n     */\n    fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int)\n\n    /**\n     * Reads the specified image from [rawData] and draws it at `(x,y)`\n     */\n    fun drawImage(rawData: ByteArray?, x: Int, y: Int)\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/render/QRCodeGraphicsFactory.kt",
    "content": "package qrcode.render\n\nimport qrcode.QRCode\n\n/**\n * A class used by [QRCode] to build instances of [QRCodeGraphics].\n *\n * It builds the default [QRCodeGraphics] available for the platform.\n *\n * You might extend it to generate customized [QRCodeGraphics] instances.\n *\n * @author Rafael Lins - g0dkar\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\", \"MemberVisibilityCanBePrivate\")\nopen class QRCodeGraphicsFactory {\n    /**\n     * Creates a `size` by `size` square [QRCodeGraphics] instance.\n     */\n    open fun newGraphicsSquare(size: Int) = newGraphics(size, size)\n\n    /**\n     * Creates a new [QRCodeGraphics] instance.\n     */\n    open fun newGraphics(width: Int, height: Int): QRCodeGraphics = QRCodeGraphics(width, height)\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/shape/CircleShapeFunction.kt",
    "content": "package qrcode.shape\n\nimport qrcode.raw.QRCodeProcessor.Companion.DEFAULT_CELL_SIZE\nimport kotlin.jvm.JvmOverloads\nimport kotlin.math.roundToInt\n\n/**\n * Creates circles instead of squares while drawing the QRCode. By default, the circles will keep `8% of the squareSize`\n * pixels away from each other, to have a more pleasing aesthetics.\n *\n * @param squareSize How big each \"square\" will be, in pixels (defaults to [DEFAULT_CELL_SIZE])\n * @param innerSpace How much space inside each \"square\" will be left empty (1 = 1px of the inner area won't be drawn)\n */\nopen class CircleShapeFunction @JvmOverloads constructor(\n    squareSize: Int = DEFAULT_CELL_SIZE,\n    innerSpace: Int = defaultInnerSpace(squareSize)\n) : RoundSquaresShapeFunction(squareSize, radius = squareSize, innerSpace) {\n    companion object {\n        // To avoid an error on the TypeScript side of things\n        fun defaultRadius(squareSize: Int) = (squareSize / 1.75).roundToInt()\n        fun defaultInnerSpace(squareSize: Int) = (squareSize * 0.05).roundToInt()\n    }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/shape/DefaultShapeFunction.kt",
    "content": "package qrcode.shape\n\nimport qrcode.QRCode\nimport qrcode.color.QRCodeColorFunction\nimport qrcode.internals.QRCodeSquare\nimport qrcode.internals.QRCodeSquareType.POSITION_PROBE\nimport qrcode.raw.QRCodeProcessor.Companion.DEFAULT_CELL_SIZE\nimport qrcode.render.QRCodeGraphics\n\n/**\n *\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\nopen class DefaultShapeFunction(\n    squareSize: Int = DEFAULT_CELL_SIZE,\n    val innerSpace: Int = 1,\n) : QRCodeShapeFunction {\n    private var innerSpacing = innerSpace.coerceIn(0..(squareSize / 2))\n    var squareSize: Int = squareSize\n        private set\n\n    override fun resize(newSquareSize: Int) {\n        val sizeRatio: Double = newSquareSize / squareSize.toDouble()\n\n        squareSize = newSquareSize\n        innerSpacing = (innerSpace * sizeRatio).toInt().coerceIn(0..(newSquareSize / 2))\n    }\n\n    override fun renderSquare(\n        x: Int,\n        y: Int,\n        colorFn: QRCodeColorFunction,\n        square: QRCodeSquare,\n        canvas: QRCodeGraphics,\n        qrCode: QRCode,\n    ) {\n        val bg = colorFn.bg(square.row, square.col, qrCode, canvas)\n        val fg = colorFn.fg(square.row, square.col, qrCode, canvas)\n        val color = if (square.dark) fg else bg\n\n        fillRect(\n            x + innerSpacing,\n            y + innerSpacing,\n            squareSize - innerSpacing * 2,\n            squareSize - innerSpacing * 2,\n            color,\n            canvas,\n        )\n    }\n\n    override fun renderControlSquare(\n        xOffset: Int,\n        yOffset: Int,\n        colorFn: QRCodeColorFunction,\n        square: QRCodeSquare,\n        canvas: QRCodeGraphics,\n        qrCode: QRCode,\n    ) {\n        val actualSquare = square.parent ?: square\n        val bg = colorFn.bg(actualSquare.row, actualSquare.col, qrCode, canvas)\n        val fg = colorFn.fg(actualSquare.row, actualSquare.col, qrCode, canvas)\n        val size = squareSize * actualSquare.rowSize\n        val startX = xOffset + actualSquare.absoluteX(squareSize)\n        val startY = yOffset + actualSquare.absoluteY(squareSize)\n\n        when (actualSquare.squareInfo.type) {\n            POSITION_PROBE -> {\n                // Fill the area with the whole square\n                canvas.fillRect(startX, startY, size + squareSize * 2, size + squareSize * 2, bg)\n\n                // Draw outer square\n                drawRect(\n                    startX + innerSpacing,\n                    startY + innerSpacing,\n                    size - innerSpacing * 2,\n                    size - innerSpacing * 2,\n                    fg,\n                    squareSize.toDouble(),\n                    canvas,\n                )\n\n                // Draw inner square\n                fillRect(\n                    startX + squareSize * 2,\n                    startY + squareSize * 2,\n                    size - squareSize * 4,\n                    size - squareSize * 4,\n                    fg,\n                    canvas,\n                )\n            }\n\n            else -> {\n                // Always a 5x5 square at (x, y)\n                canvas.fillRect(startX, startY, size, size, bg)\n\n                // 1st line\n                drawSquaresLine(startX, startY, 5, 1, fg, canvas)\n\n                // 2nd line\n                drawSquaresLine(startX, startY + squareSize, 5, 4, fg, canvas)\n\n                // 3rd line\n                drawSquaresLine(startX, startY + squareSize * 2, 5, 2, fg, canvas)\n\n                // 4th line\n                drawSquaresLine(startX, startY + squareSize * 3, 5, 4, fg, canvas)\n\n                // 5th line\n                drawSquaresLine(startX, startY + squareSize * 4, 5, 1, fg, canvas)\n            }\n        }\n    }\n\n    private fun drawSquaresLine(x: Int, y: Int, amount: Int, skip: Int, color: Int, canvas: QRCodeGraphics) {\n        for (i in 0 until amount step skip) {\n            fillRect(\n                x + (squareSize * i) + innerSpacing,\n                y + innerSpacing,\n                squareSize - innerSpacing * 2,\n                squareSize - innerSpacing * 2,\n                color,\n                canvas,\n            )\n        }\n    }\n\n    /**\n     * The function to actually draw a filled cell. Extend this to easily create your own shape :)\n     *\n     * Used to draw ALL cells of the QRCode except the outline of the larger ones on the edges.\n     */\n    open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int, canvas: QRCodeGraphics) {\n        canvas.fillRect(x, y, width, height, color)\n    }\n\n    /**\n     * The function to actually draw the outline of a cell. Extend this to easily create your own shape :)\n     *\n     * ONLY used to draw those larger squares on the edges of the QRCode.\n     */\n    open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double, canvas: QRCodeGraphics) {\n        canvas.drawRect(x, y, width, height, color, thickness)\n    }\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/shape/QRCodeShapeFunction.kt",
    "content": "package qrcode.shape\n\nimport qrcode.QRCode\nimport qrcode.color.QRCodeColorFunction\nimport qrcode.internals.QRCodeSquare\nimport qrcode.render.QRCodeGraphics\n\n/**\n * Function to render (draw) a single square.\n */\ninterface QRCodeShapeFunction {\n    /**\n     * Called when the expected square size was changed.\n     */\n    fun resize(newSquareSize: Int)\n\n    /**\n     * Called before rendering starts, to set up something if needed\n     */\n    fun beforeRender(qrCode: QRCode, qrCodeGraphics: QRCodeGraphics) {\n        // Do nothing\n    }\n\n    /**\n     * Renders a single square.\n     */\n    fun renderSquare(\n        x: Int,\n        y: Int,\n        colorFn: QRCodeColorFunction,\n        square: QRCodeSquare,\n        canvas: QRCodeGraphics,\n        qrCode: QRCode,\n    )\n\n    /**\n     * Renders a control square (those bigger ones on the edges).\n     */\n    fun renderControlSquare(\n        xOffset: Int,\n        yOffset: Int,\n        colorFn: QRCodeColorFunction,\n        square: QRCodeSquare,\n        canvas: QRCodeGraphics,\n        qrCode: QRCode,\n    )\n}\n"
  },
  {
    "path": "src/commonMain/kotlin/qrcode/shape/RoundSquaresShapeFunction.kt",
    "content": "package qrcode.shape\n\nimport qrcode.raw.QRCodeProcessor.Companion.DEFAULT_CELL_SIZE\nimport qrcode.render.QRCodeGraphics\nimport kotlin.jvm.JvmOverloads\nimport kotlin.math.roundToInt\n\n/**\n * Creates \"rounded squares\" as the shapes on the QRCode.\n *\n * By default, the value is set to `squareSize / 4`\n */\n@Suppress(\"NON_EXPORTABLE_TYPE\")\nopen class RoundSquaresShapeFunction @JvmOverloads constructor(\n    squareSize: Int = DEFAULT_CELL_SIZE,\n    private val radius: Int = defaultRadius(squareSize),\n    innerSpace: Int = defaultInnerSpace(squareSize)\n) : DefaultShapeFunction(squareSize, innerSpace) {\n    companion object {\n        fun defaultRadius(squareSize: Int) = (squareSize / 1.75).roundToInt()\n        fun defaultInnerSpace(squareSize: Int) = (squareSize * 0.05).roundToInt()\n    }\n\n    override fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int, canvas: QRCodeGraphics) {\n        canvas.fillRoundRect(x, y, width, height, radius, color)\n    }\n\n    override fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double, canvas: QRCodeGraphics) {\n        canvas.drawRoundRect(x, y, width, height, radius, color, thickness)\n    }\n}\n"
  },
  {
    "path": "src/commonTest/kotlin/qrcode/internals/PolynomialTest.kt",
    "content": "package qrcode.internals\n\nimport io.kotest.core.spec.style.FunSpec\nimport io.kotest.matchers.collections.shouldContainExactly\nimport io.kotest.matchers.types.shouldNotBeSameInstanceAs\n\nclass PolynomialTest : FunSpec(\n    {\n        context(\"Creation\") {\n            test(\"Simple\") {\n                val input = intArrayOf(1, 2, 3)\n                val expected = listOf(1, 2, 3)\n\n                val result = Polynomial(input)\n\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"Simple with 0\") {\n                val input = intArrayOf(0, 1, 2)\n                val expected = listOf(1, 2)\n\n                val result = Polynomial(input)\n\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"Only 0s\") {\n                val input = intArrayOf(0, 0, 0)\n                val expected = listOf(0, 0, 0)\n\n                val result = Polynomial(input)\n\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"Shifted 1\") {\n                val input = intArrayOf(1, 2, 3)\n                val shift = 1\n                val expected = listOf(1, 2, 3, 0)\n\n                val result = Polynomial(input, shift)\n\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"Shifted 3\") {\n                val input = intArrayOf(1, 2, 3)\n                val shift = 3\n                val expected = listOf(1, 2, 3, 0, 0, 0)\n\n                val result = Polynomial(input, shift)\n\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"Shifted 1, With 0\") {\n                val input = intArrayOf(0, 1, 2)\n                val shift = 1\n                val expected = listOf(1, 2, 0)\n\n                val result = Polynomial(input, shift)\n\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"Shifted 5, With 0\") {\n                val input = intArrayOf(0, 1, 2)\n                val shift = 5\n                val expected = listOf(1, 2, 0, 0, 0, 0, 0)\n\n                val result = Polynomial(input, shift)\n\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"Shifted 2, With 2 zeroes\") {\n                val input = intArrayOf(0, 0, 1)\n                val shift = 2\n                val expected = listOf(1, 0, 0)\n\n                val result = Polynomial(input, shift)\n\n                result.toList() shouldContainExactly expected\n            }\n        }\n\n        context(\"Operations\") {\n            test(\"mod\") {\n                val input = inputArray(0, 43, 139, 206, 78, 43, 239, 123, 206, 214, 147, 24, 99, 150, 39, 243, 163, 136)\n                val inputPolynomial = Polynomial(input)\n\n                val data = intArrayOf(32, 65, 205, 69, 41, 220, 46, 128, 236)\n                val dataPolynomial = Polynomial(data, input.size - 1)\n                val expected = listOf(42, 159, 74, 221, 244, 169, 239, 150, 138, 70, 237, 85, 224, 96, 74, 219, 61)\n\n                val result = dataPolynomial.mod(inputPolynomial)\n\n                result shouldNotBeSameInstanceAs dataPolynomial\n                result shouldNotBeSameInstanceAs inputPolynomial\n                result.toList() shouldContainExactly expected\n            }\n\n            test(\"multiply\") {\n                val expected = listOf(1, 127, 122, 154, 164, 11, 68, 117)\n                var result = Polynomial(intArrayOf(1))\n\n                for (i in 0..6) {\n                    result = result.multiply(Polynomial(intArrayOf(1, QRMath.gexp(i))))\n                }\n\n                result.toList() shouldContainExactly expected\n            }\n        }\n    },\n)\n\nprivate fun Polynomial.toList(): List<Int> = this.data.toList()\n\nprivate fun inputArray(vararg values: Int): IntArray =\n    IntArray(values.size) { QRMath.gexp(values[it]) }\n"
  },
  {
    "path": "src/commonTest/kotlin/qrcode/internals/QRNumberTest.kt",
    "content": "package qrcode.internals\n\nimport io.kotest.core.spec.style.FunSpec\nimport io.kotest.matchers.collections.shouldContainExactly\nimport io.kotest.matchers.shouldBe\n\nclass QRNumberTest : FunSpec(\n    {\n        context(\"Edge Cases\") {\n            test(\"Empty String\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                val expectedLengthInBits = 0\n\n                val underTest = QRNumber(\"\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n        }\n\n        context(\"Positive Numbers\") {\n            test(\"0\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                val expectedLengthInBits = 4\n\n                val underTest = QRNumber(\"0\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n\n            test(\"1\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 16\n                    }\n                val expectedLengthInBits = 4\n\n                val underTest = QRNumber(\"1\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n\n            test(\"Multiple Digits 01\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 30\n                        this[1] = 192\n                    }\n                val expectedLengthInBits = 10\n\n                val underTest = QRNumber(\"123\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n\n            test(\"Multiple Digits 02\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 30\n                        this[1] = 220\n                        this[2] = 135\n                    }\n                val expectedLengthInBits = 24\n\n                val underTest = QRNumber(\"1234567\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n\n            test(\"Multiple Digits 03\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 230\n                        this[1] = 149\n                        this[2] = 19\n                        this[3] = 46\n                        this[4] = 173\n                        this[5] = 119\n                        this[6] = 100\n                        this[7] = 71\n                    }\n                val expectedLengthInBits = 64\n\n                val underTest = QRNumber(\"9223372036854775807\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n        }\n\n        context(\"Negative Numbers\") {\n            test(\"-1\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 254\n                    }\n                val expectedLengthInBits = 7\n\n                val underTest = QRNumber(\"-1\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n\n            test(\"Multiple Digits 01\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 253\n                        this[1] = 12\n                    }\n\n                val expectedLengthInBits = 14\n\n                val underTest = QRNumber(\"-123\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n\n            test(\"Multiple Digits 02\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 253\n                        this[1] = 21\n                        this[2] = 152\n                        this[3] = 96\n                    }\n                val expectedLengthInBits = 27\n\n                val underTest = QRNumber(\"-1234567\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n\n            test(\"Multiple Digits 03\") {\n                val testBuffer = BitBuffer()\n                val expectedBufferData = MutableList(32) { 0 }\n                    .apply {\n                        this[0] = 233\n                        this[1] = 14\n                        this[2] = 155\n                        this[3] = 65\n                        this[4] = 112\n                        this[5] = 136\n                        this[6] = 239\n                        this[7] = 96\n                        this[8] = 224\n                    }\n                val expectedLengthInBits = 67\n\n                val underTest = QRNumber(\"-9223372036854775807\")\n\n                underTest.write(testBuffer)\n\n                testBuffer.buffer.asList() shouldContainExactly expectedBufferData\n                testBuffer.lengthInBits shouldBe expectedLengthInBits\n            }\n        }\n    },\n)\n"
  },
  {
    "path": "src/iosMain/kotlin/qrcode/render/QRCodeGraphics.ios.kt",
    "content": "package qrcode.render\n\nimport kotlinx.cinterop.ExperimentalForeignApi\nimport kotlinx.cinterop.addressOf\nimport kotlinx.cinterop.usePinned\nimport platform.CoreGraphics.CGContextFillEllipseInRect\nimport platform.CoreGraphics.CGContextFillPath\nimport platform.CoreGraphics.CGContextSetLineWidth\nimport platform.CoreGraphics.CGContextStrokeEllipseInRect\nimport platform.CoreGraphics.CGContextStrokePath\nimport platform.CoreGraphics.CGPathCreateWithRoundedRect\nimport platform.CoreGraphics.CGPointMake\nimport platform.CoreGraphics.CGRectMake\nimport platform.CoreGraphics.CGSizeMake\nimport platform.Foundation.NSMutableData\nimport platform.Foundation.appendBytes\nimport platform.UIKit.UIColor\nimport platform.UIKit.UIGraphicsImageRenderer\nimport platform.UIKit.UIGraphicsImageRendererContext\nimport platform.UIKit.UIImage\nimport platform.UIKit.UIImageHEICRepresentation\nimport platform.UIKit.UIImageJPEGRepresentation\nimport platform.UIKit.UIImagePNGRepresentation\nimport qrcode.color.Colors\nimport utils.toByteArray\n\n@OptIn(ExperimentalForeignApi::class)\n@Suppress(\"MemberVisibilityCanBePrivate\")\nactual open class QRCodeGraphics actual constructor(\n    val width: Int,\n    val height: Int,\n) {\n    companion object {\n        private val AVAILABLE_FORMATS = arrayOf(\"JPEG\", \"PNG\", \"HEIC\")\n        private const val MAX_COLOR_VALUE = 255.0\n    }\n\n    private var changed: Boolean = false\n    private val imgSize = CGSizeMake(width = width.toDouble(), height = height.toDouble())\n    private val renderer = UIGraphicsImageRenderer(imgSize)\n\n    private val renderActions = mutableListOf<(UIGraphicsImageRendererContext) -> Unit>()\n\n    private fun colorOf(color: Int): UIColor {\n        /**\n         * When creating a UIColor instance, RGBA color components are expected in the range 0.0 to 1.0.\n         * To convert 8-bit values (0 to 255) to this range we must divide by 255.0.\n         * Dividing by 255.0 ensures the color components are normalized appropriately.\n         */\n        val (r, g, b, a) = Colors.getRGBAPercentages(color)\n\n        return UIColor(\n            red = r,\n            green = g,\n            blue = b,\n            alpha = a,\n        )\n    }\n\n    /** Returns `true` if **any** drawing was performed */\n    actual open fun changed() = changed\n\n    /** Simply changes the `changed` flag to true without doing anything else */\n    actual fun reset() {\n        if (changed) {\n            changed = false\n            renderActions.clear()\n        }\n    }\n\n    /** Return the dimensions of this Graphics object as a pair of `width, height` */\n    actual open fun dimensions() = arrayOf(width, height)\n\n    /** Returns this image as a [ByteArray] encoded as PNG. */\n    actual open fun getBytes(): ByteArray = getBytes(\"PNG\")\n\n    /**\n     * Returns this image as a [ByteArray] encoded as the specified format.\n     *\n     * @see availableFormats\n     */\n    actual open fun getBytes(format: String): ByteArray =\n        (nativeImage() as? UIImage)?.let { image ->\n            when (format) {\n                \"HEIC\" -> UIImageHEICRepresentation(image)\n                \"JPEG\" -> UIImageJPEGRepresentation(image, 1.0)\n                \"PNG\" -> UIImagePNGRepresentation(image)\n                else -> null\n            }?.toByteArray() ?: ByteArray(0)\n        } ?: ByteArray(0)\n\n    /**\n     * Returns the available formats to be passed as parameters to [getBytes].\n     *\n     * As implied by the iOS Documentation, only JPEG and PNG are supported.\n     *\n     */\n    actual open fun availableFormats(): Array<String> = AVAILABLE_FORMATS\n\n    /** Returns the [Bitmap] object being worked upon. */\n    actual open fun nativeImage(): Any = renderer.imageWithActions { context ->\n        if (context != null) {\n            renderActions.forEach { it(context) }\n        }\n    }\n\n    /**\n     * Does nothing.\n     *\n     * **Note: I couldn't find a method for doing this on the iOS API. If you know of one, please send a message :)**\n     *\n     * @see fill\n     * @see fillRect\n     * @see drawRect\n     * @see drawImage\n     */\n    actual open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double) {\n        // Unsupported\n    }\n\n    /** Draw the edges of a rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        renderActions.add {\n            colorOf(color).setStroke()\n            val rect = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGContextSetLineWidth(it.CGContext, thickness)\n            it.strokeRect(rect)\n        }\n    }\n\n    /** Fills the rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        renderActions.add {\n            colorOf(color).setFill()\n            val rect = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            it.fillRect(rect)\n        }\n    }\n\n    /** Fill the whole area of this canvas with the specified [color]. */\n    actual open fun fill(color: Int) {\n        fillRect(0, 0, width, height, color)\n    }\n\n    /**\n     * Draw the edges of a round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        renderActions.add {\n            colorOf(color).setFill()\n\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGPathCreateWithRoundedRect(area, borderRadius.toDouble(), borderRadius.toDouble(), null)\n\n            CGContextFillPath(it.CGContext)\n        }\n    }\n\n    /**\n     * Fills the round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * fillRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) {\n        renderActions.add {\n            colorOf(color).setStroke()\n\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGPathCreateWithRoundedRect(area, borderRadius.toDouble(), borderRadius.toDouble(), null)\n\n            CGContextStrokePath(it.CGContext)\n        }\n    }\n\n    /**\n     * Draw the edges of an ellipsis (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     */\n    actual fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        renderActions.add {\n            colorOf(color).setStroke()\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGContextStrokeEllipseInRect(it.CGContext, area)\n        }\n    }\n\n    /**\n     * Fills an ellipsis (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     *\n     */\n    actual fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        renderActions.add {\n            colorOf(color).setFill()\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGContextFillEllipseInRect(it.CGContext, area)\n        }\n    }\n\n    /**\n     * Reads the specified image from [rawData] and draws it at `(x,y)`\n     */\n    actual fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        if (rawData != null && rawData.isNotEmpty()) {\n            renderActions.add {\n                rawData.usePinned {\n                    val imgData = NSMutableData()\n                    imgData.appendBytes(it.addressOf(0), rawData.size.toULong())\n\n                    val image = UIImage(imgData)\n                    val point = CGPointMake(x = x.toDouble(), y = y.toDouble())\n                    image.drawAtPoint(point)\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/iosMain/kotlin/utils/IOSNativeParser.kt",
    "content": "package utils\n\nimport kotlinx.cinterop.ExperimentalForeignApi\nimport kotlinx.cinterop.addressOf\nimport kotlinx.cinterop.usePinned\nimport platform.Foundation.NSData\nimport platform.posix.memcpy\n\n/**\n * Converts a [NSData] object to a [ByteArray].\n * This function is useful when working in Kotlin/Native where data may be represented as [ByteArray]\n */\n@OptIn(ExperimentalForeignApi::class)\ninternal fun NSData.toByteArray(): ByteArray {\n    val arrayLen = length.toInt().coerceAtLeast(0)\n\n    return ByteArray(arrayLen).apply {\n        if (arrayLen > 0) {\n            this.usePinned { memcpy(it.addressOf(0), bytes, length) }\n        }\n    }\n}\n"
  },
  {
    "path": "src/jsMain/kotlin/qrcode/render/QRCodeGraphics.js.kt",
    "content": "package qrcode.render\n\nimport kotlinx.browser.document\nimport org.khronos.webgl.Uint8ClampedArray\nimport org.w3c.dom.CanvasRenderingContext2D\nimport org.w3c.dom.HTMLCanvasElement\nimport org.w3c.dom.ImageData\nimport org.w3c.files.Blob\n\n@JsExport\n@OptIn(ExperimentalJsExport::class)\n@Suppress(\"MemberVisibilityCanBePrivate\")\nactual open class QRCodeGraphics actual constructor(\n    val width: Int,\n    val height: Int\n) {\n    companion object {\n        private const val CANVAS_UNSUPPORTED = \"Canvas seems to not be supported :(\"\n        private const val FULL_CIRCLE = 3.141592653589793 * 2.0 // 2 * PI = Full circle\n    }\n\n    private val canvas: HTMLCanvasElement\n    private var changed: Boolean = false\n\n    init {\n        val canvas = tryGet { document.createElement(\"canvas\") as HTMLCanvasElement }\n\n        canvas.width = width\n        canvas.height = height\n\n        this.canvas = canvas\n    }\n\n    private fun rgba(color: Int): String {\n        val r = (color shr 16) and 0xFF\n        val g = (color shr 8) and 0xFF\n        val b = (color shr 0) and 0xFF\n        val a = ((color shr 24) and 0xFF) / 255.0\n        return \"rgba($r,$g,$b,$a)\"\n    }\n\n    private fun draw(color: Int, action: CanvasRenderingContext2D.() -> Unit) {\n        changed = true\n\n        val context = tryGet { canvas.getContext(\"2d\") as CanvasRenderingContext2D }\n\n        val colorString = rgba(color)\n        context.fillStyle = colorString\n        context.strokeStyle = colorString\n\n        val lineWidth = context.lineWidth\n\n        action(context)\n\n        context.lineWidth = lineWidth\n    }\n\n    /** Returns `true` if **any** drawing was performed */\n    actual open fun changed() = changed\n\n    /** Simply changes the `changed` flag to true without doing anything else */\n    actual fun reset() {\n        if (changed) {\n            changed = false\n            draw(0) { clearRect(0.0, 0.0, width.toDouble(), height.toDouble()) }\n        }\n    }\n\n    /** Return the dimensions of this Graphics object as a pair of `width, height` */\n    actual open fun dimensions() = arrayOf(width, height)\n\n    /**\n     * Returns a Data URL to this can be shown in an `<img/>` tag.\n     */\n    open fun toDataURL(format: String = \"png\"): String = canvas.toDataURL(format)\n\n    /**\n     * Direct access to the `.toBlob()` function of the underlying canvas.\n     *\n     * Syntactic sugar for `nativeImage().toBlob(callback)`.\n     */\n    open fun toBlob(callback: (Blob?) -> Unit): Unit = canvas.toBlob(callback)\n\n    /** Returns this image as a [ByteArray] encoded as PNG. */\n    actual open fun getBytes(): ByteArray = getBytes(\"png\")\n\n    /** Returns this image as a [ByteArray] encoded as the specified format (e.g. `PNG`, `JPG`, `BMP`, ...). */\n    @JsName(\"getBytesForFormat\")\n    actual open fun getBytes(format: String): ByteArray =\n        canvas.toDataURL(format).encodeToByteArray()\n\n    /** Returns the available formats to be passed as parameters to [getBytes].\n     *\n     * **Note:** The actual list of supported formats depends on the browser, so this won't be checked. PNG is always supported.\n     */\n    actual open fun availableFormats(): Array<String> = arrayOf(\"png\")\n\n    /** Returns the native image object this QRCodeGraphics is working upon. */\n    actual open fun nativeImage(): Any = canvas\n\n    /** Draw a straight line from point `(x1,y1)` to `(x2,y2)`. */\n    actual open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double) {\n        draw(color) {\n            moveTo(x1.toDouble(), y1.toDouble())\n            lineTo(x2.toDouble(), y2.toDouble())\n        }\n    }\n\n    /** Draw the edges of a rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        draw(color) {\n            lineWidth = thickness\n            val halfThickness = thickness / 2.0\n            strokeRect(x.toDouble() + halfThickness, y.toDouble() + halfThickness, width.toDouble() - thickness, height.toDouble() - thickness)\n        }\n    }\n\n    /** Fills the rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        draw(color) {\n            fillRect(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n        }\n    }\n\n    /** Fill the whole area of this canvas with the specified [color]. */\n    actual open fun fill(color: Int) {\n        fillRect(0, 0, width, height, color)\n    }\n\n    /**\n     * Draw the edges of a round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double\n    ) {\n        drawRect(x, y, width, height, color, 1.0)\n    }\n\n    /**\n     * Fills the round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun fillRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int\n    ) {\n        fillRect(x, y, width, height, color)\n    }\n\n    /**\n     * Draw the edges of an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     */\n    actual fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        draw(color) {\n            val radiusX = width.toDouble() / 2.0\n            val radiusY = height.toDouble() / 2.0\n\n            lineWidth = thickness\n            beginPath()\n            ellipse(radiusX + x.toDouble(), radiusY + y.toDouble(), radiusX, radiusY, 0.0, 0.0, FULL_CIRCLE, false)\n            stroke()\n        }\n    }\n\n    /**\n     * Fills an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     *\n     */\n    actual fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        draw(color) {\n            val radiusX = width.toDouble() / 2.0\n            val radiusY = height.toDouble() / 2.0\n\n            beginPath()\n            ellipse(radiusX + x.toDouble(), radiusY + y.toDouble(), radiusX, radiusY, 0.0, 0.0, FULL_CIRCLE, false)\n            fill()\n        }\n    }\n\n    /**\n     * Reads the specified image from [rawData] and draws it at `(x,y)`.\n     *\n     * On JS this has a limitation that the [rawData] image will be loaded considering it has the same [width] as\n     * this object.\n     */\n    @JsName(\"drawImageFromBytes\")\n    actual fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        if (rawData != null && rawData.isNotEmpty()) {\n            draw(0) {\n                val imageData = ImageData(Uint8ClampedArray(rawData.toTypedArray()), width)\n                putImageData(imageData, x.toDouble(), y.toDouble())\n            }\n        }\n    }\n\n    private fun <T> tryGet(what: () -> T): T =\n        try {\n            what()\n        } catch (t: Throwable) {\n            throw Error(CANVAS_UNSUPPORTED, cause = t)\n        }\n}\n"
  },
  {
    "path": "src/jvmMain/kotlin/qrcode/render/JvmQRCodeGraphicsFactory.kt",
    "content": "package qrcode.render\n\nimport java.awt.image.BufferedImage\n\n/**\n * A platform-specific implementation of [QRCodeGraphicsFactory]. It makes it so that all [QRCodeGraphics] instances\n * created by the factory use the specified [bufferedImage] and start drawing at the ([offsetX], [offsetY]) point.\n *\n * @see QRCodeGraphicsFactory\n * @see QRCodeGraphics.useCustomBufferedImage\n */\nclass JvmQRCodeGraphicsFactory(\n    var bufferedImage: BufferedImage,\n    val offsetX: Int = 0,\n    val offsetY: Int = 0,\n) : QRCodeGraphicsFactory() {\n    override fun newGraphics(width: Int, height: Int): QRCodeGraphics =\n        super.newGraphics(width, height)\n            .apply { useCustomBufferedImage(bufferedImage, offsetX, offsetY) }\n}\n"
  },
  {
    "path": "src/jvmMain/kotlin/qrcode/render/QRCodeGraphics.jvm.kt",
    "content": "package qrcode.render\n\nimport java.awt.BasicStroke\nimport java.awt.Color\nimport java.awt.Graphics2D\nimport java.awt.RenderingHints.KEY_ANTIALIASING\nimport java.awt.RenderingHints.VALUE_ANTIALIAS_ON\nimport java.awt.image.BufferedImage\nimport java.io.ByteArrayInputStream\nimport java.io.ByteArrayOutputStream\nimport java.io.OutputStream\nimport java.util.function.Consumer\nimport javax.imageio.ImageIO\nimport kotlin.math.roundToInt\n\n@Suppress(\"MemberVisibilityCanBePrivate\")\nactual open class QRCodeGraphics actual constructor(\n    val width: Int,\n    val height: Int,\n) {\n    private lateinit var image: BufferedImage\n    private val colorCache = HashMap<Int, Color>()\n    private var changed: Boolean = false\n    private var customImage = false\n    private var customImageOffsetX: Int = 0\n    private var customImageOffsetY: Int = 0\n\n    /**\n     * Use a custom, user-defined [BufferedImage] instead of the internal, default one.\n     *\n     * After calling this method, all drawing operations will be offset by [offsetX], [offsetY] as to make the QRCode\n     * look like it was drawn at that position within the image.\n     */\n    fun useCustomBufferedImage(bufferedImage: BufferedImage, offsetX: Int = 0, offsetY: Int = 0): QRCodeGraphics {\n        customImage = true\n        image = bufferedImage\n        customImageOffsetX = offsetX\n        customImageOffsetY = offsetY\n\n        return this\n    }\n\n    /**\n     * Creates a [BufferedImage] if needed. Does nothing if [customImage] is `true`.\n     */\n    protected open fun createImage(force: Boolean = false): BufferedImage {\n        if (!customImage && (force || !this::image.isInitialized)) {\n            image = BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB)\n            customImageOffsetX = 0\n            customImageOffsetY = 0\n        }\n\n        return image\n    }\n\n    /**\n     * Create instances of [Graphics2D] so that drawing operations can be done.\n     */\n    protected open fun createGraphics(): Graphics2D = createImage().createGraphics()\n\n    /**\n     * Handles the annoying parts of drawing. It sets up the specified [color] as the stroke, fill and background colors\n     * and then executes the given [action] passing the [Graphics2D] as a parameter to it.\n     */\n    protected open fun draw(color: Int, strokeThickness: Double? = null, action: (Graphics2D) -> Unit) {\n        changed = true\n        val graphics = createGraphics()\n        val jdkColor = colorCache.computeIfAbsent(color) { Color(color, true) }\n\n        if (strokeThickness != null && strokeThickness > 0) {\n            graphics.stroke = BasicStroke(strokeThickness.toFloat(), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)\n        }\n        graphics.color = jdkColor\n        graphics.background = jdkColor\n        graphics.paint = jdkColor\n        graphics.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON)\n\n        action(graphics)\n\n        graphics.dispose()\n    }\n\n    /** Returns `true` if **any** drawing was performed */\n    actual open fun changed() = changed\n\n    /** Simply changes the `changed` flag to true without doing anything else */\n    actual fun reset() {\n        if (changed) {\n            changed = false\n            createImage(true)\n        }\n    }\n\n    /** Return the dimensions of this Graphics object as a pair of `width, height` */\n    actual open fun dimensions() = arrayOf(width, height)\n\n    /**\n     * Returns this image as a [ByteArray] encoded as PNG. Usually recommended to use [writeImage] instead :)\n     *\n     * @see writeImage\n     */\n    actual open fun getBytes(): ByteArray = getBytes(\"PNG\")\n\n    /**\n     * Returns this image as a [ByteArray] encoded as the specified format. Usually recommended to use [writeImage]\n     * instead :)\n     *\n     * @see writeImage\n     */\n    actual open fun getBytes(format: String): ByteArray =\n        ByteArrayOutputStream().let {\n            writeImage(it, format)\n            it.toByteArray()\n        }\n\n    /**\n     * Writes the QRCode image in the specified [format] into the destination [OutputStream].\n     *\n     * @see ImageIO.write\n     * @throws UnsupportedOperationException No suitable Image Writer was found for the specified format.\n     */\n    @JvmOverloads\n    open fun writeImage(destination: OutputStream, format: String = \"PNG\") {\n        val wasImageWritten = ImageIO.write(createImage(), format, destination)\n\n        if (!wasImageWritten) {\n            throw UnsupportedOperationException(\"Unsupported format: $format\")\n        }\n    }\n\n    /**\n     * Returns the available formats to be passed as parameters to [getBytes].\n     *\n     * @see ImageIO.getWriterFileSuffixes\n     */\n    actual open fun availableFormats(): Array<String> = ImageIO.getWriterFileSuffixes()\n\n    /** Returns the [BufferedImage] object being worked upon. */\n    actual open fun nativeImage(): Any = createImage()\n\n    /** Draw a straight line from point `(x1,y1)` to `(x2,y2)`. */\n    actual open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double) {\n        draw(color, thickness) {\n            it.drawLine(\n                x1 + customImageOffsetX,\n                y1 + customImageOffsetY,\n                x2 + customImageOffsetX,\n                y2 + customImageOffsetY,\n            )\n        }\n    }\n\n    /** Draw the edges of a rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        draw(color, thickness) {\n            val halfThickness = (thickness / 2.0).roundToInt().coerceAtLeast(0)\n            it.drawRect(\n                x + halfThickness + customImageOffsetX,\n                y + halfThickness + customImageOffsetY,\n                width - halfThickness * 2,\n                height - halfThickness * 2,\n            )\n        }\n    }\n\n    /** Fills the rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        draw(color) { it.fillRect(x + customImageOffsetX, y + customImageOffsetY, width, height) }\n    }\n\n    /** Fill the whole area of this canvas with the specified [color]. */\n    actual open fun fill(color: Int) {\n        fillRect(0 + customImageOffsetX, 0 + customImageOffsetY, width, height, color)\n    }\n\n    /**\n     * Draw the edges of a round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        draw(color, thickness) {\n            val halfThickness = (thickness / 2.0).roundToInt().coerceAtLeast(0)\n            it.drawRoundRect(\n                x + halfThickness + customImageOffsetX,\n                y + halfThickness + customImageOffsetY,\n                width - halfThickness * 2,\n                height - halfThickness * 2,\n                borderRadius,\n                borderRadius,\n            )\n        }\n    }\n\n    /**\n     * Fills the round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) {\n        draw(color) {\n            it.fillRoundRect(\n                x + customImageOffsetX,\n                y + customImageOffsetY,\n                width,\n                height,\n                borderRadius,\n                borderRadius,\n            )\n        }\n    }\n\n    /**\n     * Draw the edges of an ellipsis (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     */\n    actual open fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        draw(color, thickness) {\n            val halfThickness = (thickness / 2.0).roundToInt().coerceAtLeast(0)\n            // The docs say the dimensions are width+1 and height+1... why? because f.u.\n            it.drawOval(\n                x + halfThickness + customImageOffsetX,\n                y + halfThickness + customImageOffsetY,\n                width - 1 - halfThickness * 2,\n                height - 1 - halfThickness * 2,\n            )\n        }\n    }\n\n    /**\n     * Fills an ellipsis (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     *\n     */\n    actual open fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        draw(color) {\n            it.fillOval(x + customImageOffsetX, y + customImageOffsetY, width, height)\n        }\n    }\n\n    /**\n     * Reads the specified image from [rawData] and draws it at `(x,y)`\n     */\n    actual open fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        if (rawData != null && rawData.isNotEmpty()) { // NOSONAR\n            draw(0) {\n                ByteArrayInputStream(rawData).use { inStream ->\n                    drawImage(ImageIO.read(inStream), x + customImageOffsetX, y + customImageOffsetY)\n                }\n            }\n        }\n    }\n\n    open fun drawImage(image: BufferedImage?, x: Int, y: Int) {\n        if (image != null) {\n            draw(0) {\n                it.drawImage(image, x + customImageOffsetX, y + customImageOffsetY, null)\n            }\n        }\n    }\n\n    /**\n     * Available so the user can implement their own, 100% custom drawing.\n     */\n    fun directDraw(action: Consumer<Graphics2D>) {\n        draw(0, null) {\n            action.accept(it)\n        }\n    }\n}\n"
  },
  {
    "path": "src/jvmTest/kotlin/qrcode/QRCodeTest.kt",
    "content": "package qrcode\n\n//import com.d_project.qrcode.Mode\n//import io.kotest.core.spec.style.FunSpec\n//import qrcode.color.Colors\n//import qrcode.raw.ErrorCorrectionLevel\n//import qrcode.raw.QRCodeDataType\n//import qrcode.raw.QRCodeProcessor\n//import java.awt.image.BufferedImage\n//\n//class QRCodeTest : FunSpec(\n//    {\n//        context(\"QRCode Rendering\") {\n//            context(\"data is numbers\") {\n//                test(\"default params\") {\n//                    val input = \"123456\"\n//                    val javaQRCode = generateJavaQRCode(input)\n//                    val expectedImage = javaQRCode.createImage(25, 0, Colors.WHITE, Colors.RED)\n//\n//                    val underTest = QRCodeProcessor(input)\n//\n//                    val result = underTest.render(darkColor = Colors.RED)\n//\n//                    val resultImage = result.nativeImage() as BufferedImage\n//\n//                    resultImage shouldHaveSameDimensionsAs expectedImage\n//                    resultImage shouldBeSameImageAs expectedImage\n//                }\n//\n//                test(\"explicitly as string\") {\n//                    val input = \"123456\"\n//                    val javaQRCode = generateJavaQRCode(input, mode = Mode.MODE_8BIT_BYTE)\n//                    val expectedImage = javaQRCode.createImage(25, 0, Colors.WHITE, Colors.RED)\n//\n//                    val underTest = QRCodeProcessor(input, dataType = QRCodeDataType.DEFAULT)\n//\n//                    val result = underTest.render(darkColor = Colors.RED)\n//\n//                    val resultImage = result.nativeImage() as BufferedImage\n//\n//                    resultImage shouldHaveSameDimensionsAs expectedImage\n//                    resultImage shouldBeSameImageAs expectedImage\n//                }\n//            }\n//\n//            test(\"data is string\") {\n//                val input = \"Test!\"\n//                val javaQRCode = generateJavaQRCode(input, mode = Mode.MODE_8BIT_BYTE)\n//                val expectedImage = javaQRCode.createImage(25, 0, Colors.WHITE, Colors.RED)\n//\n//                val underTest = QRCodeProcessor(input)\n//\n//                val result = underTest.render(darkColor = Colors.RED)\n//\n//                val resultImage = result.nativeImage() as BufferedImage\n//\n//                resultImage shouldHaveSameDimensionsAs expectedImage\n//                resultImage shouldBeSameImageAs expectedImage\n//            }\n//        }\n//\n//        context(\"Colors\") {\n//            context(\"foreground\") {\n//                allColors.forEach { (name, color) ->\n//                    test(name) {\n//                        val input = \"Test!\"\n//                        val javaQRCode = generateJavaQRCode(input, mode = Mode.MODE_8BIT_BYTE)\n//                        val expectedImage = javaQRCode.createImage(25, 0, Colors.WHITE, color)\n//\n//                        val underTest = QRCodeProcessor(input)\n//\n//                        val result = underTest.render(darkColor = color)\n//\n//                        val resultImage = result.nativeImage() as BufferedImage\n//\n//                        resultImage shouldHaveSameDimensionsAs expectedImage\n//                        resultImage shouldBeSameImageAs expectedImage\n//                    }\n//                }\n//            }\n//\n//            context(\"background\") {\n//                allColors.forEach { (name, color) ->\n//                    test(name) {\n//                        val input = \"Test!\"\n//                        val javaQRCode = generateJavaQRCode(input, mode = Mode.MODE_8BIT_BYTE)\n//                        val expectedImage = javaQRCode.createImage(25, 0, color, Colors.RED)\n//\n//                        val underTest = QRCodeProcessor(input)\n//\n//                        val result = underTest.render(brightColor = color, darkColor = Colors.RED)\n//\n//                        val resultImage = result.nativeImage() as BufferedImage\n//\n//                        resultImage shouldHaveSameDimensionsAs expectedImage\n//                        resultImage shouldBeSameImageAs expectedImage\n//                    }\n//                }\n//            }\n//        }\n//    },\n//)\n//\n//private fun generateJavaQRCode(\n//    data: String,\n//    ecl: Int = com.d_project.qrcode.ErrorCorrectionLevel.M,\n//    type: Int = 1,\n//    mode: Int = QRCodeProcessor.typeForDataAndECL(data, ErrorCorrectionLevel.values().first { it.value == ecl }),\n//): com.d_project.qrcode.QRCode =\n//    com.d_project.qrcode.QRCode().apply {\n//        errorCorrectionLevel = ecl\n//        typeNumber = type\n//        addData(data, mode)\n//        make(false, 0)\n//    }\n//\n//private val allColors = mapOf(\n//    \"ALICE_BLUE\" to Colors.ALICE_BLUE,\n//    \"ANTIQUE_WHITE\" to Colors.ANTIQUE_WHITE,\n//    \"AQUA\" to Colors.AQUA,\n//    \"AQUAMARINE\" to Colors.AQUAMARINE,\n//    \"AZURE\" to Colors.AZURE,\n//    \"BEIGE\" to Colors.BEIGE,\n//    \"BISQUE\" to Colors.BISQUE,\n//    \"BLACK\" to Colors.BLACK,\n//    \"BLANCHED_ALMOND\" to Colors.BLANCHED_ALMOND,\n//    \"BLUE\" to Colors.BLUE,\n//    \"BLUE_VIOLET\" to Colors.BLUE_VIOLET,\n//    \"BROWN\" to Colors.BROWN,\n//    \"BURLY_WOOD\" to Colors.BURLY_WOOD,\n//    \"CADET_BLUE\" to Colors.CADET_BLUE,\n//    \"CHARTREUSE\" to Colors.CHARTREUSE,\n//    \"CHOCOLATE\" to Colors.CHOCOLATE,\n//    \"CORAL\" to Colors.CORAL,\n//    \"CORNFLOWER_BLUE\" to Colors.CORNFLOWER_BLUE,\n//    \"CORNSILK\" to Colors.CORNSILK,\n//    \"CRIMSON\" to Colors.CRIMSON,\n//    \"CYAN\" to Colors.CYAN,\n//    \"DARK_BLUE\" to Colors.DARK_BLUE,\n//    \"DARK_CYAN\" to Colors.DARK_CYAN,\n//    \"DARK_GOLDEN_ROD\" to Colors.DARK_GOLDEN_ROD,\n//    \"DARK_GRAY\" to Colors.DARK_GRAY,\n//    \"DARK_GREY\" to Colors.DARK_GREY,\n//    \"DARK_GREEN\" to Colors.DARK_GREEN,\n//    \"DARK_KHAKI\" to Colors.DARK_KHAKI,\n//    \"DARK_MAGENTA\" to Colors.DARK_MAGENTA,\n//    \"DARK_OLIVE_GREEN\" to Colors.DARK_OLIVE_GREEN,\n//    \"DARK_ORANGE\" to Colors.DARK_ORANGE,\n//    \"DARK_ORCHID\" to Colors.DARK_ORCHID,\n//    \"DARK_RED\" to Colors.DARK_RED,\n//    \"DARK_SALMON\" to Colors.DARK_SALMON,\n//    \"DARK_SEA_GREEN\" to Colors.DARK_SEA_GREEN,\n//    \"DARK_SLATE_BLUE\" to Colors.DARK_SLATE_BLUE,\n//    \"DARK_SLATE_GRAY\" to Colors.DARK_SLATE_GRAY,\n//    \"DARK_SLATE_GREY\" to Colors.DARK_SLATE_GREY,\n//    \"DARK_TURQUOISE\" to Colors.DARK_TURQUOISE,\n//    \"DARK_VIOLET\" to Colors.DARK_VIOLET,\n//    \"DEEP_PINK\" to Colors.DEEP_PINK,\n//    \"DEEP_SKY_BLUE\" to Colors.DEEP_SKY_BLUE,\n//    \"DIM_GRAY\" to Colors.DIM_GRAY,\n//    \"DIM_GREY\" to Colors.DIM_GREY,\n//    \"DODGER_BLUE\" to Colors.DODGER_BLUE,\n//    \"FIRE_BRICK\" to Colors.FIRE_BRICK,\n//    \"FLORAL_WHITE\" to Colors.FLORAL_WHITE,\n//    \"FOREST_GREEN\" to Colors.FOREST_GREEN,\n//    \"FUCHSIA\" to Colors.FUCHSIA,\n//    \"GAINSBORO\" to Colors.GAINSBORO,\n//    \"GHOST_WHITE\" to Colors.GHOST_WHITE,\n//    \"GOLD\" to Colors.GOLD,\n//    \"GOLDEN_ROD\" to Colors.GOLDEN_ROD,\n//    \"GRAY\" to Colors.GRAY,\n//    \"GREY\" to Colors.GREY,\n//    \"GREEN\" to Colors.GREEN,\n//    \"GREEN_YELLOW\" to Colors.GREEN_YELLOW,\n//    \"HONEY_DEW\" to Colors.HONEY_DEW,\n//    \"HOT_PINK\" to Colors.HOT_PINK,\n//    \"INDIAN_RED\" to Colors.INDIAN_RED,\n//    \"INDIGO\" to Colors.INDIGO,\n//    \"IVORY\" to Colors.IVORY,\n//    \"KHAKI\" to Colors.KHAKI,\n//    \"LAVENDER\" to Colors.LAVENDER,\n//    \"LAVENDER_BLUSH\" to Colors.LAVENDER_BLUSH,\n//    \"LAWN_GREEN\" to Colors.LAWN_GREEN,\n//    \"LEMON_CHIFFON\" to Colors.LEMON_CHIFFON,\n//    \"LIGHT_BLUE\" to Colors.LIGHT_BLUE,\n//    \"LIGHT_CORAL\" to Colors.LIGHT_CORAL,\n//    \"LIGHT_CYAN\" to Colors.LIGHT_CYAN,\n//    \"LIGHT_GOLDEN_ROD_YELLOW\" to Colors.LIGHT_GOLDEN_ROD_YELLOW,\n//    \"LIGHT_GRAY\" to Colors.LIGHT_GRAY,\n//    \"LIGHT_GREY\" to Colors.LIGHT_GREY,\n//    \"LIGHT_GREEN\" to Colors.LIGHT_GREEN,\n//    \"LIGHT_PINK\" to Colors.LIGHT_PINK,\n//    \"LIGHT_SALMON\" to Colors.LIGHT_SALMON,\n//    \"LIGHT_SEA_GREEN\" to Colors.LIGHT_SEA_GREEN,\n//    \"LIGHT_SKY_BLUE\" to Colors.LIGHT_SKY_BLUE,\n//    \"LIGHT_SLATE_GRAY\" to Colors.LIGHT_SLATE_GRAY,\n//    \"LIGHT_SLATE_GREY\" to Colors.LIGHT_SLATE_GREY,\n//    \"LIGHT_STEEL_BLUE\" to Colors.LIGHT_STEEL_BLUE,\n//    \"LIGHT_YELLOW\" to Colors.LIGHT_YELLOW,\n//    \"LIME\" to Colors.LIME,\n//    \"LIME_GREEN\" to Colors.LIME_GREEN,\n//    \"LINEN\" to Colors.LINEN,\n//    \"MAGENTA\" to Colors.MAGENTA,\n//    \"MAROON\" to Colors.MAROON,\n//    \"MEDIUM_AQUA_MARINE\" to Colors.MEDIUM_AQUA_MARINE,\n//    \"MEDIUM_BLUE\" to Colors.MEDIUM_BLUE,\n//    \"MEDIUM_ORCHID\" to Colors.MEDIUM_ORCHID,\n//    \"MEDIUM_PURPLE\" to Colors.MEDIUM_PURPLE,\n//    \"MEDIUM_SEA_GREEN\" to Colors.MEDIUM_SEA_GREEN,\n//    \"MEDIUM_SLATE_BLUE\" to Colors.MEDIUM_SLATE_BLUE,\n//    \"MEDIUM_SPRING_GREEN\" to Colors.MEDIUM_SPRING_GREEN,\n//    \"MEDIUM_TURQUOISE\" to Colors.MEDIUM_TURQUOISE,\n//    \"MEDIUM_VIOLET_RED\" to Colors.MEDIUM_VIOLET_RED,\n//    \"MIDNIGHT_BLUE\" to Colors.MIDNIGHT_BLUE,\n//    \"MINT_CREAM\" to Colors.MINT_CREAM,\n//    \"MISTY_ROSE\" to Colors.MISTY_ROSE,\n//    \"MOCCASIN\" to Colors.MOCCASIN,\n//    \"NAVAJO_WHITE\" to Colors.NAVAJO_WHITE,\n//    \"NAVY\" to Colors.NAVY,\n//    \"OLD_LACE\" to Colors.OLD_LACE,\n//    \"OLIVE\" to Colors.OLIVE,\n//    \"OLIVE_DRAB\" to Colors.OLIVE_DRAB,\n//    \"ORANGE\" to Colors.ORANGE,\n//    \"ORANGE_RED\" to Colors.ORANGE_RED,\n//    \"ORCHID\" to Colors.ORCHID,\n//    \"PALE_GOLDEN_ROD\" to Colors.PALE_GOLDEN_ROD,\n//    \"PALE_GREEN\" to Colors.PALE_GREEN,\n//    \"PALE_TURQUOISE\" to Colors.PALE_TURQUOISE,\n//    \"PALE_VIOLET_RED\" to Colors.PALE_VIOLET_RED,\n//    \"PAPAYA_WHIP\" to Colors.PAPAYA_WHIP,\n//    \"PEACH_PUFF\" to Colors.PEACH_PUFF,\n//    \"PERU\" to Colors.PERU,\n//    \"PINK\" to Colors.PINK,\n//    \"PLUM\" to Colors.PLUM,\n//    \"POWDER_BLUE\" to Colors.POWDER_BLUE,\n//    \"PURPLE\" to Colors.PURPLE,\n//    \"REBECCA_PURPLE\" to Colors.REBECCA_PURPLE,\n//    \"RED\" to Colors.RED,\n//    \"ROSY_BROWN\" to Colors.ROSY_BROWN,\n//    \"ROYAL_BLUE\" to Colors.ROYAL_BLUE,\n//    \"SADDLE_BROWN\" to Colors.SADDLE_BROWN,\n//    \"SALMON\" to Colors.SALMON,\n//    \"SANDY_BROWN\" to Colors.SANDY_BROWN,\n//    \"SEA_GREEN\" to Colors.SEA_GREEN,\n//    \"SEA_SHELL\" to Colors.SEA_SHELL,\n//    \"SIENNA\" to Colors.SIENNA,\n//    \"SILVER\" to Colors.SILVER,\n//    \"SKY_BLUE\" to Colors.SKY_BLUE,\n//    \"SLATE_BLUE\" to Colors.SLATE_BLUE,\n//    \"SLATE_GRAY\" to Colors.SLATE_GRAY,\n//    \"SLATE_GREY\" to Colors.SLATE_GREY,\n//    \"SNOW\" to Colors.SNOW,\n//    \"SPRING_GREEN\" to Colors.SPRING_GREEN,\n//    \"STEEL_BLUE\" to Colors.STEEL_BLUE,\n//    \"TAN\" to Colors.TAN,\n//    \"TEAL\" to Colors.TEAL,\n//    \"THISTLE\" to Colors.THISTLE,\n//    \"TOMATO\" to Colors.TOMATO,\n//    \"TURQUOISE\" to Colors.TURQUOISE,\n//    \"VIOLET\" to Colors.VIOLET,\n//    \"WHEAT\" to Colors.WHEAT,\n//    \"WHITE\" to Colors.WHITE,\n//    \"WHITE_SMOKE\" to Colors.WHITE_SMOKE,\n//    \"YELLOW\" to Colors.YELLOW,\n//    \"YELLOW_GREEN\" to Colors.YELLOW_GREEN,\n//)\n"
  },
  {
    "path": "src/jvmTest/kotlin/qrcode/TestUtils.kt",
    "content": "@file:JvmName(\"TestUtils\")\n\npackage qrcode\n\nimport io.kotest.matchers.Matcher\nimport io.kotest.matchers.MatcherResult\nimport io.kotest.matchers.should\nimport java.awt.Color\nimport java.awt.Point\nimport java.awt.image.BufferedImage\nimport java.io.File\nimport java.nio.file.Paths\nimport java.time.LocalDateTime\nimport java.time.format.DateTimeFormatter\nimport javax.imageio.ImageIO\n\nprivate var testNum = 1\n\n/**\n * Check if two [BufferedImage] have the same width and height.\n */\nfun haveSameDimensions(otherImage: BufferedImage) = object : Matcher<BufferedImage> {\n    override fun test(value: BufferedImage) = MatcherResult(\n        value.width == otherImage.width && value.height == otherImage.height,\n        { \"Image should be ${value.width}x${value.height}\" },\n        { \"Image should not be ${value.width}x${value.height}\" },\n    )\n}\n\ninfix fun BufferedImage.shouldHaveSameDimensionsAs(otherImage: BufferedImage) =\n    this should haveSameDimensions(otherImage)\n\n/**\n * Check if two [BufferedImage] are pixel-equal to each other. They are expected to be of same width and height.\n */\nfun haveSamePixelsAs(otherImage: BufferedImage) = object : Matcher<BufferedImage> {\n    private fun printRGBA(rgb: Int): String = Color(rgb).let { \"rgba(${it.red}, ${it.green}, ${it.blue}, ${it.alpha})\" }\n\n    private fun saveImages(image1: BufferedImage, image2: BufferedImage): File {\n        try {\n            val gap = 25\n            val now = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyyMMddhhmmss\"))\n            val file = Paths.get(System.getProperty(\"user.home\"), \"imageCompare-${testNum++}-$now.png\").toFile()\n            val compareImage = BufferedImage(\n                image1.width + image2.width + gap,\n                image1.height.coerceAtLeast(image2.height),\n                image1.type,\n            )\n            val graphics = compareImage.createGraphics()\n\n            graphics.color = Color.YELLOW\n            graphics.background = Color.YELLOW\n            graphics.fillRect(image1.width, 0, gap, compareImage.height)\n            graphics.drawImage(image1, 0, 0, null)\n            graphics.drawImage(image2, image1.width + gap, 0, null)\n            graphics.dispose()\n\n            ImageIO.write(compareImage, \"PNG\", file)\n\n            return file\n        } catch (e: Exception) {\n            return File(\"ERROR_WHILE_SAVING_DIFF_IMAGE\")\n        }\n    }\n\n    private fun comparePixels(image1: BufferedImage, image2: BufferedImage): Triple<Boolean, Point?, Pair<Int, Int>?> {\n        for (x in 0 until image1.width) {\n            for (y in 0 until image1.height) {\n                if (image1.getRGB(x, y) != image2.getRGB(x, y)) {\n                    return Triple(false, Point(x, y), Pair(image1.getRGB(x, y), image2.getRGB(x, y)))\n                }\n            }\n        }\n\n        return Triple(true, null, null)\n    }\n\n    override fun test(value: BufferedImage) =\n        comparePixels(value, otherImage)\n            .let { (result, differentPixel, colorPair) ->\n                MatcherResult(\n                    result,\n                    {\n                        val file = saveImages(value, otherImage)\n                        \"Pixel at (${differentPixel!!.x}, ${differentPixel.y}) is different.\" +\n                            \" Expected: ${printRGBA(colorPair!!.first)}, Got: ${printRGBA(colorPair.second)}!\" +\n                            \" Saved images at: $file\"\n                    },\n                    {\n                        val file = saveImages(value, otherImage)\n                        \"Images should not be pixel-equal but all pixels are the same RGB color!\" +\n                            \" Saved images at: $file\"\n                    },\n                )\n            }\n}\n\ninfix fun BufferedImage.shouldBeSameImageAs(otherImage: BufferedImage) = this should haveSamePixelsAs(otherImage)\n"
  },
  {
    "path": "src/jvmTest/kotlin/qrcode/render/ColorsTest.kt",
    "content": "package qrcode.render\n\nimport io.kotest.core.spec.style.FunSpec\nimport io.kotest.matchers.shouldBe\nimport io.kotest.matchers.shouldNotBe\nimport qrcode.color.Colors\nimport java.awt.Color\n\nclass ColorsTest : FunSpec(\n    {\n\n        context(\"CSS\") {\n            test(\"red\") {\n                val colorCode = \"#cc0000\"\n                val expected = awtColor(colorCode).rgb\n\n                val color = Colors.css(colorCode)\n\n                color shouldBe expected\n            }\n\n            test(\"green\") {\n                val colorCode = \"#00cc00\"\n                val expected = awtColor(colorCode).rgb\n\n                val color = Colors.css(colorCode)\n\n                color shouldBe expected\n            }\n\n            test(\"blue\") {\n                val colorCode = \"#0000cc\"\n                val expected = awtColor(colorCode).rgb\n\n                val color = Colors.css(colorCode)\n\n                color shouldBe expected\n            }\n\n            test(\"rgb\") {\n                val colorCode = \"#aabbcc\"\n                val expected = awtColor(colorCode).rgb\n\n                val color = Colors.css(colorCode)\n\n                color shouldBe expected\n            }\n        }\n\n        context(\"RGBA\") {\n            test(\"without alpha\") {\n                val colorCode = \"#010203\"\n                val expected = awtColor(colorCode).rgb\n\n                val color = Colors.rgba(1, 2, 3)\n\n                color shouldBe expected\n            }\n\n            test(\"with alpha\") {\n                val colorCode = \"#010203\"\n                val expected = awtColor(colorCode, 50).rgb\n\n                val color = Colors.rgba(1, 2, 3, 50)\n\n                color shouldBe expected\n            }\n        }\n\n        context(\"getRGBA\") {\n            test(\"without alpha\") {\n                val colorCode = \"#010203\"\n                val color = Colors.css(colorCode)\n                val expected = awtColor(colorCode)\n                val expectedRed = expected.red\n                val expectedGreen = expected.green\n                val expectedBlue = expected.blue\n\n                val (red, green, blue) = Colors.getRGBA(color)\n\n                red shouldBe expectedRed\n                green shouldBe expectedGreen\n                blue shouldBe expectedBlue\n            }\n\n            test(\"with alpha\") {\n                val colorCode = \"#010203\"\n                val color = Colors.withAlpha(Colors.css(colorCode), 50)\n                val expected = awtColor(colorCode, 50)\n                val expectedRed = expected.red\n                val expectedGreen = expected.green\n                val expectedBlue = expected.blue\n                val expectedAlpha = expected.alpha\n\n                val (red, green, blue, alpha) = Colors.getRGBA(color)\n\n                red shouldBe expectedRed\n                green shouldBe expectedGreen\n                blue shouldBe expectedBlue\n                alpha shouldBe expectedAlpha\n            }\n        }\n\n        test(\"withAlpha - set alpha to color\") {\n            val colorCode = \"#010203\"\n            val color = Colors.css(colorCode)\n            val expected = awtColor(colorCode, 50).rgb\n\n            val result = Colors.withAlpha(color, 50)\n\n            result shouldNotBe color\n            result shouldBe expected\n        }\n    },\n)\n\nprivate fun awtColor(string: String, alpha: Int? = null): Color =\n    Color.decode(\"0x${string.substring(1)}\")\n        .let {\n            if (alpha != null) {\n                Color(it.red, it.green, it.blue, alpha)\n            } else {\n                it\n            }\n        }\n"
  },
  {
    "path": "src/tvosMain/kotlin/qrcode/render/QRCodeGraphics.tvos.kt",
    "content": "package qrcode.render\n\nimport kotlinx.cinterop.ExperimentalForeignApi\nimport kotlinx.cinterop.addressOf\nimport kotlinx.cinterop.usePinned\nimport platform.CoreGraphics.CGContextFillEllipseInRect\nimport platform.CoreGraphics.CGContextFillPath\nimport platform.CoreGraphics.CGContextSetLineWidth\nimport platform.CoreGraphics.CGContextStrokeEllipseInRect\nimport platform.CoreGraphics.CGContextStrokePath\nimport platform.CoreGraphics.CGPathCreateWithRoundedRect\nimport platform.CoreGraphics.CGPointMake\nimport platform.CoreGraphics.CGRectMake\nimport platform.CoreGraphics.CGSizeMake\nimport platform.Foundation.NSMutableData\nimport platform.Foundation.appendBytes\nimport platform.UIKit.UIColor\nimport platform.UIKit.UIGraphicsImageRenderer\nimport platform.UIKit.UIGraphicsImageRendererContext\nimport platform.UIKit.UIImage\nimport platform.UIKit.UIImageHEICRepresentation\nimport platform.UIKit.UIImageJPEGRepresentation\nimport platform.UIKit.UIImagePNGRepresentation\nimport qrcode.color.Colors\nimport utils.toByteArray\n\n@OptIn(ExperimentalForeignApi::class)\n@Suppress(\"MemberVisibilityCanBePrivate\")\nactual open class QRCodeGraphics actual constructor(\n    val width: Int,\n    val height: Int,\n) {\n    companion object {\n        private val AVAILABLE_FORMATS = arrayOf(\"JPEG\", \"PNG\", \"HEIC\")\n        private const val MAX_COLOR_VALUE = 255.0\n    }\n\n    private var changed: Boolean = false\n    private val imgSize = CGSizeMake(width = width.toDouble(), height = height.toDouble())\n    private val renderer = UIGraphicsImageRenderer(imgSize)\n\n    private val renderActions = mutableListOf<(UIGraphicsImageRendererContext) -> Unit>()\n\n    private fun colorOf(color: Int): UIColor {\n        /**\n         * When creating a UIColor instance, RGBA color components are expected in the range 0.0 to 1.0.\n         * To convert 8-bit values (0 to 255) to this range we must divide by 255.0.\n         * Dividing by 255.0 ensures the color components are normalized appropriately.\n         */\n        val (r, g, b, a) = Colors.getRGBAPercentages(color)\n\n        return UIColor(\n            red = r,\n            green = g,\n            blue = b,\n            alpha = a,\n        )\n    }\n\n    /** Returns `true` if **any** drawing was performed */\n    actual open fun changed() = changed\n\n    /** Simply changes the `changed` flag to true without doing anything else */\n    actual fun reset() {\n        if (changed) {\n            changed = false\n            renderActions.clear()\n        }\n    }\n\n    /** Return the dimensions of this Graphics object as a pair of `width, height` */\n    actual open fun dimensions() = arrayOf(width, height)\n\n    /** Returns this image as a [ByteArray] encoded as PNG. */\n    actual open fun getBytes(): ByteArray = getBytes(\"PNG\")\n\n    /**\n     * Returns this image as a [ByteArray] encoded as the specified format.\n     *\n     * @see availableFormats\n     */\n    actual open fun getBytes(format: String): ByteArray =\n        (nativeImage() as? UIImage)?.let { image ->\n            when (format) {\n                \"HEIC\" -> UIImageHEICRepresentation(image)\n                \"JPEG\" -> UIImageJPEGRepresentation(image, 1.0)\n                \"PNG\" -> UIImagePNGRepresentation(image)\n                else -> null\n            }?.toByteArray() ?: ByteArray(0)\n        } ?: ByteArray(0)\n\n    /**\n     * Returns the available formats to be passed as parameters to [getBytes].\n     *\n     * As implied by the iOS Documentation, only JPEG and PNG are supported.\n     *\n     */\n    actual open fun availableFormats(): Array<String> = AVAILABLE_FORMATS\n\n    /** Returns the [Bitmap] object being worked upon. */\n    actual open fun nativeImage(): Any = renderer.imageWithActions { context ->\n        if (context != null) {\n            renderActions.forEach { it(context) }\n        }\n    }\n\n    /**\n     * Does nothing.\n     *\n     * **Note: I couldn't find a method for doing this on the iOS API. If you know of one, please send a message :)**\n     *\n     * @see fill\n     * @see fillRect\n     * @see drawRect\n     * @see drawImage\n     */\n    actual open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double) {\n        // Unsupported\n    }\n\n    /** Draw the edges of a rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        renderActions.add {\n            colorOf(color).setStroke()\n            val rect = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGContextSetLineWidth(it.CGContext, thickness)\n            it.strokeRect(rect)\n        }\n    }\n\n    /** Fills the rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        renderActions.add {\n            colorOf(color).setFill()\n            val rect = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            it.fillRect(rect)\n        }\n    }\n\n    /** Fill the whole area of this canvas with the specified [color]. */\n    actual open fun fill(color: Int) {\n        fillRect(0, 0, width, height, color)\n    }\n\n    /**\n     * Draw the edges of a round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        renderActions.add {\n            colorOf(color).setFill()\n\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGPathCreateWithRoundedRect(area, borderRadius.toDouble(), borderRadius.toDouble(), null)\n\n            CGContextFillPath(it.CGContext)\n        }\n    }\n\n    /**\n     * Fills the round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * fillRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun fillRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int) {\n        renderActions.add {\n            colorOf(color).setStroke()\n\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGPathCreateWithRoundedRect(area, borderRadius.toDouble(), borderRadius.toDouble(), null)\n\n            CGContextStrokePath(it.CGContext)\n        }\n    }\n\n    /**\n     * Draw the edges of an ellipsis (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     */\n    actual fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        renderActions.add {\n            colorOf(color).setStroke()\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGContextStrokeEllipseInRect(it.CGContext, area)\n        }\n    }\n\n    /**\n     * Fills an ellipsis (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     *\n     */\n    actual fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        renderActions.add {\n            colorOf(color).setFill()\n            val area = CGRectMake(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n            CGContextFillEllipseInRect(it.CGContext, area)\n        }\n    }\n\n    /**\n     * Reads the specified image from [rawData] and draws it at `(x,y)`\n     */\n    actual fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        if (rawData != null && rawData.isNotEmpty()) {\n            renderActions.add {\n                rawData.usePinned {\n                    val imgData = NSMutableData()\n                    imgData.appendBytes(it.addressOf(0), rawData.size.toULong())\n\n                    val image = UIImage(imgData)\n                    val point = CGPointMake(x = x.toDouble(), y = y.toDouble())\n                    image.drawAtPoint(point)\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/tvosMain/kotlin/utils/TvOSNativeParser.kt",
    "content": "package utils\n\nimport kotlinx.cinterop.ExperimentalForeignApi\nimport kotlinx.cinterop.addressOf\nimport kotlinx.cinterop.usePinned\nimport platform.Foundation.NSData\nimport platform.posix.memcpy\n\n/**\n * Converts a [NSData] object to a [ByteArray].\n * This function is useful when working in Kotlin/Native where data may be represented as [ByteArray]\n */\n@OptIn(ExperimentalForeignApi::class)\ninternal fun NSData.toByteArray(): ByteArray {\n    val arrayLen = length.toInt().coerceAtLeast(0)\n\n    return ByteArray(arrayLen).apply {\n        if (arrayLen > 0) {\n            this.usePinned { memcpy(it.addressOf(0), bytes, length) }\n        }\n    }\n}\n"
  },
  {
    "path": "src/wasmJsMain/kotlin/qrcode/render/QRCodeGraphics.wasmjs.kt",
    "content": "package qrcode.render\n\nimport kotlinx.browser.document\nimport org.khronos.webgl.Uint8ClampedArray\nimport org.khronos.webgl.toInt8Array\nimport org.w3c.dom.CanvasRenderingContext2D\nimport org.w3c.dom.HTMLCanvasElement\nimport org.w3c.dom.ImageData\nimport org.w3c.files.Blob\n\n@Suppress(\"MemberVisibilityCanBePrivate\")\nactual open class QRCodeGraphics actual constructor(\n    val width: Int,\n    val height: Int,\n) {\n    companion object {\n        private const val CANVAS_UNSUPPORTED = \"Canvas seems to not be supported :(\"\n        private const val FULL_CIRCLE = 3.141592653589793 * 2.0 // 2 * PI = Full circle\n    }\n\n    private val canvas: HTMLCanvasElement\n    private var changed: Boolean = false\n\n    init {\n        val canvas = tryGet { document.createElement(\"canvas\") as HTMLCanvasElement }\n\n        canvas.width = width\n        canvas.height = height\n\n        this.canvas = canvas\n    }\n\n    private fun rgba(color: Int): String {\n        val r = (color shr 16) and 0xFF\n        val g = (color shr 8) and 0xFF\n        val b = (color shr 0) and 0xFF\n        val a = ((color shr 24) and 0xFF) / 255.0\n        return \"rgba($r,$g,$b,$a)\"\n    }\n\n    private fun draw(color: Int, action: CanvasRenderingContext2D.() -> Unit) {\n        changed = true\n\n        val context = tryGet { canvas.getContext(\"2d\") as CanvasRenderingContext2D }\n\n        val colorString = rgba(color)\n        context.fillStyle = colorString.toJsString()\n        context.strokeStyle = colorString.toJsString()\n\n        val lineWidth = context.lineWidth\n\n        action(context)\n\n        context.lineWidth = lineWidth\n    }\n\n    /** Returns `true` if **any** drawing was performed */\n    actual open fun changed() = changed\n\n    /** Simply changes the `changed` flag to true without doing anything else */\n    actual fun reset() {\n        if (changed) {\n            changed = false\n            draw(0) { clearRect(0.0, 0.0, width.toDouble(), height.toDouble()) }\n        }\n    }\n\n    /** Return the dimensions of this Graphics object as a pair of `width, height` */\n    actual open fun dimensions() = arrayOf(width, height)\n\n    /**\n     * Returns a Data URL to this can be shown in an `<img/>` tag.\n     */\n    open fun toDataURL(format: String = \"png\"): String = canvas.toDataURL(format)\n\n    /**\n     * Direct access to the `.toBlob()` function of the underlying canvas.\n     *\n     * Syntactic sugar for `nativeImage().toBlob(callback)`.\n     */\n    open fun toBlob(callback: (Blob?) -> Unit): Unit = canvas.toBlob(callback)\n\n    /** Returns this image as a [ByteArray] encoded as PNG. */\n    actual open fun getBytes(): ByteArray = getBytes(\"png\")\n\n    /** Returns this image as a [ByteArray] encoded as the specified format (e.g. `PNG`, `JPG`, `BMP`, ...). */\n    @JsName(\"getBytesForFormat\")\n    actual open fun getBytes(format: String): ByteArray =\n        canvas.toDataURL(format).encodeToByteArray()\n\n    /** Returns the available formats to be passed as parameters to [getBytes].\n     *\n     * **Note:** The actual list of supported formats depends on the browser, so this won't be checked. PNG is always supported.\n     */\n    actual open fun availableFormats(): Array<String> = arrayOf(\"png\")\n\n    /** Returns the native image object this QRCodeGraphics is working upon. */\n    actual open fun nativeImage(): Any = canvas\n\n    /** Draw a straight line from point `(x1,y1)` to `(x2,y2)`. */\n    actual open fun drawLine(x1: Int, y1: Int, x2: Int, y2: Int, color: Int, thickness: Double) {\n        draw(color) {\n            moveTo(x1.toDouble(), y1.toDouble())\n            lineTo(x2.toDouble(), y2.toDouble())\n        }\n    }\n\n    /** Draw the edges of a rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun drawRect(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        draw(color) {\n            lineWidth = thickness\n            val halfThickness = thickness / 2.0\n            strokeRect(\n                x.toDouble() + halfThickness,\n                y.toDouble() + halfThickness,\n                width.toDouble() - thickness,\n                height.toDouble() - thickness,\n            )\n        }\n    }\n\n    /** Fills the rectangle starting at point `(x,y)` and having `width` by `height`. */\n    actual open fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        draw(color) {\n            fillRect(x.toDouble(), y.toDouble(), width.toDouble(), height.toDouble())\n        }\n    }\n\n    /** Fill the whole area of this canvas with the specified [color]. */\n    actual open fun fill(color: Int) {\n        fillRect(0, 0, width, height, color)\n    }\n\n    /**\n     * Draw the edges of a round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun drawRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n        thickness: Double,\n    ) {\n        drawRect(x, y, width, height, color, 1.0)\n    }\n\n    /**\n     * Fills the round rectangle starting at point `(x,y)` and having `width` by `height`\n     * with edges that are `borderRadius` pixels round (almost like CSS).\n     *\n     * If it helps, these would _in theory_ draw the same thing:\n     *\n     * ```\n     * // CSS\n     * .roundRect {\n     *     width: 100px;\n     *     height: 100px;\n     *     border-radius: 5px;\n     * }\n     *\n     * // Kotlin\n     * drawRoundRect(0, 0, 100, 100, 5)\n     * ```\n     *\n     * **Note:** you can't specify different sizes for different edges. This is just an example :)\n     *\n     */\n    actual open fun fillRoundRect(\n        x: Int,\n        y: Int,\n        width: Int,\n        height: Int,\n        borderRadius: Int,\n        color: Int,\n    ) {\n        fillRect(x, y, width, height, color)\n    }\n\n    /**\n     * Draw the edges of an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     */\n    actual fun drawEllipse(x: Int, y: Int, width: Int, height: Int, color: Int, thickness: Double) {\n        draw(color) {\n            val radiusX = width.toDouble() / 2.0\n            val radiusY = height.toDouble() / 2.0\n\n            lineWidth = thickness\n            beginPath()\n            ellipse(radiusX + x.toDouble(), radiusY + y.toDouble(), radiusX, radiusY, 0.0, 0.0, FULL_CIRCLE, false)\n            stroke()\n        }\n    }\n\n    /**\n     * Fills an ellipse (aka \"a circle\") which occupies the area `(x,y,width,height)`\n     *\n     */\n    actual fun fillEllipse(x: Int, y: Int, width: Int, height: Int, color: Int) {\n        draw(color) {\n            val radiusX = width.toDouble() / 2.0\n            val radiusY = height.toDouble() / 2.0\n\n            beginPath()\n            ellipse(radiusX + x.toDouble(), radiusY + y.toDouble(), radiusX, radiusY, 0.0, 0.0, FULL_CIRCLE, false)\n            fill()\n        }\n    }\n\n    /**\n     * Reads the specified image from [rawData] and draws it at `(x,y)`.\n     *\n     * On JS this has a limitation that the [rawData] image will be loaded considering it has the same [width] as\n     * this object.\n     */\n    @JsName(\"drawImageFromBytes\")\n    actual fun drawImage(rawData: ByteArray?, x: Int, y: Int) {\n        if (rawData != null && rawData.isNotEmpty()) {\n            draw(0) {\n                val imageDataArray: JsArray<JsNumber> = rawData.toInt8Array().unsafeCast()\n                val imageData = ImageData(Uint8ClampedArray(imageDataArray), width)\n                putImageData(imageData, x.toDouble(), y.toDouble())\n            }\n        }\n    }\n\n    private fun <T> tryGet(what: () -> T): T =\n        try {\n            what()\n        } catch (t: Throwable) {\n            throw Error(CANVAS_UNSUPPORTED, cause = t)\n        }\n}\n"
  }
]