[
  {
    "path": ".github/workflows/test.yml",
    "content": "name: Test\n\non:\n  push:\n    branches:\n      - master\n\njobs:\n  test:\n    name: Test on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [macos-latest, ubuntu-latest, windows-latest]\n    steps:\n      - uses: actions/checkout@v2\n      - name: Update submodules\n        run: git submodule update --init --recursive\n      - name: Flutter action\n        uses: subosito/flutter-action@v1\n        with:\n          channel: beta\n      - run: flutter pub get\n      - run: flutter test test/flutter_qjs_test.dart"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\n.dart_tool/\n\n.packages\n.pub/\n\nbuild/\n.idea/\n.vscode/settings.json\n\nios/cxx\nmacos/cxx"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"cxx/quickjs\"]\n  path = cxx/quickjs\n  url = https://github.com/ekibun/quickjs.git"
  },
  {
    "path": ".metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: f3b7788f7754a51092ae1d677001767960c21910\n  channel: master\n\nproject_type: plugin\n"
  },
  {
    "path": ".vscode/c_cpp_properties.json",
    "content": "{\n    \"configurations\": [\n        {\n            \"name\": \"Win32\",\n            \"includePath\": [\n                \"${workspaceFolder}/windows/**\",\n                \"${workspaceFolder}/example/windows/**\"\n            ],\n            \"defines\": [\n                \"_DEBUG\",\n                \"UNICODE\",\n                \"_UNICODE\"\n            ],\n            \"windowsSdkVersion\": \"10.0.18362.0\",\n            \"compilerPath\": \"C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe\",\n            \"cStandard\": \"c11\",\n            \"cppStandard\": \"c++17\",\n            \"intelliSenseMode\": \"msvc-x64\"\n        },\n        {\n            \"name\": \"Android\",\n            \"includePath\": [\n                \"C:/Users/ekibun/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\"\n            ],\n            \"defines\": [\n                \"__ANDROID__\",\n                \"__LINUX__\"\n            ],\n            \"windowsSdkVersion\": \"10.0.18362.0\",\n            \"compilerPath\": \"C:/Users/ekibun/AppData/Local/Android/Sdk/cmake/3.10.2.4988404/bin/cmake.exe\",\n            \"cStandard\": \"c11\",\n            \"cppStandard\": \"c++17\",\n            \"intelliSenseMode\": \"gcc-x64\"\n        },\n        {\n            \"name\": \"Linux\",\n            \"includePath\": [\n                \"${workspaceFolder}/linux/**\",\n                \"${workspaceFolder}/example/linux/**\",\n                \"/usr/include/**\"\n            ],\n            \"defines\": [\n                \"__LINUX__\"\n            ],\n            \"windowsSdkVersion\": \"10.0.18362.0\",\n            \"compilerPath\": \"/usr/bin/clang++\",\n            \"cStandard\": \"c11\",\n            \"cppStandard\": \"c++17\",\n            \"intelliSenseMode\": \"gcc-x64\"\n        }\n    ],\n    \"version\": 4\n}"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n  // 使用 IntelliSense 了解相关属性。 \n  // 悬停以查看现有属性的描述。\n  // 欲了解更多信息，请访问: https://go.microsoft.com/fwlink/?linkid=830387\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"Flutter: Run all Tests\",\n      \"type\": \"dart\",\n      \"request\": \"launch\",\n      \"program\": \"./test/\"\n    },\n    {\n      \"name\": \"(Windows) 启动\",\n      \"type\": \"cppvsdbg\",\n      \"request\": \"launch\",\n      \"program\": \"${workspaceFolder}/example/build/windows/runner/Debug/example.exe\",\n      \"args\": [],\n      \"stopAtEntry\": false,\n      \"cwd\": \"${workspaceFolder}\",\n      \"environment\": [],\n      \"externalConsole\": false\n    },\n    {\n      \"name\": \"Flutter\",\n      \"program\": \"example/lib/main.dart\",\n      \"request\": \"launch\",\n      \"type\": \"dart\"\n    }\n  ]\n}"
  },
  {
    "path": "CHANGELOG.md",
    "content": "<!--\n * @Description: \n * @Author: ekibun\n * @Date: 2020-08-08 08:16:50\n * @LastEditors: ekibun\n * @LastEditTime: 2020-12-02 11:36:40\n-->\n\n## 0.3.7\n\n* add timeout and memory limit\n* fixed compiler error in windows release\n* fixed crash when encoding Error object\n* updated to latest quickjs\n\n## 0.3.6\n\n* upgrade ffi to 1.0.0.\n* nullsafety.\n\n## 0.3.5\n\n* downgrade ffi to 0.1.3.\n\n## 0.3.4\n\n* upgrade ffi to 1.0.0.\n\n## 0.3.3\n\n* remove `JSInvokable.call`.\n* fix crash when throw error.\n* add reference count and leak detection.\n\n## 0.3.2\n\n* fix Promise reject cannot get Exception string.\n* wrap JSError.\n\n## 0.3.1\n\n* code clean up.\n* fix isolate wrap error.\n\n## 0.3.0\n\n* breakdown change to remove `channel`.\n* convert dart function to js.\n\n## 0.2.7\n\n* fix error in ios build.\n\n## 0.2.6\n\n* fix stack overflow in jsToCString.\n\n## 0.2.5\n\n* remove dart object when jsfree.\n\n## 0.2.4\n\n* wrap dart object to js.\n* fix stack overflow when use jsCall nesting.\n\n## 0.2.3\n\n* fix compiler error in windows release.\n\n## 0.2.2\n\n* add option to change max stack size.\n\n## 0.2.1\n\n* code cleanup.\n\n## 0.2.0\n\n* breakdown change with new constructor.\n* fix make release in ios.\n* fix crash in wrapping js Promise.\n\n## 0.1.4\n\n* fix crash on android x86.\n\n## 0.1.3\n\n* fix randomly crash by stack overflow.\n\n## 0.1.2\n\n* fix qjs memory leak.\n\n## 0.1.1\n\n* run on isolate.\n\n## 0.1.0\n\n* refactor with ffi.\n\n## 0.0.6\n\n* remove handler when destroy.\n\n## 0.0.5\n\n* add js module.\n\n## 0.0.4\n\n* remove C++ std limitation for linux and android.\n\n## 0.0.3\n\n* fix js memory leak.\n\n## 0.0.2\n\n* update example.\n\n## 0.0.1\n\n* initial publish.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019 https://github.com/czy0729\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."
  },
  {
    "path": "README-CN.md",
    "content": "<!--\n * @Description: \n * @Author: ekibun\n * @Date: 2020-08-08 08:16:50\n * @LastEditors: ekibun\n * @LastEditTime: 2020-10-03 00:44:41\n-->\n# flutter_qjs\n\n![Pub](https://img.shields.io/pub/v/flutter_qjs.svg)\n![Test](https://github.com/ekibun/flutter_qjs/workflows/Test/badge.svg)\n\n[English](README.md) | [中文](README-CN.md)\n\n一个为flutter开发的 `quickjs` 引擎。插件基于 `dart:ffi`，支持除Web以外的所有平台！\n\n## 基本使用\n\n首先，创建 `FlutterQjs` 对象。调用 `dispatch` 建立事件循环：\n\n```dart\nfinal engine = FlutterQjs(\n  stackSize: 1024 * 1024, // change stack size here.\n);\nengine.dispatch();\n```\n\n使用 `evaluate` 方法运行js脚本，方法同步执行，使用 `await` 来获得 `Promise` 结果：\n\n```dart\ntry {\n  print(engine.evaluate(code ?? ''));\n} catch (e) {\n  print(e.toString());\n}\n```\n\n使用 `close` 方法销毁 quickjs 实例，其在再次调用 `evaluate` 时将会重建。当不再需要 `FlutterQjs` 对象时，关闭 `port` 参数来结束事件循环。**在 v0.3.3 后增加了引用检查，可能会抛出异常**。\n\n```dart\ntry {\n  engine.port.close(); // stop dispatch loop\n  engine.close();      // close engine\n} on JSError catch(e) { \n  print(e);            // catch reference leak exception\n}\nengine = null;\n```\n\ndart 与 js 间数据以如下规则转换：\n\n| dart                         | js         |\n| ---------------------------- | ---------- |\n| Bool                         | boolean    |\n| Int                          | number     |\n| Double                       | number     |\n| String                       | string     |\n| Uint8List                    | ArrayBuffer|\n| List                         | Array      |\n| Map                          | Object     |\n| Function(arg1, arg2, ..., {thisVal})<br>JSInvokable.invoke(\\[arg1, arg2, ...\\], thisVal) | function.call(thisVal, arg1, arg2, ...) |\n| Future                       | Promise    |\n| JSError                      | Error      |\n| Object                       | DartObject |\n\n## 使用模块\n\n插件支持 ES6 模块方法 `import`。使用 `moduleHandler` 来处理模块请求：\n\n```dart\nfinal engine = FlutterQjs(\n  moduleHandler: (String module) {\n    if(module == \"hello\")\n      return \"export default (name) => `hello \\${name}!`;\";\n    throw Exception(\"Module Not found\");\n  },\n);\n```\n\n在JavaScript中，`import` 方法用以获取模块：\n\n```javascript\nimport(\"hello\").then(({default: greet}) => greet(\"world\"));\n```\n\n**注：** 模块将只被编译一次. 调用 `FlutterQjs.close` 再 `evaluate` 来重置模块缓存。\n\n若要使用异步方法来处理模块请求，请参见 [在 isolate 中运行](#在-isolate-中运行)。\n\n## 在 isolate 中运行\n\n创建 `IsolateQjs` 对象，设置 `moduleHandler` 来处理模块请求。 现在可以使用异步函数来获得模块字符串，如 `rootBundle.loadString`：\n\n```dart\nfinal engine = IsolateQjs(\n  moduleHandler: (String module) async {\n    return await rootBundle.loadString(\n        \"js/\" + module.replaceFirst(new RegExp(r\".js$\"), \"\") + \".js\");\n  },\n);\n// not need engine.dispatch();\n```\n\n与在主线程运行一样，使用 `evaluate` 方法运行js脚本。在isolate中，所有结果都将异步返回，使用 `await` 来获取结果：\n\n```dart\ntry {\n  print(await engine.evaluate(code ?? ''));\n} catch (e) {\n  print(e.toString());\n}\n```\n\n使用 `close` 方法销毁 isolate 线程，其在再次调用 `evaluate` 时将会重建。\n\n## 调用 Dart 函数\n\nJs脚本返回函数将被转换为 `JSInvokable`。 **它不能像 `Function` 一样调用，请使用 `invoke` 方法来调用**：\n\n```dart\n(func as JSInvokable).invoke([arg1, arg2], thisVal);\n```\n\n**注：** 返回 `JSInvokable` 可能造成引用泄漏，需要手动调用 `free` 来释放引用：\n\n```dart\n(obj as JSRef).free();\n// or JSRef.freeRecursive(obj);\n```\n\n传递给 `JSInvokable` 的参数将自动释放. 使用 `dup` 来保持引用：\n\n```dart\n(obj as JSRef).dup();\n// or JSRef.dupRecursive(obj);\n```\n\n自 v0.3.0 起，dart 函数可以作为参数传递给 `JSInvokable`，且 `channel` 函数不再默认内置。可以使用如下方法将 dart 函数赋值给全局，例如，使用 `Dio` 来为 qjs 提供 http 支持：\n\n```dart\nfinal setToGlobalObject = await engine.evaluate(\"(key, val) => { this[key] = val; }\");\nawait setToGlobalObject.invoke([\"http\", (String url) {\n  return Dio().get(url).then((response) => response.data);\n}]);\nsetToGlobalObject.free();\n```\n\n在 isolate 模式下，只有顶层和静态函数能作为参数传给 `JSInvokable`，函数将在 isolate 线程中调用。 使用 `IsolateFunction` 来传递局部函数（将在主线程中调用）：\n\n```dart\nawait setToGlobalObject.invoke([\n  \"http\",\n  IsolateFunction((String url) {\n    return Dio().get(url).then((response) => response.data);\n  }),\n]);\n```"
  },
  {
    "path": "README.md",
    "content": "<!--\n * @Description: \n * @Author: ekibun\n * @Date: 2020-08-08 08:16:50\n * @LastEditors: ekibun\n * @LastEditTime: 2020-10-03 00:44:41\n-->\n# flutter_qjs\n\n![Pub](https://img.shields.io/pub/v/flutter_qjs.svg)\n![Test](https://github.com/ekibun/flutter_qjs/workflows/Test/badge.svg)\n\n[English](README.md) | [中文](README-CN.md)\n\nThis plugin is a simple js engine for flutter using the `quickjs` project with `dart:ffi`. Plugin currently supports all the platforms except web!\n\n## Getting Started\n\n### Basic usage\n\nFirstly, create a `FlutterQjs` object, then call `dispatch` to establish event loop:\n\n```dart\nfinal engine = FlutterQjs(\n  stackSize: 1024 * 1024, // change stack size here.\n);\nengine.dispatch();\n```\n\nUse `evaluate` method to run js script, it runs synchronously, you can use await to resolve `Promise`:\n\n```dart\ntry {\n  print(engine.evaluate(code ?? ''));\n} catch (e) {\n  print(e.toString());\n}\n```\n\nMethod `close` can destroy quickjs runtime that can be recreated again if you call `evaluate`. Parameter `port` should be close to stop `dispatch` loop when you do not need it. **Reference leak exception will be thrown since v0.3.3**\n\n```dart\ntry {\n  engine.port.close(); // stop dispatch loop\n  engine.close();      // close engine\n} on JSError catch(e) { \n  print(e);            // catch reference leak exception\n}\nengine = null;\n```\n\nData conversion between dart and js are implemented as follow:\n\n| dart                         | js         |\n| ---------------------------- | ---------- |\n| Bool                         | boolean    |\n| Int                          | number     |\n| Double                       | number     |\n| String                       | string     |\n| Uint8List                    | ArrayBuffer|\n| List                         | Array      |\n| Map                          | Object     |\n| Function(arg1, arg2, ..., {thisVal})<br>JSInvokable.invoke(\\[arg1, arg2, ...\\], thisVal) | function.call(thisVal, arg1, arg2, ...) |\n| Future                       | Promise    |\n| JSError                      | Error      |\n| Object                       | DartObject |\n\n## Use Modules\n\nES6 module with `import` function is supported and can be managed in dart with `moduleHandler`:\n\n```dart\nfinal engine = FlutterQjs(\n  moduleHandler: (String module) {\n    if(module == \"hello\")\n      return \"export default (name) => `hello \\${name}!`;\";\n    throw Exception(\"Module Not found\");\n  },\n);\n```\n\nthen in JavaScript, `import` function is used to get modules:\n\n```javascript\nimport(\"hello\").then(({default: greet}) => greet(\"world\"));\n```\n\n**notice:** Module handler should be called only once for each module name. To reset the module cache, call `FlutterQjs.close` then `evaluate` again.\n\nTo use async function in module handler, try [run on isolate thread](#Run-on-Isolate-Thread)\n## Run on Isolate Thread\n\nCreate a `IsolateQjs` object, pass handlers to resolving modules. Async function such as `rootBundle.loadString` can be used now to get modules:\n\n```dart\nfinal engine = IsolateQjs(\n  moduleHandler: (String module) async {\n    return await rootBundle.loadString(\n        \"js/\" + module.replaceFirst(new RegExp(r\".js$\"), \"\") + \".js\");\n  },\n);\n// not need engine.dispatch();\n```\n\nSame as run on main thread, use `evaluate` to run js script. In isolate, everything returns asynchronously, use `await` to get the result:\n\n```dart\ntry {\n  print(await engine.evaluate(code ?? ''));\n} catch (e) {\n  print(e.toString());\n}\n```\n\nMethod `close` can destroy isolate thread that will be recreated again if you call `evaluate`.\n\n## Use Dart Function (Breaking change in v0.3.0)\n\nJs script returning function will be converted to `JSInvokable`. **It does not extend `Function`, use `invoke` method to invoke it**:\n\n```dart\n(func as JSInvokable).invoke([arg1, arg2], thisVal);\n```\n\n**notice:** evaluation returning `JSInvokable` may cause reference leak.\nYou should manually call `free` to release JS reference.\n\n```dart\n(obj as JSRef).free();\n// or JSRef.freeRecursive(obj);\n```\n\nArguments passed into `JSInvokable` will be freed automatically. Use `dup` to keep the reference.\n\n```dart\n(obj as JSRef).dup();\n// or JSRef.dupRecursive(obj);\n```\n\nSince v0.3.0, you can pass a function to `JSInvokable` arguments, and `channel` function is no longer included by default. You can use js function to set dart object globally.\nFor example, use `Dio` to implement http in qjs:\n\n```dart\nfinal setToGlobalObject = await engine.evaluate(\"(key, val) => { this[key] = val; }\");\nawait setToGlobalObject.invoke([\"http\", (String url) {\n  return Dio().get(url).then((response) => response.data);\n}]);\nsetToGlobalObject.free();\n```\n\nIn isolate, top level function passed in `JSInvokable` will be invoked in isolate thread. Use `IsolateFunction` to pass a instant function:\n\n```dart\nawait setToGlobalObject.invoke([\n  \"http\",\n  IsolateFunction((String url) {\n    return Dio().get(url).then((response) => response.data);\n  }),\n]);\n```"
  },
  {
    "path": "android/.classpath",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<classpath>\r\n\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/\"/>\r\n\t<classpathentry kind=\"con\" path=\"org.eclipse.buildship.core.gradleclasspathcontainer\"/>\r\n\t<classpathentry kind=\"output\" path=\"bin/default\"/>\r\n</classpath>\r\n"
  },
  {
    "path": "android/.gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n/.cxx\n"
  },
  {
    "path": "android/.project",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<projectDescription>\r\n\t<name>flutter_qjs</name>\r\n\t<comment>Project android created by Buildship.</comment>\r\n\t<projects>\r\n\t</projects>\r\n\t<buildSpec>\r\n\t\t<buildCommand>\r\n\t\t\t<name>org.eclipse.jdt.core.javabuilder</name>\r\n\t\t\t<arguments>\r\n\t\t\t</arguments>\r\n\t\t</buildCommand>\r\n\t\t<buildCommand>\r\n\t\t\t<name>org.eclipse.buildship.core.gradleprojectbuilder</name>\r\n\t\t\t<arguments>\r\n\t\t\t</arguments>\r\n\t\t</buildCommand>\r\n\t</buildSpec>\r\n\t<natures>\r\n\t\t<nature>org.eclipse.jdt.core.javanature</nature>\r\n\t\t<nature>org.eclipse.buildship.core.gradleprojectnature</nature>\r\n\t</natures>\r\n</projectDescription>\r\n"
  },
  {
    "path": "android/.settings/org.eclipse.buildship.core.prefs",
    "content": "arguments=\nauto.sync=false\nbuild.scans.enabled=false\nconnection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3))\nconnection.project.dir=\neclipse.preferences.version=1\ngradle.user.home=\njava.home=C\\:/Program Files/JetBrains/IntelliJ IDEA Community Edition 2019.3.2/jbr\njvm.arguments=\noffline.mode=false\noverride.workspace.settings=true\nshow.console.view=true\nshow.executions.view=true\n"
  },
  {
    "path": "android/build.gradle",
    "content": "group 'soko.ekibun.flutter_qjs'\nversion '1.0-SNAPSHOT'\n\nbuildscript {\n    ext.kotlin_version = '1.3.50'\n    repositories {\n        google()\n        jcenter()\n    }\n\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.5.0'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n    }\n}\n\nrootProject.allprojects {\n    repositories {\n        google()\n        jcenter()\n        maven { url 'https://jitpack.io' }\n    }\n}\n\napply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\n\nandroid {\n    compileSdkVersion 28\n\n    sourceSets {\n        main.java.srcDirs += 'src/main/kotlin'\n    }\n    defaultConfig {\n        minSdkVersion 16\n    }\n    lintOptions {\n        disable 'InvalidPackage'\n    }\n    kotlinOptions {\n        jvmTarget = \"1.8\"\n    }\n    externalNativeBuild {\n        cmake {\n            path \"src/main/cxx/CMakeLists.txt\"\n            version \"3.10.2\"\n        }\n    }\n}\n\ndependencies {\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n    // implementation 'com.github.abner.oasis-jsbridge-android:oasis-jsbridge-quickjs:0.11.0'\n}\n"
  },
  {
    "path": "android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-5.6.2-all.zip\n"
  },
  {
    "path": "android/gradle.properties",
    "content": "org.gradle.jvmargs=-Xmx1536M\nandroid.enableR8=true\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "android/settings.gradle",
    "content": "rootProject.name = 'flutter_qjs'\n"
  },
  {
    "path": "android/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  package=\"soko.ekibun.flutter_qjs\">\n</manifest>\n"
  },
  {
    "path": "android/src/main/cxx/CMakeLists.txt",
    "content": "# For more information about using CMake with Android Studio, read the\n# documentation: https://d.android.com/studio/projects/add-native-code.html\n\n# Sets the minimum version of CMake required to build the native library.\n\ncmake_minimum_required(VERSION 3.4.1)\nset(JNI_LIB_NAME qjs)\n\n# Creates and names a library, sets it as either STATIC\n# or SHARED, and provides the relative paths to its source code.\n# You can define multiple libraries, and CMake builds them for you.\n# Gradle automatically packages shared libraries with your APK.\n\ninclude(\"${CMAKE_CURRENT_SOURCE_DIR}/../../../../cxx/quickjs.cmake\")\n\nadd_library( # Sets the name of the library.\n             ${JNI_LIB_NAME}\n\n             # Sets the library as a shared library.\n             SHARED\n\n             # Provides a relative path to your source file(s).\n             ${CXX_LIB_DIR}/ffi.cpp )\n\n# Searches for a specified prebuilt library and stores the path as a\n# variable. Because CMake includes system libraries in the search path by\n# default, you only need to specify the name of the public NDK library\n# you want to add. CMake verifies that the library exists before\n# completing its build.\n\nfind_library( # Sets the name of the path variable.\n              log-lib\n\n              # Specifies the name of the NDK library that\n              # you want CMake to locate.\n              log )\n\n# Specifies libraries CMake should link to your target library. You\n# can link multiple libraries, such as libraries you define in this\n# build script, prebuilt third-party libraries, or system libraries.\n\ntarget_link_libraries( # Specifies the target library.\n                       ${JNI_LIB_NAME}\n                       quickjs\n                       # Links the target library to the log library\n                       # included in the NDK.\n                       ${log-lib} )"
  },
  {
    "path": "android/src/main/kotlin/soko/ekibun/flutter_qjs/FlutterQjsPlugin.kt",
    "content": "package soko.ekibun.flutter_qjs\n\nimport android.os.Handler\nimport io.flutter.embedding.engine.plugins.FlutterPlugin\n\n/** FlutterQjsPlugin */\nclass FlutterQjsPlugin: FlutterPlugin {\n  /// The MethodChannel that will the communication between Flutter and native Android\n  ///\n  /// This local reference serves to register the plugin with the Flutter Engine and unregister it\n  /// when the Flutter Engine is detached from the Activity\n  override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {\n  }\n\n  override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {\n  }\n}\n"
  },
  {
    "path": "coverage/lcov.info",
    "content": "SF:lib\\src\\wrapper.dart\nDA:10,3\nDA:11,6\nDA:14,3\nDA:18,3\nDA:22,3\nDA:29,3\nDA:30,6\nDA:31,6\nDA:35,3\nDA:38,6\nDA:39,3\nDA:42,3\nDA:48,3\nDA:49,6\nDA:50,6\nDA:51,6\nDA:52,3\nDA:56,3\nDA:58,6\nDA:59,3\nDA:60,3\nDA:61,3\nDA:62,6\nDA:63,3\nDA:64,6\nDA:65,6\nDA:68,12\nDA:69,3\nDA:70,9\nDA:72,12\nDA:73,6\nDA:74,3\nDA:75,3\nDA:76,3\nDA:77,3\nDA:78,3\nDA:79,3\nDA:80,3\nDA:81,3\nDA:82,3\nDA:83,6\nDA:84,6\nDA:85,3\nDA:86,6\nDA:87,6\nDA:88,3\nDA:89,3\nDA:93,3\nDA:94,9\nDA:95,9\nDA:96,9\nDA:97,6\nDA:98,3\nDA:99,0\nDA:100,0\nDA:101,0\nDA:102,0\nDA:103,0\nDA:106,3\nDA:107,9\nDA:109,3\nDA:110,6\nDA:111,3\nDA:112,9\nDA:113,6\nDA:117,3\nDA:118,6\nDA:119,3\nDA:120,6\nDA:121,9\nDA:126,3\nDA:128,15\nDA:129,3\nDA:130,6\nDA:133,6\nDA:135,3\nDA:136,6\nDA:137,3\nDA:143,3\nDA:145,3\nDA:146,6\nDA:147,9\nDA:148,6\nDA:151,3\nDA:152,9\nDA:153,3\nDA:154,6\nDA:155,3\nDA:156,3\nDA:157,3\nDA:158,6\nDA:159,9\nDA:161,3\nDA:162,6\nDA:163,3\nDA:166,6\nDA:168,3\nDA:169,6\nDA:170,0\nDA:172,6\nDA:173,3\nDA:174,3\nDA:176,9\nDA:177,3\nDA:178,9\nDA:179,3\nDA:180,3\nDA:182,12\nDA:183,3\nDA:184,3\nDA:185,9\nDA:186,3\nDA:188,3\nDA:189,3\nDA:190,3\nDA:191,9\nDA:192,3\nDA:193,6\nDA:194,3\nDA:195,3\nDA:196,6\nDA:198,3\nDA:199,3\nDA:200,6\nDA:203,3\nDA:204,3\nDA:205,9\nDA:206,3\nDA:207,0\nDA:208,3\nDA:209,9\nDA:210,3\nDA:211,6\nDA:212,3\nDA:213,3\nDA:214,6\nDA:215,3\nDA:216,6\nDA:217,3\nDA:223,12\nDA:224,0\nDA:225,0\nDA:228,3\nDA:229,3\nDA:230,3\nDA:231,3\nDA:232,6\nDA:233,9\nDA:234,6\nDA:235,6\nDA:236,6\nDA:237,3\nDA:238,3\nDA:239,3\nDA:240,6\nDA:242,9\nDA:243,3\nLF:157\nLH:148\nend_of_record\nSF:lib\\src\\engine.dart\nDA:39,3\nDA:47,3\nDA:48,3\nDA:49,6\nDA:52,3\nDA:53,3\nDA:54,9\nDA:55,3\nDA:56,6\nDA:57,6\nDA:59,3\nDA:60,15\nDA:64,3\nDA:66,3\nDA:68,3\nDA:70,3\nDA:72,6\nDA:74,3\nDA:75,3\nDA:76,6\nDA:77,6\nDA:78,3\nDA:79,6\nDA:80,3\nDA:82,3\nDA:83,3\nDA:84,3\nDA:85,3\nDA:86,6\nDA:88,0\nDA:90,3\nDA:91,3\nDA:92,3\nDA:93,9\nDA:94,3\nDA:96,0\nDA:98,0\nDA:99,0\nDA:100,0\nDA:102,0\nDA:103,0\nDA:104,0\nDA:106,0\nDA:107,0\nDA:108,0\nDA:109,0\nDA:110,0\nDA:111,0\nDA:115,6\nDA:116,3\nDA:117,3\nDA:118,3\nDA:119,9\nDA:120,3\nDA:121,6\nDA:125,3\nDA:126,3\nDA:127,3\nDA:128,3\nDA:129,3\nDA:130,6\nDA:132,3\nDA:134,3\nDA:135,3\nDA:136,3\nDA:140,3\nDA:141,3\nDA:142,3\nDA:145,6\nDA:146,3\nDA:147,3\nDA:154,3\nDA:155,9\nDA:156,3\nDA:161,3\nDA:166,3\nDA:167,3\nDA:168,3\nDA:174,9\nDA:175,3\nDA:176,3\nDA:178,3\nDA:179,3\nLF:83\nLH:69\nend_of_record\nSF:lib\\src\\isolate.dart\nDA:11,9\nDA:20,3\nDA:21,3\nDA:22,6\nDA:23,6\nDA:24,0\nDA:25,6\nDA:26,3\nDA:27,3\nDA:28,3\nDA:29,9\nDA:30,9\nDA:34,3\nDA:35,3\nDA:36,3\nDA:37,6\nDA:38,9\nDA:39,6\nDA:43,3\nDA:44,3\nDA:45,6\nDA:46,9\nDA:47,3\nDA:48,6\nDA:50,3\nDA:51,9\nDA:52,3\nDA:53,9\nDA:56,3\nDA:57,3\nDA:63,3\nDA:64,3\nDA:65,6\nDA:66,3\nDA:67,3\nDA:68,3\nDA:69,9\nDA:70,9\nDA:74,3\nDA:75,6\nDA:76,3\nDA:79,3\nDA:80,3\nDA:81,3\nDA:82,6\nDA:83,3\nDA:84,9\nDA:85,9\nDA:86,3\nDA:87,6\nDA:88,9\nDA:90,6\nDA:93,3\nDA:95,3\nDA:96,3\nDA:97,6\nDA:98,9\nDA:99,6\nDA:106,3\nDA:107,3\nDA:108,3\nDA:109,6\nDA:110,3\nDA:111,3\nDA:112,3\nDA:113,3\nDA:114,3\nDA:115,6\nDA:117,3\nDA:120,3\nDA:122,9\nDA:123,6\nDA:126,3\nDA:128,18\nDA:129,3\nDA:130,3\nDA:131,9\nDA:132,3\nDA:133,3\nDA:137,6\nDA:139,3\nDA:141,3\nDA:142,3\nDA:143,6\nDA:144,3\nDA:145,3\nDA:146,3\nDA:149,3\nDA:151,6\nDA:152,3\nDA:153,3\nDA:157,6\nDA:160,0\nDA:161,0\nDA:165,6\nDA:192,3\nDA:200,3\nDA:201,3\nDA:202,3\nDA:203,3\nDA:205,3\nDA:206,3\nDA:207,3\nDA:208,3\nDA:209,3\nDA:213,3\nDA:214,6\nDA:215,6\nDA:216,3\nDA:219,3\nDA:220,3\nDA:222,6\nDA:223,3\nDA:224,6\nDA:226,0\nDA:229,0\nDA:232,3\nDA:233,6\nDA:235,18\nDA:237,0\nDA:241,0\nDA:242,0\nDA:243,0\nDA:244,0\nDA:246,6\nDA:250,3\nDA:251,3\nDA:252,3\nDA:254,6\nDA:255,3\nDA:256,6\nDA:258,3\nDA:260,6\nDA:261,3\nDA:262,3\nDA:263,0\nDA:264,3\nDA:270,3\nDA:275,3\nDA:276,3\nDA:277,6\nDA:278,6\nDA:283,3\nDA:285,6\nDA:286,3\nDA:287,6\nDA:288,0\nDA:289,3\nLF:148\nLH:136\nend_of_record\nSF:lib\\src\\object.dart\nDA:14,3\nDA:15,3\nDA:17,3\nDA:18,3\nDA:25,3\nDA:27,3\nDA:31,15\nDA:33,9\nDA:34,3\nDA:35,3\nDA:39,0\nDA:41,0\nDA:44,0\nDA:53,3\nDA:54,3\nDA:55,3\nDA:56,6\nDA:57,15\nDA:60,3\nDA:61,18\nDA:65,0\nDA:67,0\nDA:68,0\nDA:71,3\nDA:73,3\nDA:74,3\nDA:75,3\nDA:76,3\nDA:78,15\nDA:79,6\nDA:87,3\nDA:88,3\nDA:89,0\nDA:90,0\nDA:92,6\nDA:93,9\nDA:97,0\nDA:99,0\nDA:102,3\nDA:103,3\nDA:104,9\nDA:108,3\nDA:110,3\nDA:111,3\nDA:112,3\nDA:124,3\nDA:125,3\nDA:126,6\nDA:127,9\nDA:128,9\nDA:131,3\nDA:133,3\nDA:134,3\nDA:135,3\nDA:136,3\nDA:138,6\nDA:139,9\nDA:140,3\nDA:143,3\nDA:145,6\nDA:146,9\nDA:152,6\nDA:154,3\nDA:156,3\nDA:157,3\nDA:158,9\nDA:160,0\nDA:161,0\nDA:163,3\nDA:164,3\nDA:168,3\nDA:169,3\nDA:170,3\nDA:172,0\nDA:174,3\nDA:175,6\nDA:177,3\nDA:178,3\nDA:179,3\nDA:180,3\nDA:181,6\nDA:182,3\nDA:187,3\nDA:189,6\nDA:198,3\nDA:200,3\nDA:201,6\nDA:203,9\nDA:206,6\nDA:208,3\nDA:210,3\nDA:211,6\nDA:212,3\nDA:214,6\nDA:215,12\nDA:217,0\nDA:218,12\nDA:219,3\nDA:221,0\nDA:223,0\nDA:229,3\nDA:232,3\nDA:233,3\nDA:234,3\nDA:235,3\nDA:236,6\nDA:237,3\nDA:239,3\nDA:241,6\nDA:242,6\nDA:243,0\nDA:244,3\nDA:247,3\nDA:248,6\nDA:249,6\nDA:250,3\nDA:253,3\nDA:255,3\nDA:256,6\nDA:258,3\nDA:259,6\nDA:260,9\nDA:262,3\nDA:263,0\nDA:266,6\nDA:267,6\nDA:268,6\nDA:272,3\nDA:273,3\nDA:274,3\nDA:275,6\nDA:281,3\nDA:282,3\nDA:283,3\nDA:284,3\nDA:285,3\nDA:290,3\nDA:292,3\nDA:293,6\nDA:294,6\nDA:300,3\nDA:302,3\nDA:305,3\nDA:307,3\nDA:310,0\nDA:312,0\nLF:146\nLH:126\nend_of_record\nSF:lib\\src\\ffi.dart\nDA:14,3\nDA:16,3\nDA:17,3\nDA:25,3\nDA:26,6\nDA:29,3\nDA:30,6\nDA:31,9\nDA:36,3\nDA:37,9\nDA:40,3\nDA:41,9\nDA:44,3\nDA:51,3\nDA:52,3\nDA:53,3\nDA:54,12\nDA:56,3\nDA:57,3\nDA:58,15\nDA:60,3\nDA:61,3\nDA:116,15\nDA:117,3\nDA:118,3\nDA:119,0\nDA:120,0\nDA:121,0\nDA:122,0\nDA:123,0\nDA:124,0\nDA:125,0\nDA:126,0\nDA:132,0\nDA:133,0\nDA:142,0\nDA:143,0\nDA:147,9\nDA:148,3\nDA:160,9\nDA:161,3\nDA:174,3\nDA:176,6\nDA:178,9\nDA:180,9\nDA:182,3\nDA:183,6\nDA:187,9\nDA:189,3\nDA:194,3\nDA:195,3\nDA:196,6\nDA:197,12\nDA:200,3\nDA:205,6\nDA:206,9\nDA:214,0\nDA:215,0\nDA:227,9\nDA:228,3\nDA:239,9\nDA:240,3\nDA:247,3\nDA:250,3\nDA:251,6\nDA:254,12\nDA:256,3\nDA:257,12\nDA:259,6\nDA:260,6\nDA:261,6\nDA:262,12\nDA:263,3\nDA:264,18\nDA:265,3\nDA:268,6\nDA:269,6\nDA:270,3\nDA:271,3\nDA:279,9\nDA:280,3\nDA:291,9\nDA:292,3\nDA:299,3\nDA:300,6\nDA:301,6\nDA:302,6\nDA:303,0\nDA:304,6\nDA:311,9\nDA:312,3\nDA:322,9\nDA:323,3\nDA:337,9\nDA:338,3\nDA:349,3\nDA:355,3\nDA:356,3\nDA:357,6\nDA:360,3\nDA:364,3\nDA:365,3\nDA:366,21\nDA:373,9\nDA:374,3\nDA:384,9\nDA:385,3\nDA:395,9\nDA:396,3\nDA:407,9\nDA:408,3\nDA:420,9\nDA:421,3\nDA:433,9\nDA:434,3\nDA:446,9\nDA:447,3\nDA:455,3\nDA:459,3\nDA:460,6\nDA:461,3\nDA:470,0\nDA:471,0\nDA:483,9\nDA:484,3\nDA:494,9\nDA:495,3\nDA:507,9\nDA:508,3\nDA:517,3\nDA:522,6\nDA:530,0\nDA:531,0\nDA:540,0\nDA:545,0\nDA:552,9\nDA:553,3\nDA:565,0\nDA:566,0\nDA:578,9\nDA:579,3\nDA:591,9\nDA:592,3\nDA:604,9\nDA:605,3\nDA:617,9\nDA:618,3\nDA:630,9\nDA:631,3\nDA:639,3\nDA:643,6\nDA:644,6\nDA:645,3\nDA:646,6\nDA:654,9\nDA:655,3\nDA:663,3\nDA:667,3\nDA:668,6\nDA:672,3\nDA:681,9\nDA:682,3\nDA:695,9\nDA:696,3\nDA:709,9\nDA:710,3\nDA:723,9\nDA:724,3\nDA:736,9\nDA:737,3\nDA:749,9\nDA:750,3\nDA:762,9\nDA:763,3\nDA:774,9\nDA:775,3\nDA:788,9\nDA:789,3\nDA:806,9\nDA:807,3\nDA:822,9\nDA:823,3\nDA:835,9\nDA:836,3\nDA:848,9\nDA:849,3\nDA:865,9\nDA:866,3\nDA:881,9\nDA:882,3\nDA:891,9\nDA:892,3\nDA:895,12\nDA:902,9\nDA:903,3\nDA:920,9\nDA:921,3\nDA:932,3\nDA:939,15\nDA:940,3\nDA:941,9\nDA:942,3\nDA:943,6\nDA:945,6\nDA:947,9\nDA:948,3\nDA:949,3\nDA:950,21\nDA:957,9\nDA:958,3\nDA:968,9\nDA:969,3\nDA:979,9\nDA:980,3\nDA:991,9\nDA:992,3\nDA:1004,9\nDA:1005,3\nLF:218\nLH:195\nend_of_record\n"
  },
  {
    "path": "cxx/ffi.cpp",
    "content": "/*\n * @Description:\n * @Author: ekibun\n * @Date: 2020-09-06 18:32:45\n * @LastEditors: ekibun\n * @LastEditTime: 2020-12-02 11:11:42\n */\n#include \"ffi.h\"\n#include <functional>\n#include <future>\n#include <string.h>\n\nextern \"C\"\n{\n\n  DLLEXPORT JSValue *jsThrow(JSContext *ctx, JSValue *obj)\n  {\n    return new JSValue(JS_Throw(ctx, JS_DupValue(ctx, *obj)));\n  }\n\n  DLLEXPORT JSValue *jsEXCEPTION()\n  {\n    return new JSValue(JS_EXCEPTION);\n  }\n\n  DLLEXPORT JSValue *jsUNDEFINED()\n  {\n    return new JSValue(JS_UNDEFINED);\n  }\n\n  DLLEXPORT JSValue *jsNULL()\n  {\n    return new JSValue(JS_NULL);\n  }\n\n  struct RuntimeOpaque {\n      JSChannel * channel;\n      int64_t timeout;\n      int64_t start;\n  };\n\n  JSModuleDef *js_module_loader(\n      JSContext *ctx,\n      const char *module_name, void *opaque)\n  {\n    const char *str = (char *)((RuntimeOpaque *)opaque)->channel(ctx, JSChannelType_MODULE, (void *)module_name);\n    if (str == 0)\n      return NULL;\n    JSValue func_val = JS_Eval(ctx, str, strlen(str), module_name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY);\n    if (JS_IsException(func_val))\n      return NULL;\n    /* the module is already referenced, so we must free it */\n    JSModuleDef *m = (JSModuleDef *)JS_VALUE_GET_PTR(func_val);\n    JS_FreeValue(ctx, func_val);\n    return m;\n  }\n\n  JSValue js_channel(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic, JSValue *func_data)\n  {\n    JSRuntime *rt = JS_GetRuntime(ctx);\n    RuntimeOpaque *opaque = (RuntimeOpaque *)JS_GetRuntimeOpaque(rt);\n    void *data[4];\n    data[0] = &this_val;\n    data[1] = &argc;\n    data[2] = argv;\n    data[3] = func_data;\n    return *(JSValue *)opaque->channel(ctx, JSChannelType_METHON, data);\n  }\n\n  void js_promise_rejection_tracker(JSContext *ctx, JSValueConst promise,\n                                    JSValueConst reason,\n                                    JS_BOOL is_handled, void *opaque)\n  {\n    if (is_handled)\n      return;\n    ((RuntimeOpaque *)opaque)->channel(ctx, JSChannelType_PROMISE_TRACK, &reason);\n  }\n\n  int js_interrupt_handler(JSRuntime * rt, void * opaque) {\n    RuntimeOpaque *op = (RuntimeOpaque *)opaque;\n    if(op->timeout && op->start && (clock() - op->start) > op->timeout * CLOCKS_PER_SEC / 1000) {\n      op->start = 0;\n      return 1;\n    }\n    return 0;\n  }\n\n  DLLEXPORT JSRuntime *jsNewRuntime(JSChannel channel, int64_t timeout)\n  {\n    JSRuntime *rt = JS_NewRuntime();\n    RuntimeOpaque *opaque = new RuntimeOpaque({channel, timeout, 0});\n    JS_SetRuntimeOpaque(rt, opaque);\n    JS_SetHostPromiseRejectionTracker(rt, js_promise_rejection_tracker, opaque);\n    JS_SetModuleLoaderFunc(rt, nullptr, js_module_loader, opaque);\n    JS_SetInterruptHandler(rt, js_interrupt_handler, opaque);\n    return rt;\n  }\n\n  DLLEXPORT uint32_t jsNewClass(JSContext *ctx, const char *name)\n  {\n    JSClassID QJSClassId = 0;\n    JS_NewClassID(&QJSClassId);\n    JSRuntime *rt = JS_GetRuntime(ctx);\n    if (!JS_IsRegisteredClass(rt, QJSClassId))\n    {\n      JSClassDef def{\n          name,\n          // destructor\n          [](JSRuntime *rt, JSValue obj) noexcept\n          {\n            JSClassID classid = JS_GetClassID(obj);\n            void *opaque = JS_GetOpaque(obj, classid);\n            RuntimeOpaque *runtimeOpaque = (RuntimeOpaque *)JS_GetRuntimeOpaque(rt);\n            if (runtimeOpaque == nullptr)\n              return;\n            runtimeOpaque->channel((JSContext *)rt, JSChannelType_FREE_OBJECT, opaque);\n          }};\n      int e = JS_NewClass(rt, QJSClassId, &def);\n      if (e < 0)\n      {\n        JS_ThrowInternalError(ctx, \"Cant register class %s\", name);\n        return 0;\n      }\n    }\n    return QJSClassId;\n  }\n\n  DLLEXPORT void *jsGetObjectOpaque(JSValue *obj, uint32_t classid)\n  {\n    return JS_GetOpaque(*obj, classid);\n  }\n\n  DLLEXPORT JSValue *jsNewObjectClass(JSContext *ctx, uint32_t QJSClassId, void *opaque)\n  {\n    auto jsobj = new JSValue(JS_NewObjectClass(ctx, QJSClassId));\n    if (JS_IsException(*jsobj))\n      return jsobj;\n    JS_SetOpaque(*jsobj, opaque);\n    return jsobj;\n  }\n\n  DLLEXPORT void jsSetMaxStackSize(JSRuntime *rt, size_t stack_size)\n  {\n    JS_SetMaxStackSize(rt, stack_size);\n  }\n\n  DLLEXPORT void jsSetMemoryLimit(JSRuntime *rt, size_t limit)\n  {\n    JS_SetMemoryLimit(rt, limit);\n  }\n\n  DLLEXPORT void jsFreeRuntime(JSRuntime *rt)\n  {\n    RuntimeOpaque *opauqe = (RuntimeOpaque *)JS_GetRuntimeOpaque(rt);\n    if (opauqe)\n      delete opauqe;\n    JS_SetRuntimeOpaque(rt, nullptr);\n    JS_FreeRuntime(rt);\n  }\n\n  DLLEXPORT JSValue *jsNewCFunction(JSContext *ctx, JSValue *funcData)\n  {\n    return new JSValue(JS_NewCFunctionData(ctx, js_channel, 0, 0, 1, funcData));\n  }\n\n  DLLEXPORT JSContext *jsNewContext(JSRuntime *rt)\n  {\n    JS_UpdateStackTop(rt);\n    JSContext *ctx = JS_NewContext(rt);\n    return ctx;\n  }\n\n  DLLEXPORT void jsFreeContext(JSContext *ctx)\n  {\n    JS_FreeContext(ctx);\n  }\n\n  DLLEXPORT JSRuntime *jsGetRuntime(JSContext *ctx)\n  {\n    return JS_GetRuntime(ctx);\n  }\n\n  void js_begin_call(JSRuntime *rt) {\n    JS_UpdateStackTop(rt);\n    RuntimeOpaque * opaque = (RuntimeOpaque *)JS_GetRuntimeOpaque(rt);\n    if(opaque) opaque->start = clock();\n  }\n\n  DLLEXPORT JSValue *jsEval(JSContext *ctx, const char *input, size_t input_len, const char *filename, int32_t eval_flags)\n  {\n    JSRuntime *rt = JS_GetRuntime(ctx);\n    js_begin_call(rt);\n    JSValue *ret = new JSValue(JS_Eval(ctx, input, input_len, filename, eval_flags));\n    return ret;\n  }\n\n  DLLEXPORT int32_t jsValueGetTag(JSValue *val)\n  {\n    return JS_VALUE_GET_TAG(*val);\n  }\n\n  DLLEXPORT void *jsValueGetPtr(JSValue *val)\n  {\n    return JS_VALUE_GET_PTR(*val);\n  }\n\n  DLLEXPORT int32_t jsTagIsFloat64(int32_t tag)\n  {\n    return JS_TAG_IS_FLOAT64(tag);\n  }\n\n  DLLEXPORT JSValue *jsNewBool(JSContext *ctx, int32_t val)\n  {\n    return new JSValue(JS_NewBool(ctx, val));\n  }\n\n  DLLEXPORT JSValue *jsNewInt64(JSContext *ctx, int64_t val)\n  {\n    return new JSValue(JS_NewInt64(ctx, val));\n  }\n\n  DLLEXPORT JSValue *jsNewFloat64(JSContext *ctx, double val)\n  {\n    return new JSValue(JS_NewFloat64(ctx, val));\n  }\n\n  DLLEXPORT JSValue *jsNewString(JSContext *ctx, const char *str)\n  {\n    return new JSValue(JS_NewString(ctx, str));\n  }\n\n  DLLEXPORT JSValue *jsNewArrayBufferCopy(JSContext *ctx, const uint8_t *buf, size_t len)\n  {\n    return new JSValue(JS_NewArrayBufferCopy(ctx, buf, len));\n  }\n\n  DLLEXPORT JSValue *jsNewArray(JSContext *ctx)\n  {\n    return new JSValue(JS_NewArray(ctx));\n  }\n\n  DLLEXPORT JSValue *jsNewObject(JSContext *ctx)\n  {\n    return new JSValue(JS_NewObject(ctx));\n  }\n\n  DLLEXPORT void jsFreeValue(JSContext *ctx, JSValue *v, int32_t free)\n  {\n    JS_FreeValue(ctx, *v);\n    if (free)\n      delete v;\n  }\n\n  DLLEXPORT void jsFreeValueRT(JSRuntime *rt, JSValue *v, int32_t free)\n  {\n    JS_FreeValueRT(rt, *v);\n    if (free)\n      delete v;\n  }\n\n  DLLEXPORT JSValue *jsDupValue(JSContext *ctx, JSValueConst *v)\n  {\n    return new JSValue(JS_DupValue(ctx, *v));\n  }\n\n  DLLEXPORT JSValue *jsDupValueRT(JSRuntime *rt, JSValue *v)\n  {\n    return new JSValue(JS_DupValueRT(rt, *v));\n  }\n\n  DLLEXPORT int32_t jsToBool(JSContext *ctx, JSValueConst *val)\n  {\n    return JS_ToBool(ctx, *val);\n  }\n\n  DLLEXPORT int64_t jsToInt64(JSContext *ctx, JSValueConst *val)\n  {\n    int64_t p;\n    JS_ToInt64(ctx, &p, *val);\n    return p;\n  }\n\n  DLLEXPORT double jsToFloat64(JSContext *ctx, JSValueConst *val)\n  {\n    double p;\n    JS_ToFloat64(ctx, &p, *val);\n    return p;\n  }\n\n  DLLEXPORT const char *jsToCString(JSContext *ctx, JSValueConst *val)\n  {\n    JSRuntime *rt = JS_GetRuntime(ctx);\n    js_begin_call(rt);\n    const char *ret = JS_ToCString(ctx, *val);\n    return ret;\n  }\n\n  DLLEXPORT void jsFreeCString(JSContext *ctx, const char *ptr)\n  {\n    return JS_FreeCString(ctx, ptr);\n  }\n\n  DLLEXPORT uint8_t *jsGetArrayBuffer(JSContext *ctx, size_t *psize, JSValueConst *obj)\n  {\n    return JS_GetArrayBuffer(ctx, psize, *obj);\n  }\n\n  DLLEXPORT int32_t jsIsFunction(JSContext *ctx, JSValueConst *val)\n  {\n    return JS_IsFunction(ctx, *val);\n  }\n\n  DLLEXPORT int32_t jsIsPromise(JSContext *ctx, JSValueConst *val)\n  {\n    return JS_IsPromise(ctx, *val);\n  }\n\n  DLLEXPORT int32_t jsIsArray(JSContext *ctx, JSValueConst *val)\n  {\n    return JS_IsArray(ctx, *val);\n  }\n\n  DLLEXPORT int32_t jsIsError(JSContext *ctx, JSValueConst *val)\n  {\n    return JS_IsError(ctx, *val);\n  }\n\n  DLLEXPORT JSValue *jsNewError(JSContext *ctx)\n  {\n    return new JSValue(JS_NewError(ctx));\n  }\n\n  DLLEXPORT JSValue *jsGetProperty(JSContext *ctx, JSValueConst *this_obj,\n                                   JSAtom prop)\n  {\n    return new JSValue(JS_GetProperty(ctx, *this_obj, prop));\n  }\n\n  DLLEXPORT int32_t jsDefinePropertyValue(JSContext *ctx, JSValueConst *this_obj,\n                                          JSAtom prop, JSValue *val, int32_t flags)\n  {\n    return JS_DefinePropertyValue(ctx, *this_obj, prop, *val, flags);\n  }\n\n  DLLEXPORT void jsFreeAtom(JSContext *ctx, JSAtom v)\n  {\n    JS_FreeAtom(ctx, v);\n  }\n\n  DLLEXPORT JSAtom jsValueToAtom(JSContext *ctx, JSValueConst *val)\n  {\n    return JS_ValueToAtom(ctx, *val);\n  }\n\n  DLLEXPORT JSValue *jsAtomToValue(JSContext *ctx, JSAtom val)\n  {\n    return new JSValue(JS_AtomToValue(ctx, val));\n  }\n\n  DLLEXPORT int32_t jsGetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab,\n                                          uint32_t *plen, JSValueConst *obj, int32_t flags)\n  {\n    return JS_GetOwnPropertyNames(ctx, ptab, plen, *obj, flags);\n  }\n\n  DLLEXPORT JSAtom jsPropertyEnumGetAtom(JSPropertyEnum *ptab, int32_t i)\n  {\n    return ptab[i].atom;\n  }\n\n  DLLEXPORT uint32_t sizeOfJSValue()\n  {\n    return sizeof(JSValue);\n  }\n\n  DLLEXPORT void setJSValueList(JSValue *list, uint32_t i, JSValue *val)\n  {\n    list[i] = *val;\n  }\n\n  DLLEXPORT JSValue *jsCall(JSContext *ctx, JSValueConst *func_obj, JSValueConst *this_obj,\n                            int32_t argc, JSValueConst *argv)\n  {\n    JSRuntime *rt = JS_GetRuntime(ctx);\n    js_begin_call(rt);\n    JSValue *ret = new JSValue(JS_Call(ctx, *func_obj, *this_obj, argc, argv));\n    return ret;\n  }\n\n  DLLEXPORT int32_t jsIsException(JSValueConst *val)\n  {\n    return JS_IsException(*val);\n  }\n\n  DLLEXPORT JSValue *jsGetException(JSContext *ctx)\n  {\n    return new JSValue(JS_GetException(ctx));\n  }\n\n  DLLEXPORT int32_t jsExecutePendingJob(JSRuntime *rt)\n  {\n    js_begin_call(rt);\n    JSContext *ctx;\n    int ret = JS_ExecutePendingJob(rt, &ctx);\n    return ret;\n  }\n\n  DLLEXPORT JSValue *jsNewPromiseCapability(JSContext *ctx, JSValue *resolving_funcs)\n  {\n    return new JSValue(JS_NewPromiseCapability(ctx, resolving_funcs));\n  }\n\n  DLLEXPORT void jsFree(JSContext *ctx, void *ptab)\n  {\n    js_free(ctx, ptab);\n  }\n}"
  },
  {
    "path": "cxx/ffi.h",
    "content": "#include \"quickjs/quickjs.h\"\n\n#ifdef _MSC_VER\n#define DLLEXPORT __declspec(dllexport)\n#else\n#define DLLEXPORT __attribute__((visibility(\"default\"))) __attribute__((used))\n#endif\n\nextern \"C\"\n{\n  enum JSChannelType {\n    JSChannelType_METHON = 0,\n    JSChannelType_MODULE = 1,\n    JSChannelType_PROMISE_TRACK = 2,\n    JSChannelType_FREE_OBJECT = 3,\n  };\n\n  typedef void *JSChannel(JSContext *ctx, size_t type, void *argv);\n\n  DLLEXPORT JSValue *jsThrow(JSContext *ctx, JSValue *obj);\n\n  DLLEXPORT JSValue *jsEXCEPTION();\n\n  DLLEXPORT JSValue *jsUNDEFINED();\n\n  DLLEXPORT JSValue *jsNULL();\n\n  DLLEXPORT JSRuntime *jsNewRuntime(JSChannel channel, int64_t timeout);\n\n  DLLEXPORT uint32_t jsNewClass(JSContext *ctx, const char *name);\n\n  DLLEXPORT void *jsGetObjectOpaque(JSValue *obj, uint32_t classid);\n\n  DLLEXPORT JSValue *jsNewObjectClass(JSContext *ctx, uint32_t QJSClassId, void *opaque);\n\n  DLLEXPORT void jsSetMaxStackSize(JSRuntime *rt, size_t stack_size);\n\n  DLLEXPORT void jsSetMemoryLimit(JSRuntime *rt, size_t limit);\n\n  DLLEXPORT void jsFreeRuntime(JSRuntime *rt);\n\n  DLLEXPORT JSValue *jsNewCFunction(JSContext *ctx, JSValue *funcData);\n\n  DLLEXPORT JSValue *jsGetGlobalObject(JSContext *ctx);\n\n  DLLEXPORT JSContext *jsNewContext(JSRuntime *rt);\n\n  DLLEXPORT void jsFreeContext(JSContext *ctx);\n\n  DLLEXPORT JSRuntime *jsGetRuntime(JSContext *ctx);\n\n  DLLEXPORT JSValue *jsEval(JSContext *ctx, const char *input, size_t input_len, const char *filename, int32_t eval_flags);\n\n  DLLEXPORT int32_t jsValueGetTag(JSValue *val);\n\n  DLLEXPORT void *jsValueGetPtr(JSValue *val);\n\n  DLLEXPORT int32_t jsTagIsFloat64(int32_t tag);\n\n  DLLEXPORT JSValue *jsNewBool(JSContext *ctx, int32_t val);\n\n  DLLEXPORT JSValue *jsNewInt64(JSContext *ctx, int64_t val);\n\n  DLLEXPORT JSValue *jsNewFloat64(JSContext *ctx, double val);\n\n  DLLEXPORT JSValue *jsNewString(JSContext *ctx, const char *str);\n\n  DLLEXPORT JSValue *jsNewArrayBufferCopy(JSContext *ctx, const uint8_t *buf, size_t len);\n\n  DLLEXPORT JSValue *jsNewArray(JSContext *ctx);\n\n  DLLEXPORT JSValue *jsNewObject(JSContext *ctx);\n\n  DLLEXPORT void jsFreeValue(JSContext *ctx, JSValue *v, int32_t free);\n\n  DLLEXPORT void jsFreeValueRT(JSRuntime *rt, JSValue *v, int32_t free);\n\n  DLLEXPORT JSValue *jsDupValue(JSContext *ctx, JSValueConst *v);\n\n  DLLEXPORT JSValue *jsDupValueRT(JSRuntime *rt, JSValue *v);\n\n  DLLEXPORT int32_t jsToBool(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT int64_t jsToInt64(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT double jsToFloat64(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT const char *jsToCString(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT void jsFreeCString(JSContext *ctx, const char *ptr);\n\n  DLLEXPORT uint8_t *jsGetArrayBuffer(JSContext *ctx, size_t *psize, JSValueConst *obj);\n\n  DLLEXPORT int32_t jsIsFunction(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT int32_t jsIsPromise(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT int32_t jsIsArray(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT int32_t jsIsError(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT JSValue *jsNewError(JSContext *ctx);\n\n  DLLEXPORT JSValue *jsGetProperty(JSContext *ctx, JSValueConst *this_obj,\n                                   JSAtom prop);\n\n  DLLEXPORT int32_t jsDefinePropertyValue(JSContext *ctx, JSValueConst *this_obj,\n                                          JSAtom prop, JSValue *val, int32_t flags);\n\n  DLLEXPORT void jsFreeAtom(JSContext *ctx, JSAtom v);\n\n  DLLEXPORT JSAtom jsValueToAtom(JSContext *ctx, JSValueConst *val);\n\n  DLLEXPORT JSValue *jsAtomToValue(JSContext *ctx, JSAtom val);\n\n  DLLEXPORT int32_t jsGetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab,\n                                          uint32_t *plen, JSValueConst *obj, int32_t flags);\n\n  DLLEXPORT JSAtom jsPropertyEnumGetAtom(JSPropertyEnum *ptab, int32_t i);\n\n  DLLEXPORT uint32_t sizeOfJSValue();\n\n  DLLEXPORT void setJSValueList(JSValue *list, uint32_t i, JSValue *val);\n\n  DLLEXPORT JSValue *jsCall(JSContext *ctx, JSValueConst *func_obj, JSValueConst *this_obj,\n                            int32_t argc, JSValueConst *argv);\n\n  DLLEXPORT int32_t jsIsException(JSValueConst *val);\n\n  DLLEXPORT JSValue *jsGetException(JSContext *ctx);\n\n  DLLEXPORT int32_t jsExecutePendingJob(JSRuntime *rt);\n\n  DLLEXPORT JSValue *jsNewPromiseCapability(JSContext *ctx, JSValue *resolving_funcs);\n\n  DLLEXPORT void jsFree(JSContext *ctx, void *ptab);\n}"
  },
  {
    "path": "cxx/prebuild.sh",
    "content": "if [ -d \"./cxx/\" ];then\n    rm -r ./cxx\nfi\n\nmkdir ./cxx\n\nsed 's/\\#include \\\"quickjs\\/quickjs.h\\\"/\\#include \\\"quickjs.h\\\"/g' ../cxx/ffi.h > ./cxx/ffi.h\ncp ../cxx/ffi.cpp ./cxx/ffi.cpp\n\ncp ../cxx/quickjs/*.h ./cxx/\ncp ../cxx/quickjs/cutils.c ./cxx/\ncp ../cxx/quickjs/libregexp.c ./cxx/\ncp ../cxx/quickjs/libunicode.c ./cxx/\n\nquickjs_version=$(cat ../cxx/quickjs/VERSION)\n\nsed '1i\\\n\\#define CONFIG_VERSION \\\"'$quickjs_version'\\\"\\\n\\#define DUMP_LEAKS  1\\\n' ../cxx/quickjs/quickjs.c > ./cxx/quickjs.c"
  },
  {
    "path": "cxx/quickjs.cmake",
    "content": "cmake_minimum_required(VERSION 3.7 FATAL_ERROR)\nset(CXX_LIB_DIR ${CMAKE_CURRENT_LIST_DIR})\n\n# quickjs\nset(QUICK_JS_LIB_DIR ${CXX_LIB_DIR}/quickjs)\nfile (STRINGS \"${QUICK_JS_LIB_DIR}/VERSION\" QUICKJS_VERSION)\nadd_library(quickjs STATIC\n    ${QUICK_JS_LIB_DIR}/cutils.c\n    ${QUICK_JS_LIB_DIR}/libregexp.c\n    ${QUICK_JS_LIB_DIR}/libunicode.c\n    ${QUICK_JS_LIB_DIR}/quickjs.c\n)\n\nproject(quickjs LANGUAGES C)\ntarget_compile_options(quickjs PRIVATE \"-DCONFIG_VERSION=\\\"${QUICKJS_VERSION}\\\"\")\ntarget_compile_options(quickjs PRIVATE \"-DDUMP_LEAKS\")\n\nif(MSVC)\n    # https://github.com/ekibun/flutter_qjs/issues/7\n    target_compile_options(quickjs PRIVATE \"/Oi-\")\nendif()"
  },
  {
    "path": "example/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\n\n# IntelliJ related\n*.iml\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n**/ios/Flutter/.last_build_id\n.dart_tool/\n.flutter-plugins\n.flutter-plugins-dependencies\n.packages\n.pub-cache/\n.pub/\n/build/\n\n# Web related\nlib/generated_plugin_registrant.dart\n\n# Symbolication related\napp.*.symbols\n\n# Obfuscation related\napp.*.map.json\n"
  },
  {
    "path": "example/.metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: f3b7788f7754a51092ae1d677001767960c21910\n  channel: master\n\nproject_type: app\n"
  },
  {
    "path": "example/README.md",
    "content": "# flutter_qjs_example\n\nDemonstrates how to use the flutter_qjs plugin.\n"
  },
  {
    "path": "example/analysis_options.yaml",
    "content": "# This file configures the analyzer, which statically analyzes Dart code to\n# check for errors, warnings, and lints.\n#\n# The issues identified by the analyzer are surfaced in the UI of Dart-enabled\n# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be\n# invoked from the command line by running `flutter analyze`.\n\n# The following line activates a set of recommended lints for Flutter apps,\n# packages, and plugins designed to encourage good coding practices.\ninclude: package:flutter_lints/flutter.yaml\n\nlinter:\n  # The lint rules applied to this project can be customized in the\n  # section below to disable rules from the `package:flutter_lints/flutter.yaml`\n  # included above or to enable additional rules. A list of all available lints\n  # and their documentation is published at\n  # https://dart-lang.github.io/linter/lints/index.html.\n  #\n  # Instead of disabling a lint rule for the entire project in the\n  # section below, it can also be suppressed for a single line of code\n  # or a specific dart file by using the `// ignore: name_of_lint` and\n  # `// ignore_for_file: name_of_lint` syntax on the line or in the file\n  # producing the lint.\n  rules:\n    # avoid_print: false  # Uncomment to disable the `avoid_print` rule\n    # prefer_single_quotes: true  # Uncomment to enable the `prefer_single_quotes` rule\n\n# Additional information about this file can be found at\n# https://dart.dev/guides/language/analysis-options\n"
  },
  {
    "path": "example/android/.gitignore",
    "content": "gradle-wrapper.jar\n/.gradle\n/captures/\n/gradlew\n/gradlew.bat\n/local.properties\nGeneratedPluginRegistrant.java\n\n# Remember to never publicly share your keystore.\n# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app\nkey.properties\n**/*.keystore\n**/*.jks\n"
  },
  {
    "path": "example/android/app/build.gradle",
    "content": "def localProperties = new Properties()\ndef localPropertiesFile = rootProject.file('local.properties')\nif (localPropertiesFile.exists()) {\n    localPropertiesFile.withReader('UTF-8') { reader ->\n        localProperties.load(reader)\n    }\n}\n\ndef flutterRoot = localProperties.getProperty('flutter.sdk')\nif (flutterRoot == null) {\n    throw new GradleException(\"Flutter SDK not found. Define location with flutter.sdk in the local.properties file.\")\n}\n\ndef flutterVersionCode = localProperties.getProperty('flutter.versionCode')\nif (flutterVersionCode == null) {\n    flutterVersionCode = '1'\n}\n\ndef flutterVersionName = localProperties.getProperty('flutter.versionName')\nif (flutterVersionName == null) {\n    flutterVersionName = '1.0'\n}\n\napply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\napply from: \"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle\"\n\nandroid {\n    compileSdkVersion flutter.compileSdkVersion\n    ndkVersion flutter.ndkVersion\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n\n    kotlinOptions {\n        jvmTarget = '1.8'\n    }\n\n    sourceSets {\n        main.java.srcDirs += 'src/main/kotlin'\n    }\n\n    defaultConfig {\n        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).\n        applicationId \"soko.ekibun.flutter_qjs_example\"\n        minSdkVersion flutter.minSdkVersion\n        targetSdkVersion flutter.targetSdkVersion\n        versionCode flutterVersionCode.toInteger()\n        versionName flutterVersionName\n    }\n\n    buildTypes {\n        release {\n            // TODO: Add your own signing config for the release build.\n            // Signing with the debug keys for now, so `flutter run --release` works.\n            signingConfig signingConfigs.debug\n        }\n    }\n}\n\nflutter {\n    source '../..'\n}\n\ndependencies {\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n}\n"
  },
  {
    "path": "example/android/app/src/debug/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"soko.ekibun.flutter_qjs_example\">\n    <!-- The INTERNET permission is required for development. Specifically,\n         the Flutter tool needs it to communicate with the running application\n         to allow setting breakpoints, to provide hot reload, etc.\n    -->\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\n</manifest>\n"
  },
  {
    "path": "example/android/app/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"soko.ekibun.flutter_qjs_example\">\n   <application\n        android:label=\"flutter_qjs_example\"\n        android:name=\"${applicationName}\"\n        android:icon=\"@mipmap/ic_launcher\">\n        <activity\n            android:name=\".MainActivity\"\n            android:exported=\"true\"\n            android:launchMode=\"singleTop\"\n            android:theme=\"@style/LaunchTheme\"\n            android:configChanges=\"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode\"\n            android:hardwareAccelerated=\"true\"\n            android:windowSoftInputMode=\"adjustResize\">\n            <!-- Specifies an Android theme to apply to this Activity as soon as\n                 the Android process has started. This theme is visible to the user\n                 while the Flutter UI initializes. After that, this theme continues\n                 to determine the Window background behind the Flutter UI. -->\n            <meta-data\n              android:name=\"io.flutter.embedding.android.NormalTheme\"\n              android:resource=\"@style/NormalTheme\"\n              />\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n        <!-- Don't delete the meta-data below.\n             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->\n        <meta-data\n            android:name=\"flutterEmbedding\"\n            android:value=\"2\" />\n    </application>\n</manifest>\n"
  },
  {
    "path": "example/android/app/src/main/kotlin/soko/ekibun/flutter_qjs_example/MainActivity.kt",
    "content": "package soko.ekibun.flutter_qjs_example\n\nimport io.flutter.embedding.android.FlutterActivity\n\nclass MainActivity: FlutterActivity() {\n}\n"
  },
  {
    "path": "example/android/app/src/main/res/drawable/launch_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@android:color/white\" />\n\n    <!-- You can insert your own image assets here -->\n    <!-- <item>\n        <bitmap\n            android:gravity=\"center\"\n            android:src=\"@mipmap/launch_image\" />\n    </item> -->\n</layer-list>\n"
  },
  {
    "path": "example/android/app/src/main/res/drawable-v21/launch_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"?android:colorBackground\" />\n\n    <!-- You can insert your own image assets here -->\n    <!-- <item>\n        <bitmap\n            android:gravity=\"center\"\n            android:src=\"@mipmap/launch_image\" />\n    </item> -->\n</layer-list>\n"
  },
  {
    "path": "example/android/app/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n        <item name=\"android:windowBackground\">@drawable/launch_background</item>\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "example/android/app/src/main/res/values-night/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n        <item name=\"android:windowBackground\">@drawable/launch_background</item>\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "example/android/app/src/profile/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"soko.ekibun.flutter_qjs_example\">\n    <!-- The INTERNET permission is required for development. Specifically,\n         the Flutter tool needs it to communicate with the running application\n         to allow setting breakpoints, to provide hot reload, etc.\n    -->\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\n</manifest>\n"
  },
  {
    "path": "example/android/build.gradle",
    "content": "buildscript {\n    ext.kotlin_version = '1.6.10'\n    repositories {\n        google()\n        mavenCentral()\n    }\n\n    dependencies {\n        classpath 'com.android.tools.build:gradle:4.1.0'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\nrootProject.buildDir = '../build'\nsubprojects {\n    project.buildDir = \"${rootProject.buildDir}/${project.name}\"\n}\nsubprojects {\n    project.evaluationDependsOn(':app')\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "example/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Fri Jun 23 08:50:38 CEST 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-6.7-all.zip\n"
  },
  {
    "path": "example/android/gradle.properties",
    "content": "org.gradle.jvmargs=-Xmx1536M\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "example/android/settings.gradle",
    "content": "include ':app'\n\ndef localPropertiesFile = new File(rootProject.projectDir, \"local.properties\")\ndef properties = new Properties()\n\nassert localPropertiesFile.exists()\nlocalPropertiesFile.withReader(\"UTF-8\") { reader -> properties.load(reader) }\n\ndef flutterSdkPath = properties.getProperty(\"flutter.sdk\")\nassert flutterSdkPath != null, \"flutter.sdk not set in local.properties\"\napply from: \"$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle\"\n"
  },
  {
    "path": "example/ios/.gitignore",
    "content": "*.mode1v3\n*.mode2v3\n*.moved-aside\n*.pbxuser\n*.perspectivev3\n**/*sync/\n.sconsign.dblite\n.tags*\n**/.vagrant/\n**/DerivedData/\nIcon?\n**/Pods/\n**/.symlinks/\nprofile\nxcuserdata\n**/.generated/\nFlutter/App.framework\nFlutter/Flutter.framework\nFlutter/Flutter.podspec\nFlutter/Generated.xcconfig\nFlutter/app.flx\nFlutter/app.zip\nFlutter/flutter_assets/\nFlutter/flutter_export_environment.sh\nServiceDefinitions.json\nRunner/GeneratedPluginRegistrant.*\n\n# Exceptions to above rules.\n!default.mode1v3\n!default.mode2v3\n!default.pbxuser\n!default.perspectivev3\n"
  },
  {
    "path": "example/ios/Flutter/AppFrameworkInfo.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n  <key>CFBundleDevelopmentRegion</key>\n  <string>$(DEVELOPMENT_LANGUAGE)</string>\n  <key>CFBundleExecutable</key>\n  <string>App</string>\n  <key>CFBundleIdentifier</key>\n  <string>io.flutter.flutter.app</string>\n  <key>CFBundleInfoDictionaryVersion</key>\n  <string>6.0</string>\n  <key>CFBundleName</key>\n  <string>App</string>\n  <key>CFBundlePackageType</key>\n  <string>FMWK</string>\n  <key>CFBundleShortVersionString</key>\n  <string>1.0</string>\n  <key>CFBundleSignature</key>\n  <string>????</string>\n  <key>CFBundleVersion</key>\n  <string>1.0</string>\n  <key>MinimumOSVersion</key>\n  <string>9.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/Flutter/Debug.xcconfig",
    "content": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "example/ios/Flutter/Release.xcconfig",
    "content": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"Generated.xcconfig\"\n"
  },
  {
    "path": "example/ios/Podfile",
    "content": "# Uncomment this line to define a global platform for your project\n# platform :ios, '9.0'\n\n# CocoaPods analytics sends network stats synchronously affecting flutter build latency.\nENV['COCOAPODS_DISABLE_STATS'] = 'true'\n\nproject 'Runner', {\n  'Debug' => :debug,\n  'Profile' => :release,\n  'Release' => :release,\n}\n\ndef flutter_root\n  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)\n  unless File.exist?(generated_xcode_build_settings_path)\n    raise \"#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first\"\n  end\n\n  File.foreach(generated_xcode_build_settings_path) do |line|\n    matches = line.match(/FLUTTER_ROOT\\=(.*)/)\n    return matches[1].strip if matches\n  end\n  raise \"FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get\"\nend\n\nrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)\n\nflutter_ios_podfile_setup\n\ntarget 'Runner' do\n  use_frameworks!\n  use_modular_headers!\n\n  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    flutter_additional_ios_build_settings(target)\n  end\nend\n"
  },
  {
    "path": "example/ios/Runner/AppDelegate.swift",
    "content": "import UIKit\nimport Flutter\n\n@UIApplicationMain\n@objc class AppDelegate: FlutterAppDelegate {\n  override func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n  ) -> Bool {\n    GeneratedPluginRegistrant.register(with: self)\n    return super.application(application, didFinishLaunchingWithOptions: launchOptions)\n  }\n}\n"
  },
  {
    "path": "example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-20x20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-20x20@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-29x29@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-40x40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-40x40@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-60x60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-App-60x60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-20x20@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"20x20\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-20x20@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-29x29@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-29x29@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-40x40@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-40x40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-76x76@1x.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-76x76@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"83.5x83.5\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-App-83.5x83.5@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"1024x1024\",\n      \"idiom\" : \"ios-marketing\",\n      \"filename\" : \"Icon-App-1024x1024@1x.png\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"LaunchImage@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md",
    "content": "# Launch Screen Assets\n\nYou can customize the launch screen with your own desired assets by replacing the image files in this directory.\n\nYou can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images."
  },
  {
    "path": "example/ios/Runner/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"12121\" systemVersion=\"16G29\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"12089\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Ydg-fD-yQy\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xbc-2k-c8Z\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" image=\"LaunchImage\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YRO-k0-Ey4\">\n                            </imageView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"YRO-k0-Ey4\" firstAttribute=\"centerX\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerX\" id=\"1a2-6s-vTC\"/>\n                            <constraint firstItem=\"YRO-k0-Ey4\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"centerY\" id=\"4X2-HB-R7a\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"LaunchImage\" width=\"168\" height=\"185\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "example/ios/Runner/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15F34\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"10085\"/>\n    </dependencies>\n    <scenes>\n        <!--Flutter View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"FlutterViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"y3c-jy-aDJ\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wfy-db-euE\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "example/ios/Runner/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>flutter_qjs_example</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(FLUTTER_BUILD_NAME)</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(FLUTTER_BUILD_NUMBER)</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UIViewControllerBasedStatusBarAppearance</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/Runner/Runner-Bridging-Header.h",
    "content": "#import \"GeneratedPluginRegistrant.h\"\n"
  },
  {
    "path": "example/ios/Runner.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };\n\t\t3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };\n\t\t455CDD0A38C60135FAE4BE1E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FEEA6A3F04CF4DEF054D0962 /* Pods_Runner.framework */; };\n\t\t74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };\n\t\t97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };\n\t\t97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };\n\t\t97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t9705A1C41CF9048500538489 /* Embed Frameworks */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Embed Frameworks\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = \"<group>\"; };\n\t\t1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = \"<group>\"; };\n\t\t177559F5E68C1612914EEE0E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.release.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = \"<group>\"; };\n\t\t74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"Runner-Bridging-Header.h\"; sourceTree = \"<group>\"; };\n\t\t74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = \"<group>\"; };\n\t\t97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tD8D4D9C385E355627AD72FDC /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.profile.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tED4A476CBE8036EFA898796A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.debug.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tFEEA6A3F04CF4DEF054D0962 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t97C146EB1CF9000F007C117D /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t455CDD0A38C60135FAE4BE1E /* Pods_Runner.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t96E397AA563FBD7DD2827B3F /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tED4A476CBE8036EFA898796A /* Pods-Runner.debug.xcconfig */,\n\t\t\t\t177559F5E68C1612914EEE0E /* Pods-Runner.release.xcconfig */,\n\t\t\t\tD8D4D9C385E355627AD72FDC /* Pods-Runner.profile.xcconfig */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9740EEB11CF90186004384FC /* Flutter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,\n\t\t\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */,\n\t\t\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */,\n\t\t\t\t9740EEB31CF90195004384FC /* Generated.xcconfig */,\n\t\t\t);\n\t\t\tname = Flutter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146E51CF9000F007C117D = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9740EEB11CF90186004384FC /* Flutter */,\n\t\t\t\t97C146F01CF9000F007C117D /* Runner */,\n\t\t\t\t97C146EF1CF9000F007C117D /* Products */,\n\t\t\t\t96E397AA563FBD7DD2827B3F /* Pods */,\n\t\t\t\tC1B25DCE3059ACFD6A761EB2 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146EF1CF9000F007C117D /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146EE1CF9000F007C117D /* Runner.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146F01CF9000F007C117D /* Runner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146FA1CF9000F007C117D /* Main.storyboard */,\n\t\t\t\t97C146FD1CF9000F007C117D /* Assets.xcassets */,\n\t\t\t\t97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,\n\t\t\t\t97C147021CF9000F007C117D /* Info.plist */,\n\t\t\t\t1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,\n\t\t\t\t1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,\n\t\t\t\t74858FAE1ED2DC5600515810 /* AppDelegate.swift */,\n\t\t\t\t74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,\n\t\t\t);\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC1B25DCE3059ACFD6A761EB2 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tFEEA6A3F04CF4DEF054D0962 /* Pods_Runner.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t97C146ED1CF9000F007C117D /* Runner */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget \"Runner\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t9ED59B3EDDF0CCD362B298B6 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t9740EEB61CF901F6004384FC /* Run Script */,\n\t\t\t\t97C146EA1CF9000F007C117D /* Sources */,\n\t\t\t\t97C146EB1CF9000F007C117D /* Frameworks */,\n\t\t\t\t97C146EC1CF9000F007C117D /* Resources */,\n\t\t\t\t9705A1C41CF9048500538489 /* Embed Frameworks */,\n\t\t\t\t3B06AD1E1E4923F5004D2608 /* Thin Binary */,\n\t\t\t\tD88E1FA61D2123552360E924 /* [CP] Embed Pods Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = Runner;\n\t\t\tproductName = Runner;\n\t\t\tproductReference = 97C146EE1CF9000F007C117D /* Runner.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t97C146E61CF9000F007C117D /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 1020;\n\t\t\t\tORGANIZATIONNAME = \"\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t97C146ED1CF9000F007C117D = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.3.1;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject \"Runner\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\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 = 97C146E51CF9000F007C117D;\n\t\t\tproductRefGroup = 97C146EF1CF9000F007C117D /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t97C146ED1CF9000F007C117D /* Runner */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t97C146EC1CF9000F007C117D /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,\n\t\t\t\t97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,\n\t\t\t\t97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Thin Binary\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"/bin/sh \\\"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\\\" embed_and_thin\";\n\t\t};\n\t\t9740EEB61CF901F6004384FC /* Run Script */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Run Script\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"/bin/sh \\\"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\\\" build\";\n\t\t};\n\t\t9ED59B3EDDF0CCD362B298B6 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tD88E1FA61D2123552360E924 /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t97C146EA1CF9000F007C117D /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,\n\t\t\t\t1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t97C146FA1CF9000F007C117D /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t97C146FB1CF9000F007C117D /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t97C147001CF9000F007C117D /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t249021D3217E4FDB00AE95B9 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = 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_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_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_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\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\tGCC_C_LANGUAGE_STANDARD = gnu99;\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 = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSUPPORTED_PLATFORMS = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t249021D4217E4FDB00AE95B9 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = soko.ekibun.flutterQjsExample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t97C147031CF9000F007C117D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = 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_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_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_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\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\tGCC_C_LANGUAGE_STANDARD = gnu99;\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 = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t97C147041CF9000F007C117D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = 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_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_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_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\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\tGCC_C_LANGUAGE_STANDARD = gnu99;\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 = 9.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSUPPORTED_PLATFORMS = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Owholemodule\";\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t97C147061CF9000F007C117D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = soko.ekibun.flutterQjsExample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t97C147071CF9000F007C117D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = \"$(FLUTTER_BUILD_NUMBER)\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = soko.ekibun.flutterQjsExample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"Runner/Runner-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t97C146E91CF9000F007C117D /* Build configuration list for PBXProject \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t97C147031CF9000F007C117D /* Debug */,\n\t\t\t\t97C147041CF9000F007C117D /* Release */,\n\t\t\t\t249021D3217E4FDB00AE95B9 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t97C147061CF9000F007C117D /* Debug */,\n\t\t\t\t97C147071CF9000F007C117D /* Release */,\n\t\t\t\t249021D4217E4FDB00AE95B9 /* Profile */,\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 = 97C146E61CF9000F007C117D /* Project object */;\n}\n"
  },
  {
    "path": "example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreviewsEnabled</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1020\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n               BuildableName = \"Runner.app\"\n               BlueprintName = \"Runner\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Profile\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"97C146ED1CF9000F007C117D\"\n            BuildableName = \"Runner.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "example/ios/Runner.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreviewsEnabled</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/js/hello.js",
    "content": "/*\n * @Description: module example\n * @Author: ekibun\n * @Date: 2020-10-03 00:29:45\n * @LastEditors: ekibun\n * @LastEditTime: 2020-10-03 00:32:37\n */\nexport default (name) => `hello ${name}!`;"
  },
  {
    "path": "example/lib/highlight.dart",
    "content": "/*\n * @Description: Code highlight controller\n * @Author: ekibun\n * @Date: 2020-08-01 17:42:06\n * @LastEditors: ekibun\n * @LastEditTime: 2020-08-02 12:39:26\n */\nimport 'dart:math';\nimport 'dart:ui';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_highlight/themes/a11y-light.dart';\nimport 'package:highlight/highlight.dart';\n\nMap<String, TextStyle> _theme = a11yLightTheme;\nList<TextSpan> _convert(String code) {\n  var nodes = highlight.parse(code, language: 'javascript').nodes;\n  List<TextSpan> spans = [];\n  var currentSpans = spans;\n  List<List<TextSpan>> stack = [];\n\n  _traverse(Node node) {\n    if (node.value != null) {\n      currentSpans.add(node.className == null\n          ? TextSpan(text: node.value)\n          : TextSpan(text: node.value, style: _theme[node.className]));\n    } else if (node.children != null) {\n      List<TextSpan> tmp = [];\n      currentSpans.add(TextSpan(children: tmp, style: _theme[node.className]));\n      stack.add(currentSpans);\n      currentSpans = tmp;\n\n      node.children.forEach((n) {\n        _traverse(n);\n        if (n == node.children.last) {\n          currentSpans = stack.isEmpty ? spans : stack.removeLast();\n        }\n      });\n    }\n  }\n\n  for (var node in nodes) {\n    _traverse(node);\n  }\n\n  return spans;\n}\n\nclass CodeInputController extends TextEditingController {\n  CodeInputController({String text}) : super(text: text);\n\n  TextSpan oldSpan = TextSpan();\n  Future<void> spanCall;\n\n  @override\n  TextSpan buildTextSpan(\n      {@required BuildContext context, TextStyle style, bool withComposing}) {\n    String oldText = oldSpan.toPlainText();\n    String newText = value.text;\n    if (oldText == newText) return oldSpan;\n    (spanCall?.timeout(Duration.zero) ?? Future.value())\n        .then((_) => spanCall = compute(_convert, value.text).then((lsSpan) {\n              TextSpan newSpan = TextSpan(style: style, children: lsSpan);\n              if (newSpan.toPlainText() == value.text) oldSpan = newSpan;\n              notifyListeners();\n            }))\n        .catchError((_) => {});\n\n    List<TextSpan> beforeSpans = [];\n    int splitAt = value.selection.start;\n    if (splitAt < 0) splitAt = newText.length ~/ 2;\n    int start = 0;\n    InlineSpan leftSpan;\n    oldSpan.children?.indexWhere((element) {\n      String elementText = element.toPlainText();\n      if (start + elementText.length > splitAt ||\n          !newText.startsWith(elementText, start)) {\n        leftSpan = element;\n        return true;\n      }\n      beforeSpans.add(element);\n      start += elementText.length;\n      return false;\n    });\n    List<TextSpan> endSpans = [];\n    int end = 0;\n    InlineSpan rightSpan;\n    oldSpan.children?.sublist(beforeSpans.length)?.lastIndexWhere((element) {\n      String elementText = element.toPlainText();\n      if (splitAt + end + elementText.length >= newText.length ||\n          !newText\n              .substring(start, newText.length - end)\n              .endsWith(elementText)) {\n        rightSpan = element;\n        return true;\n      }\n      endSpans.add(element);\n      end += elementText.length;\n      return false;\n    });\n\n    return TextSpan(style: style, children: [\n      ...beforeSpans,\n      TextSpan(\n          style: leftSpan != null && leftSpan == rightSpan\n              ? leftSpan.style\n              : style,\n          text: newText.substring(start, max(start, newText.length - end))),\n      ...endSpans.reversed\n    ]);\n  }\n}\n"
  },
  {
    "path": "example/lib/main.dart",
    "content": "/*\n * @Description: example\n * @Author: ekibun\n * @Date: 2020-08-08 08:16:51\n * @LastEditors: ekibun\n * @LastEditTime: 2020-12-02 11:28:06\n */\nimport 'package:flutter/material.dart';\n\nimport 'package:flutter/services.dart';\nimport 'package:flutter_qjs/flutter_qjs.dart';\n\nimport 'highlight.dart';\n\nvoid main() {\n  runApp(MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({Key key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'flutter_qjs',\n      debugShowCheckedModeBanner: false,\n      theme: ThemeData(\n        appBarTheme: AppBarTheme(brightness: Brightness.dark, elevation: 0),\n        backgroundColor: Colors.grey[300],\n        primaryColorBrightness: Brightness.dark,\n      ),\n      routes: {\n        'home': (BuildContext context) => TestPage(),\n      },\n      initialRoute: 'home',\n    );\n  }\n}\n\nclass TestPage extends StatefulWidget {\n  @override\n  State<StatefulWidget> createState() => _TestPageState();\n}\n\nclass _TestPageState extends State<TestPage> {\n  String resp;\n  IsolateQjs engine;\n\n  CodeInputController _controller = CodeInputController(\n      text: 'import(\"hello\").then(({default: greet}) => greet(\"world\"));');\n\n  _ensureEngine() async {\n    if (engine != null) return;\n    engine = IsolateQjs(\n      moduleHandler: (String module) async {\n        return await rootBundle.loadString(\n            \"js/\" + module.replaceFirst(new RegExp(r\".js$\"), \"\") + \".js\");\n      },\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(\"JS engine test\"),\n      ),\n      body: SingleChildScrollView(\n        padding: const EdgeInsets.all(16),\n        child: Column(\n          crossAxisAlignment: CrossAxisAlignment.start,\n          children: [\n            SingleChildScrollView(\n              scrollDirection: Axis.horizontal,\n              child: Row(\n                children: [\n                  TextButton(\n                      child: Text(\"evaluate\"),\n                      onPressed: () async {\n                        await _ensureEngine();\n                        try {\n                          resp = (await engine.evaluate(_controller.text ?? '',\n                                  name: \"<eval>\"))\n                              .toString();\n                        } catch (e) {\n                          resp = e.toString();\n                        }\n                        setState(() {});\n                      }),\n                  TextButton(\n                      child: Text(\"reset engine\"),\n                      onPressed: () async {\n                        if (engine == null) return;\n                        await engine.close();\n                        engine = null;\n                      }),\n                ],\n              ),\n            ),\n            Container(\n              padding: const EdgeInsets.all(12),\n              color: Colors.grey.withOpacity(0.1),\n              constraints: BoxConstraints(minHeight: 200),\n              child: TextField(\n                  autofocus: true,\n                  controller: _controller,\n                  decoration: null,\n                  expands: true,\n                  maxLines: null),\n            ),\n            SizedBox(height: 16),\n            Text(\"result:\"),\n            SizedBox(height: 16),\n            Container(\n              width: double.infinity,\n              padding: const EdgeInsets.all(12),\n              color: Colors.green.withOpacity(0.05),\n              constraints: BoxConstraints(minHeight: 100),\n              child: Text(resp ?? ''),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "example/linux/.gitignore",
    "content": "flutter/ephemeral\n"
  },
  {
    "path": "example/linux/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.10)\nproject(runner LANGUAGES CXX)\n\nset(BINARY_NAME \"example\")\nset(APPLICATION_ID \"soko.ekibun.example\")\n\ncmake_policy(SET CMP0063 NEW)\n\nset(CMAKE_INSTALL_RPATH \"$ORIGIN/lib\")\n\n# Configure build options.\nif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n  set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n    STRING \"Flutter build mode\" FORCE)\n  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n    \"Debug\" \"Profile\" \"Release\")\nendif()\n\n# Compilation settings that should be applied to most targets.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_14)\n  target_compile_options(${TARGET} PRIVATE -Wall -Werror)\n  target_compile_options(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:-O3>\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:NDEBUG>\")\nendfunction()\n\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\n\n# Flutter library and tool build rules.\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\n\nadd_definitions(-DAPPLICATION_ID=\"${APPLICATION_ID}\")\n\n# Application build\nadd_executable(${BINARY_NAME}\n  \"main.cc\"\n  \"my_application.cc\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n)\napply_standard_settings(${BINARY_NAME})\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter)\ntarget_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# By default, \"installing\" just makes a relocatable bundle in the build\n# directory.\nset(BUILD_BUNDLE_DIR \"${PROJECT_BINARY_DIR}/bundle\")\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\n# Start with a clean build bundle directory every time.\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${BUILD_BUNDLE_DIR}/\\\")\n  \" COMPONENT Runtime)\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}/lib\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nif(PLUGIN_BUNDLED_LIBRARIES)\n  install(FILES \"${PLUGIN_BUNDLED_LIBRARIES}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\nif(NOT CMAKE_BUILD_TYPE MATCHES \"Debug\")\n  install(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n"
  },
  {
    "path": "example/linux/flutter/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.10)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\n\n# Serves the same purpose as list(TRANSFORM ... PREPEND ...),\n# which isn't available in 3.10.\nfunction(list_prepend LIST_NAME PREFIX)\n    set(NEW_LIST \"\")\n    foreach(element ${${LIST_NAME}})\n        list(APPEND NEW_LIST \"${PREFIX}${element}\")\n    endforeach(element)\n    set(${LIST_NAME} \"${NEW_LIST}\" PARENT_SCOPE)\nendfunction()\n\n# === Flutter Library ===\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\npkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)\npkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)\npkg_check_modules(BLKID REQUIRED IMPORTED_TARGET blkid)\n\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/libflutter_linux_gtk.so\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/lib/libapp.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"fl_basic_message_channel.h\"\n  \"fl_binary_codec.h\"\n  \"fl_binary_messenger.h\"\n  \"fl_dart_project.h\"\n  \"fl_engine.h\"\n  \"fl_json_message_codec.h\"\n  \"fl_json_method_codec.h\"\n  \"fl_message_codec.h\"\n  \"fl_method_call.h\"\n  \"fl_method_channel.h\"\n  \"fl_method_codec.h\"\n  \"fl_method_response.h\"\n  \"fl_plugin_registrar.h\"\n  \"fl_plugin_registry.h\"\n  \"fl_standard_message_codec.h\"\n  \"fl_standard_method_codec.h\"\n  \"fl_string_codec.h\"\n  \"fl_value.h\"\n  \"fl_view.h\"\n  \"flutter_linux.h\"\n)\nlist_prepend(FLUTTER_LIBRARY_HEADERS \"${EPHEMERAL_DIR}/flutter_linux/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}\")\ntarget_link_libraries(flutter INTERFACE\n  PkgConfig::GTK\n  PkgConfig::GLIB\n  PkgConfig::GIO\n  PkgConfig::BLKID\n)\nadd_dependencies(flutter flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CMAKE_CURRENT_BINARY_DIR}/_phony_\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh\"\n      linux-x64 ${CMAKE_BUILD_TYPE}\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n)\n"
  },
  {
    "path": "example/linux/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n#include \"generated_plugin_registrant.h\"\n\n#include <flutter_qjs/flutter_qjs_plugin.h>\n\nvoid fl_register_plugins(FlPluginRegistry* registry) {\n  g_autoptr(FlPluginRegistrar) flutter_qjs_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"FlutterQjsPlugin\");\n  flutter_qjs_plugin_register_with_registrar(flutter_qjs_registrar);\n}\n"
  },
  {
    "path": "example/linux/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter_linux/flutter_linux.h>\n\n// Registers Flutter plugins.\nvoid fl_register_plugins(FlPluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "example/linux/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n  flutter_qjs\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n"
  },
  {
    "path": "example/linux/main.cc",
    "content": "#include \"my_application.h\"\n\nint main(int argc, char** argv) {\n  // Only X11 is currently supported.\n  // Wayland support is being developed: https://github.com/flutter/flutter/issues/57932.\n  gdk_set_allowed_backends(\"x11\");\n\n  g_autoptr(MyApplication) app = my_application_new();\n  return g_application_run(G_APPLICATION(app), argc, argv);\n}\n"
  },
  {
    "path": "example/linux/my_application.cc",
    "content": "#include \"my_application.h\"\n\n#include <flutter_linux/flutter_linux.h>\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nstruct _MyApplication {\n  GtkApplication parent_instance;\n};\n\nG_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)\n\n// Implements GApplication::activate.\nstatic void my_application_activate(GApplication* application) {\n  GtkWindow* window =\n      GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));\n  gtk_window_set_title(window, \"example\");\n  gtk_window_set_default_size(window, 1280, 720);\n  gtk_widget_show(GTK_WIDGET(window));\n\n  g_autoptr(FlDartProject) project = fl_dart_project_new();\n\n  FlView* view = fl_view_new(project);\n  gtk_widget_show(GTK_WIDGET(view));\n  gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));\n\n  fl_register_plugins(FL_PLUGIN_REGISTRY(view));\n\n  gtk_widget_grab_focus(GTK_WIDGET(view));\n}\n\nstatic void my_application_class_init(MyApplicationClass* klass) {\n  G_APPLICATION_CLASS(klass)->activate = my_application_activate;\n}\n\nstatic void my_application_init(MyApplication* self) {}\n\nMyApplication* my_application_new() {\n  return MY_APPLICATION(g_object_new(my_application_get_type(),\n                                     \"application-id\", APPLICATION_ID,\n                                     nullptr));\n}\n"
  },
  {
    "path": "example/linux/my_application.h",
    "content": "#ifndef FLUTTER_MY_APPLICATION_H_\n#define FLUTTER_MY_APPLICATION_H_\n\n#include <gtk/gtk.h>\n\nG_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,\n                     GtkApplication)\n\n/**\n * my_application_new:\n *\n * Creates a new Flutter-based application.\n *\n * Returns: a new #MyApplication.\n */\nMyApplication* my_application_new();\n\n#endif  // FLUTTER_MY_APPLICATION_H_\n"
  },
  {
    "path": "example/macos/.gitignore",
    "content": "# Flutter-related\n**/Flutter/ephemeral/\n**/Pods/\n\n# Xcode-related\n**/xcuserdata/\n"
  },
  {
    "path": "example/macos/Flutter/Flutter-Debug.xcconfig",
    "content": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "example/macos/Flutter/Flutter-Release.xcconfig",
    "content": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "example/macos/Flutter/GeneratedPluginRegistrant.swift",
    "content": "//\n//  Generated file. Do not edit.\n//\n\nimport FlutterMacOS\nimport Foundation\n\nimport flutter_qjs\n\nfunc RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {\n  FlutterQjsPlugin.register(with: registry.registrar(forPlugin: \"FlutterQjsPlugin\"))\n}\n"
  },
  {
    "path": "example/macos/Podfile",
    "content": "platform :osx, '10.11'\n\n# CocoaPods analytics sends network stats synchronously affecting flutter build latency.\nENV['COCOAPODS_DISABLE_STATS'] = 'true'\n\nproject 'Runner', {\n  'Debug' => :debug,\n  'Profile' => :release,\n  'Release' => :release,\n}\n\ndef parse_KV_file(file, separator='=')\n  file_abs_path = File.expand_path(file)\n  if !File.exists? file_abs_path\n    return [];\n  end\n  pods_ary = []\n  skip_line_start_symbols = [\"#\", \"/\"]\n  File.foreach(file_abs_path) { |line|\n      next if skip_line_start_symbols.any? { |symbol| line =~ /^\\s*#{symbol}/ }\n      plugin = line.split(pattern=separator)\n      if plugin.length == 2\n        podname = plugin[0].strip()\n        path = plugin[1].strip()\n        podpath = File.expand_path(\"#{path}\", file_abs_path)\n        pods_ary.push({:name => podname, :path => podpath});\n      else\n        puts \"Invalid plugin specification: #{line}\"\n      end\n  }\n  return pods_ary\nend\n\ndef pubspec_supports_macos(file)\n  file_abs_path = File.expand_path(file)\n  if !File.exists? file_abs_path\n    return false;\n  end\n  File.foreach(file_abs_path) { |line|\n    return true if line =~ /^\\s*macos:/\n  }\n  return false\nend\n\ntarget 'Runner' do\n  use_frameworks!\n  use_modular_headers!\n\n  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock\n  # referring to absolute paths on developers' machines.\n  ephemeral_dir = File.join('Flutter', 'ephemeral')\n  symlink_dir = File.join(ephemeral_dir, '.symlinks')\n  symlink_plugins_dir = File.join(symlink_dir, 'plugins')\n  system(\"rm -rf #{symlink_dir}\")\n  system(\"mkdir -p #{symlink_plugins_dir}\")\n\n  # Flutter Pods\n  generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig'))\n  if generated_xcconfig.empty?\n    puts \"Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first.\"\n  end\n  generated_xcconfig.map { |p|\n    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'\n      symlink = File.join(symlink_dir, 'flutter')\n      File.symlink(File.dirname(p[:path]), symlink)\n      pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path]))\n    end\n  }\n\n  # Plugin Pods\n  plugin_pods = parse_KV_file('../.flutter-plugins')\n  plugin_pods.map { |p|\n    symlink = File.join(symlink_plugins_dir, p[:name])\n    File.symlink(p[:path], symlink)\n    if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml'))\n      pod p[:name], :path => File.join(symlink, 'macos')\n    end\n  }\nend\n\n# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.\ninstall! 'cocoapods', :disable_input_output_paths => true\n"
  },
  {
    "path": "example/macos/Runner/AppDelegate.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\n@NSApplicationMain\nclass AppDelegate: FlutterAppDelegate {\n  override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {\n    return true\n  }\n}\n"
  },
  {
    "path": "example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_16.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_64.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_128.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_1024.png\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "example/macos/Runner/Base.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"14490.70\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"14490.70\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"NSApplication\">\n            <connections>\n                <outlet property=\"delegate\" destination=\"Voe-Tx-rLC\" id=\"GzC-gU-4Uq\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customObject id=\"Voe-Tx-rLC\" customClass=\"AppDelegate\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"applicationMenu\" destination=\"uQy-DD-JDr\" id=\"XBo-yE-nKs\"/>\n                <outlet property=\"mainFlutterWindow\" destination=\"QvC-M9-y7g\" id=\"gIp-Ho-8D9\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"YLy-65-1bz\" customClass=\"NSFontManager\"/>\n        <menu title=\"Main Menu\" systemMenu=\"main\" id=\"AYu-sK-qS6\">\n            <items>\n                <menuItem title=\"APP_NAME\" id=\"1Xt-HY-uBw\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"APP_NAME\" systemMenu=\"apple\" id=\"uQy-DD-JDr\">\n                        <items>\n                            <menuItem title=\"About APP_NAME\" id=\"5kV-Vb-QxS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"orderFrontStandardAboutPanel:\" target=\"-1\" id=\"Exp-CZ-Vem\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"VOq-y0-SEH\"/>\n                            <menuItem title=\"Preferences…\" keyEquivalent=\",\" id=\"BOF-NM-1cW\"/>\n                            <menuItem isSeparatorItem=\"YES\" id=\"wFC-TO-SCJ\"/>\n                            <menuItem title=\"Services\" id=\"NMo-om-nkz\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Services\" systemMenu=\"services\" id=\"hz9-B4-Xy5\"/>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"4je-JR-u6R\"/>\n                            <menuItem title=\"Hide APP_NAME\" keyEquivalent=\"h\" id=\"Olw-nP-bQN\">\n                                <connections>\n                                    <action selector=\"hide:\" target=\"-1\" id=\"PnN-Uc-m68\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Hide Others\" keyEquivalent=\"h\" id=\"Vdr-fp-XzO\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"hideOtherApplications:\" target=\"-1\" id=\"VT4-aY-XCT\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Show All\" id=\"Kd2-mp-pUS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"unhideAllApplications:\" target=\"-1\" id=\"Dhg-Le-xox\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"kCx-OE-vgT\"/>\n                            <menuItem title=\"Quit APP_NAME\" keyEquivalent=\"q\" id=\"4sb-4s-VLi\">\n                                <connections>\n                                    <action selector=\"terminate:\" target=\"-1\" id=\"Te7-pn-YzF\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Edit\" id=\"5QF-Oa-p0T\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Edit\" id=\"W48-6f-4Dl\">\n                        <items>\n                            <menuItem title=\"Undo\" keyEquivalent=\"z\" id=\"dRJ-4n-Yzg\">\n                                <connections>\n                                    <action selector=\"undo:\" target=\"-1\" id=\"M6e-cu-g7V\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Redo\" keyEquivalent=\"Z\" id=\"6dh-zS-Vam\">\n                                <connections>\n                                    <action selector=\"redo:\" target=\"-1\" id=\"oIA-Rs-6OD\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"WRV-NI-Exz\"/>\n                            <menuItem title=\"Cut\" keyEquivalent=\"x\" id=\"uRl-iY-unG\">\n                                <connections>\n                                    <action selector=\"cut:\" target=\"-1\" id=\"YJe-68-I9s\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Copy\" keyEquivalent=\"c\" id=\"x3v-GG-iWU\">\n                                <connections>\n                                    <action selector=\"copy:\" target=\"-1\" id=\"G1f-GL-Joy\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste\" keyEquivalent=\"v\" id=\"gVA-U4-sdL\">\n                                <connections>\n                                    <action selector=\"paste:\" target=\"-1\" id=\"UvS-8e-Qdg\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste and Match Style\" keyEquivalent=\"V\" id=\"WeT-3V-zwk\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"pasteAsPlainText:\" target=\"-1\" id=\"cEh-KX-wJQ\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Delete\" id=\"pa3-QI-u2k\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"delete:\" target=\"-1\" id=\"0Mk-Ml-PaM\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Select All\" keyEquivalent=\"a\" id=\"Ruw-6m-B2m\">\n                                <connections>\n                                    <action selector=\"selectAll:\" target=\"-1\" id=\"VNm-Mi-diN\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"uyl-h8-XO2\"/>\n                            <menuItem title=\"Find\" id=\"4EN-yA-p0u\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Find\" id=\"1b7-l0-nxx\">\n                                    <items>\n                                        <menuItem title=\"Find…\" tag=\"1\" keyEquivalent=\"f\" id=\"Xz5-n4-O0W\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"cD7-Qs-BN4\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find and Replace…\" tag=\"12\" keyEquivalent=\"f\" id=\"YEy-JH-Tfz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"WD3-Gg-5AJ\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Next\" tag=\"2\" keyEquivalent=\"g\" id=\"q09-fT-Sye\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"NDo-RZ-v9R\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Previous\" tag=\"3\" keyEquivalent=\"G\" id=\"OwM-mh-QMV\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"HOh-sY-3ay\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Use Selection for Find\" tag=\"7\" keyEquivalent=\"e\" id=\"buJ-ug-pKt\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"U76-nv-p5D\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Jump to Selection\" keyEquivalent=\"j\" id=\"S0p-oC-mLd\">\n                                            <connections>\n                                                <action selector=\"centerSelectionInVisibleArea:\" target=\"-1\" id=\"IOG-6D-g5B\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Spelling and Grammar\" id=\"Dv1-io-Yv7\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Spelling\" id=\"3IN-sU-3Bg\">\n                                    <items>\n                                        <menuItem title=\"Show Spelling and Grammar\" keyEquivalent=\":\" id=\"HFo-cy-zxI\">\n                                            <connections>\n                                                <action selector=\"showGuessPanel:\" target=\"-1\" id=\"vFj-Ks-hy3\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Document Now\" keyEquivalent=\";\" id=\"hz2-CU-CR7\">\n                                            <connections>\n                                                <action selector=\"checkSpelling:\" target=\"-1\" id=\"fz7-VC-reM\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"bNw-od-mp5\"/>\n                                        <menuItem title=\"Check Spelling While Typing\" id=\"rbD-Rh-wIN\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleContinuousSpellChecking:\" target=\"-1\" id=\"7w6-Qz-0kB\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Grammar With Spelling\" id=\"mK6-2p-4JG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleGrammarChecking:\" target=\"-1\" id=\"muD-Qn-j4w\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Correct Spelling Automatically\" id=\"78Y-hA-62v\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticSpellingCorrection:\" target=\"-1\" id=\"2lM-Qi-WAP\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Substitutions\" id=\"9ic-FL-obx\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Substitutions\" id=\"FeM-D8-WVr\">\n                                    <items>\n                                        <menuItem title=\"Show Substitutions\" id=\"z6F-FW-3nz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"orderFrontSubstitutionsPanel:\" target=\"-1\" id=\"oku-mr-iSq\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"gPx-C9-uUO\"/>\n                                        <menuItem title=\"Smart Copy/Paste\" id=\"9yt-4B-nSM\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleSmartInsertDelete:\" target=\"-1\" id=\"3IJ-Se-DZD\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Quotes\" id=\"hQb-2v-fYv\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticQuoteSubstitution:\" target=\"-1\" id=\"ptq-xd-QOA\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Dashes\" id=\"rgM-f4-ycn\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDashSubstitution:\" target=\"-1\" id=\"oCt-pO-9gS\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Links\" id=\"cwL-P1-jid\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticLinkDetection:\" target=\"-1\" id=\"Gip-E3-Fov\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Data Detectors\" id=\"tRr-pd-1PS\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDataDetection:\" target=\"-1\" id=\"R1I-Nq-Kbl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Text Replacement\" id=\"HFQ-gK-NFA\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticTextReplacement:\" target=\"-1\" id=\"DvP-Fe-Py6\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Transformations\" id=\"2oI-Rn-ZJC\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Transformations\" id=\"c8a-y6-VQd\">\n                                    <items>\n                                        <menuItem title=\"Make Upper Case\" id=\"vmV-6d-7jI\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"uppercaseWord:\" target=\"-1\" id=\"sPh-Tk-edu\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Make Lower Case\" id=\"d9M-CD-aMd\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"lowercaseWord:\" target=\"-1\" id=\"iUZ-b5-hil\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Capitalize\" id=\"UEZ-Bs-lqG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"capitalizeWord:\" target=\"-1\" id=\"26H-TL-nsh\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Speech\" id=\"xrE-MZ-jX0\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Speech\" id=\"3rS-ZA-NoH\">\n                                    <items>\n                                        <menuItem title=\"Start Speaking\" id=\"Ynk-f8-cLZ\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"startSpeaking:\" target=\"-1\" id=\"654-Ng-kyl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Stop Speaking\" id=\"Oyz-dy-DGm\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"stopSpeaking:\" target=\"-1\" id=\"dX8-6p-jy9\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"View\" id=\"H8h-7b-M4v\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"View\" id=\"HyV-fh-RgO\">\n                        <items>\n                            <menuItem title=\"Enter Full Screen\" keyEquivalent=\"f\" id=\"4J7-dP-txa\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" control=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"toggleFullScreen:\" target=\"-1\" id=\"dU3-MA-1Rq\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Window\" id=\"aUF-d1-5bR\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Window\" systemMenu=\"window\" id=\"Td7-aD-5lo\">\n                        <items>\n                            <menuItem title=\"Minimize\" keyEquivalent=\"m\" id=\"OY7-WF-poV\">\n                                <connections>\n                                    <action selector=\"performMiniaturize:\" target=\"-1\" id=\"VwT-WD-YPe\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Zoom\" id=\"R4o-n2-Eq4\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"performZoom:\" target=\"-1\" id=\"DIl-cC-cCs\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"eu3-7i-yIM\"/>\n                            <menuItem title=\"Bring All to Front\" id=\"LE2-aR-0XJ\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"arrangeInFront:\" target=\"-1\" id=\"DRN-fu-gQh\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n            </items>\n            <point key=\"canvasLocation\" x=\"142\" y=\"-258\"/>\n        </menu>\n        <window title=\"APP_NAME\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" releasedWhenClosed=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\" customClass=\"MainFlutterWindow\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <rect key=\"contentRect\" x=\"335\" y=\"390\" width=\"800\" height=\"600\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"2560\" height=\"1577\"/>\n            <view key=\"contentView\" wantsLayer=\"YES\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"800\" height=\"600\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n            </view>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "example/macos/Runner/Configs/AppInfo.xcconfig",
    "content": "// Application-level settings for the Runner target.\n//\n// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the\n// future. If not, the values below would default to using the project name when this becomes a\n// 'flutter create' template.\n\n// The application's name. By default this is also the title of the Flutter window.\nPRODUCT_NAME = flutter_qjs_example\n\n// The application's bundle identifier\nPRODUCT_BUNDLE_IDENTIFIER = soko.ekibun.flutterQjsExample\n\n// The copyright displayed in application information\nPRODUCT_COPYRIGHT = Copyright © 2020 soko.ekibun. All rights reserved.\n"
  },
  {
    "path": "example/macos/Runner/Configs/Debug.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Debug.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "example/macos/Runner/Configs/Release.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Release.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "example/macos/Runner/Configs/Warnings.xcconfig",
    "content": "WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings\nGCC_WARN_UNDECLARED_SELECTOR = YES\nCLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES\nCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE\nCLANG_WARN__DUPLICATE_METHOD_MATCH = YES\nCLANG_WARN_PRAGMA_PACK = YES\nCLANG_WARN_STRICT_PROTOTYPES = YES\nCLANG_WARN_COMMA = YES\nGCC_WARN_STRICT_SELECTOR_MATCH = YES\nCLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES\nGCC_WARN_SHADOW = YES\nCLANG_WARN_UNREACHABLE_CODE = YES\n"
  },
  {
    "path": "example/macos/Runner/DebugProfile.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n\t<key>com.apple.security.cs.allow-jit</key>\n\t<true/>\n\t<key>com.apple.security.network.server</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/macos/Runner/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(FLUTTER_BUILD_NAME)</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(FLUTTER_BUILD_NUMBER)</string>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>$(MACOSX_DEPLOYMENT_TARGET)</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>$(PRODUCT_COPYRIGHT)</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>NSApplication</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/macos/Runner/MainFlutterWindow.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\nclass MainFlutterWindow: NSWindow {\n  override func awakeFromNib() {\n    let flutterViewController = FlutterViewController.init()\n    let windowFrame = self.frame\n    self.contentViewController = flutterViewController\n    self.setFrame(windowFrame, display: true)\n\n    RegisterGeneratedPlugins(registry: flutterViewController)\n\n    super.awakeFromNib()\n  }\n}\n"
  },
  {
    "path": "example/macos/Runner/Release.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/macos/Runner.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 51;\n\tobjects = {\n\n/* Begin PBXAggregateTarget section */\n\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {\n\t\t\tisa = PBXAggregateTarget;\n\t\t\tbuildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t33CC111E2044C6BF0003C045 /* ShellScript */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = \"Flutter Assemble\";\n\t\t\tproductName = FLX;\n\t\t};\n/* End PBXAggregateTarget section */\n\n/* Begin PBXBuildFile section */\n\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };\n\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };\n\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };\n\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };\n\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };\n\t\t8A0E1E523547DDE6AEEAA187 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E845184DF4416AE932BDD596 /* Pods_Runner.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 33CC10E52044A3C60003C045 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 33CC111A2044C6BA0003C045;\n\t\t\tremoteInfo = FLX;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t33CC110E2044A8840003C045 /* Bundle Framework */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Bundle Framework\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = \"<group>\"; };\n\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = \"<group>\"; };\n\t\t33CC10ED2044A3C60003C045 /* flutter_qjs_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flutter_qjs_example.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = \"<group>\"; };\n\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = \"<group>\"; };\n\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = \"Flutter-Generated.xcconfig\"; path = \"ephemeral/Flutter-Generated.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = \"<group>\"; };\n\t\t33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = \"<group>\"; };\n\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = \"<group>\"; };\n\t\t64B57AD34D7E83EE511DDCCF /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.release.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = \"<group>\"; };\n\t\t7E8A42D81EE399E35D3B1C49 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.debug.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = \"<group>\"; };\n\t\tE845184DF4416AE932BDD596 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tED16B55A7814C4FA5051DC2C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.profile.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t33CC10EA2044A3C60003C045 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8A0E1E523547DDE6AEEAA187 /* Pods_Runner.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t33BA886A226E78AF003329D5 /* Configs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */,\n\t\t\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */,\n\t\t\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */,\n\t\t\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */,\n\t\t\t);\n\t\t\tpath = Configs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10E42044A3C60003C045 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33FAB671232836740065AC1E /* Runner */,\n\t\t\t\t33CEB47122A05771004F2AC0 /* Flutter */,\n\t\t\t\t33CC10EE2044A3C60003C045 /* Products */,\n\t\t\t\tD73912EC22F37F3D000D13A0 /* Frameworks */,\n\t\t\t\tF7F2688E6097307B6E7FBB0A /* Pods */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10EE2044A3C60003C045 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10ED2044A3C60003C045 /* flutter_qjs_example.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC11242044D66E0003C045 /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */,\n\t\t\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */,\n\t\t\t\t33CC10F72044A3C60003C045 /* Info.plist */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tpath = ..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CEB47122A05771004F2AC0 /* Flutter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,\n\t\t\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,\n\t\t\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,\n\t\t\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,\n\t\t\t);\n\t\t\tpath = Flutter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33FAB671232836740065AC1E /* Runner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */,\n\t\t\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,\n\t\t\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */,\n\t\t\t\t33E51914231749380026EE4D /* Release.entitlements */,\n\t\t\t\t33CC11242044D66E0003C045 /* Resources */,\n\t\t\t\t33BA886A226E78AF003329D5 /* Configs */,\n\t\t\t);\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tD73912EC22F37F3D000D13A0 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tE845184DF4416AE932BDD596 /* Pods_Runner.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tF7F2688E6097307B6E7FBB0A /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7E8A42D81EE399E35D3B1C49 /* Pods-Runner.debug.xcconfig */,\n\t\t\t\t64B57AD34D7E83EE511DDCCF /* Pods-Runner.release.xcconfig */,\n\t\t\t\tED16B55A7814C4FA5051DC2C /* Pods-Runner.profile.xcconfig */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t33CC10EC2044A3C60003C045 /* Runner */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t1BC6EABFB22C790B61CFD12A /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t33CC10E92044A3C60003C045 /* Sources */,\n\t\t\t\t33CC10EA2044A3C60003C045 /* Frameworks */,\n\t\t\t\t33CC10EB2044A3C60003C045 /* Resources */,\n\t\t\t\t33CC110E2044A8840003C045 /* Bundle Framework */,\n\t\t\t\t3399D490228B24CF009A79C7 /* ShellScript */,\n\t\t\t\tE193D3629E4189A7A2FB86DD /* [CP] Embed Pods Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t33CC11202044C79F0003C045 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = Runner;\n\t\t\tproductName = Runner;\n\t\t\tproductReference = 33CC10ED2044A3C60003C045 /* flutter_qjs_example.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t33CC10E52044A3C60003C045 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0920;\n\t\t\t\tLastUpgradeCheck = 0930;\n\t\t\t\tORGANIZATIONNAME = \"The Flutter Authors\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t33CC10EC2044A3C60003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t\tcom.apple.Sandbox = {\n\t\t\t\t\t\t\t\tenabled = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\t33CC111A2044C6BA0003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tProvisioningStyle = Manual;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */;\n\t\t\tcompatibilityVersion = \"Xcode 8.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 = 33CC10E42044A3C60003C045;\n\t\t\tproductRefGroup = 33CC10EE2044A3C60003C045 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t33CC10EC2044A3C60003C045 /* Runner */,\n\t\t\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t33CC10EB2044A3C60003C045 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,\n\t\t\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t1BC6EABFB22C790B61CFD12A /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t3399D490228B24CF009A79C7 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\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 = \"echo \\\"$PRODUCT_NAME.app\\\" > \\\"$PROJECT_DIR\\\"/Flutter/ephemeral/.app_filename && \\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh embed\\n\";\n\t\t};\n\t\t33CC111E2044C6BF0003C045 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterInputs.xcfilelist,\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\tFlutter/ephemeral/tripwire,\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterOutputs.xcfilelist,\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 = \"\\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\";\n\t\t};\n\t\tE193D3629E4189A7A2FB86DD /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t33CC10E92044A3C60003C045 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,\n\t\t\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,\n\t\t\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.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\t33CC11202044C79F0003C045 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;\n\t\t\ttargetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F52044A3C60003C045 /* Base */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t338D0CE9231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\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++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = 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_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_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\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\tGCC_C_LANGUAGE_STANDARD = gnu11;\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_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\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEA231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter/ephemeral\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\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\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEB231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t33CC10F92044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\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++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = 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_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_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\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\tGCC_C_LANGUAGE_STANDARD = gnu11;\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_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\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FA2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\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++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = 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_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_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\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\tGCC_C_LANGUAGE_STANDARD = gnu11;\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_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\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC10FC2044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter/ephemeral\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\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\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FD2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)/Flutter/ephemeral\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\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\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC111C2044C6BA0003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC111D2044C6BA0003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10F92044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FA2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CE9231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10FC2044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FD2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CEA231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC111C2044C6BA0003C045 /* Debug */,\n\t\t\t\t33CC111D2044C6BA0003C045 /* Release */,\n\t\t\t\t338D0CEB231458BD00FA5F75 /* Profile */,\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 = 33CC10E52044A3C60003C045 /* Project object */;\n}\n"
  },
  {
    "path": "example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1000\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n               BuildableName = \"flutter_qjs_example.app\"\n               BlueprintName = \"Runner\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"00380F9121DF178D00097171\"\n               BuildableName = \"RunnerUITests.xctest\"\n               BlueprintName = \"RunnerUITests\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"flutter_qjs_example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"flutter_qjs_example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"flutter_qjs_example.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "example/macos/Runner.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "example/pubspec.yaml",
    "content": "name: flutter_qjs_example\ndescription: Demonstrates how to use the flutter_qjs plugin.\n\n# The following line prevents the package from being accidentally published to\n# pub.dev using `pub publish`. This is preferred for private packages.\npublish_to: 'none' # Remove this line if you wish to publish to pub.dev\n\nenvironment:\n  sdk: \">=2.7.0 <3.0.0\"\n\ndependencies:\n  flutter:\n    sdk: flutter\n\n  flutter_qjs:\n    # When depending on this package from a real application you should use:\n    #   flutter_qjs: ^x.y.z\n    # See https://dart.dev/tools/pub/dependencies#version-constraints\n    # The example app is bundled with the plugin so we use a path dependency on\n    # the parent directory to use the current plugin's version.\n    path: ../\n\n  highlight: 0.6.0\n  flutter_highlight: 0.6.0\n\ndev_dependencies:\n  flutter_test:\n    sdk: flutter\n\n# For information on the generic Dart part of this file, see the\n# following page: https://dart.dev/tools/pub/pubspec\n\n# The following section is specific to Flutter.\nflutter:\n\n  # The following line ensures that the Material Icons font is\n  # included with your application, so that you can use the icons in\n  # the material Icons class.\n  uses-material-design: true\n\n  # To add assets to your application, add an assets section, like this:\n  assets:\n    - js/\n  #   - images/a_dot_ham.jpeg\n\n  # An image asset can refer to one or more resolution-specific \"variants\", see\n  # https://flutter.dev/assets-and-images/#resolution-aware.\n\n  # For details regarding adding assets from package dependencies, see\n  # https://flutter.dev/assets-and-images/#from-packages\n\n  # To add custom fonts to your application, add a fonts section here,\n  # in this \"flutter\" section. Each entry in this list should have a\n  # \"family\" key with the font family name, and a \"fonts\" key with a\n  # list giving the asset and other descriptors for the font. For\n  # example:\n  # fonts:\n  #   - family: Schyler\n  #     fonts:\n  #       - asset: fonts/Schyler-Regular.ttf\n  #       - asset: fonts/Schyler-Italic.ttf\n  #         style: italic\n  #   - family: Trajan Pro\n  #     fonts:\n  #       - asset: fonts/TrajanPro.ttf\n  #       - asset: fonts/TrajanPro_Bold.ttf\n  #         weight: 700\n  #\n  # For details regarding fonts from package dependencies,\n  # see https://flutter.dev/custom-fonts/#from-packages\n"
  },
  {
    "path": "example/windows/.gitignore",
    "content": "flutter/ephemeral/\n\n# Visual Studio user-specific files.\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# Visual Studio build-related files.\nx64/\nx86/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n"
  },
  {
    "path": "example/windows/CMakeLists.txt",
    "content": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.14)\nproject(example LANGUAGES CXX)\n\n# The name of the executable created for the application. Change this to change\n# the on-disk name of your application.\nset(BINARY_NAME \"example\")\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(SET CMP0063 NEW)\n\n# Define build configuration option.\nget_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\nif(IS_MULTICONFIG)\n  set(CMAKE_CONFIGURATION_TYPES \"Debug;Profile;Release\"\n    CACHE STRING \"\" FORCE)\nelse()\n  if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n    set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n      STRING \"Flutter build mode\" FORCE)\n    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n      \"Debug\" \"Profile\" \"Release\")\n  endif()\nendif()\n# Define settings for the Profile build mode.\nset(CMAKE_EXE_LINKER_FLAGS_PROFILE \"${CMAKE_EXE_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_SHARED_LINKER_FLAGS_PROFILE \"${CMAKE_SHARED_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_C_FLAGS_PROFILE \"${CMAKE_C_FLAGS_RELEASE}\")\nset(CMAKE_CXX_FLAGS_PROFILE \"${CMAKE_CXX_FLAGS_RELEASE}\")\n\n# Use Unicode for all projects.\nadd_definitions(-DUNICODE -D_UNICODE)\n\n# Compilation settings that should be applied to most targets.\n#\n# Be cautious about adding new options here, as plugins use this function by\n# default. In most cases, you should add new options to specific targets instead\n# of modifying this function.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_17)\n  target_compile_options(${TARGET} PRIVATE /W4 /WX /wd\"4100\")\n  target_compile_options(${TARGET} PRIVATE /EHsc)\n  target_compile_definitions(${TARGET} PRIVATE \"_HAS_EXCEPTIONS=0\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<CONFIG:Debug>:_DEBUG>\")\nendfunction()\n\n# Flutter library and tool build rules.\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# Application build; see runner/CMakeLists.txt.\nadd_subdirectory(\"runner\")\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# Support files are copied into place next to the executable, so that it can\n# run in place. This is done instead of making a separate bundle (as on Linux)\n# so that building and running from within Visual Studio will work.\nset(BUILD_BUNDLE_DIR \"$<TARGET_FILE_DIR:${BINARY_NAME}>\")\n# Make the \"install\" step default, as it's required to run.\nset(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nif(PLUGIN_BUNDLED_LIBRARIES)\n  install(FILES \"${PLUGIN_BUNDLED_LIBRARIES}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\ninstall(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  CONFIGURATIONS Profile;Release\n  COMPONENT Runtime)\n"
  },
  {
    "path": "example/windows/flutter/CMakeLists.txt",
    "content": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.14)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\nset(WRAPPER_ROOT \"${EPHEMERAL_DIR}/cpp_client_wrapper\")\n\n# === Flutter Library ===\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/flutter_windows.dll\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/windows/app.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"flutter_export.h\"\n  \"flutter_windows.h\"\n  \"flutter_messenger.h\"\n  \"flutter_plugin_registrar.h\"\n  \"flutter_texture_registrar.h\"\n)\nlist(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND \"${EPHEMERAL_DIR}/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}.lib\")\nadd_dependencies(flutter flutter_assemble)\n\n# === Wrapper ===\nlist(APPEND CPP_WRAPPER_SOURCES_CORE\n  \"core_implementations.cc\"\n  \"standard_codec.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_PLUGIN\n  \"plugin_registrar.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_APP\n  \"flutter_engine.cc\"\n  \"flutter_view_controller.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND \"${WRAPPER_ROOT}/\")\n\n# Wrapper sources needed for a plugin.\nadd_library(flutter_wrapper_plugin STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n)\napply_standard_settings(flutter_wrapper_plugin)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  POSITION_INDEPENDENT_CODE ON)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_link_libraries(flutter_wrapper_plugin PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_plugin PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_plugin flutter_assemble)\n\n# Wrapper sources needed for the runner.\nadd_library(flutter_wrapper_app STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\napply_standard_settings(flutter_wrapper_app)\ntarget_link_libraries(flutter_wrapper_app PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_app PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_app flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nset(PHONY_OUTPUT \"${CMAKE_CURRENT_BINARY_DIR}/_phony_\")\nset_source_files_properties(\"${PHONY_OUTPUT}\" PROPERTIES SYMBOLIC TRUE)\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}\n    ${CPP_WRAPPER_SOURCES_APP}\n    ${PHONY_OUTPUT}\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat\"\n      windows-x64 $<CONFIG>\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\n"
  },
  {
    "path": "example/windows/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n#include <flutter_qjs/flutter_qjs_plugin.h>\n\nvoid RegisterPlugins(flutter::PluginRegistry* registry) {\n  FlutterQjsPluginRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"FlutterQjsPlugin\"));\n}\n"
  },
  {
    "path": "example/windows/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter/plugin_registry.h>\n\n// Registers Flutter plugins.\nvoid RegisterPlugins(flutter::PluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "example/windows/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n  flutter_qjs\n)\n\nlist(APPEND FLUTTER_FFI_PLUGIN_LIST\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n\nforeach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})\nendforeach(ffi_plugin)\n"
  },
  {
    "path": "example/windows/runner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.14)\nproject(runner LANGUAGES CXX)\n\n# Define the application target. To change its name, change BINARY_NAME in the\n# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer\n# work.\n#\n# Any new source files that you add to the application should be added here.\nadd_executable(${BINARY_NAME} WIN32\n  \"flutter_window.cpp\"\n  \"main.cpp\"\n  \"utils.cpp\"\n  \"win32_window.cpp\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n  \"Runner.rc\"\n  \"runner.exe.manifest\"\n)\n\n# Apply the standard set of build settings. This can be removed for applications\n# that need different build settings.\napply_standard_settings(${BINARY_NAME})\n\n# Disable Windows macros that collide with C++ standard library functions.\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"NOMINMAX\")\n\n# Add dependency libraries and include directories. Add any application-specific\n# dependencies here.\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)\ntarget_include_directories(${BINARY_NAME} PRIVATE \"${CMAKE_SOURCE_DIR}\")\n\n# Run the Flutter tool portions of the build. This must not be removed.\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n"
  },
  {
    "path": "example/windows/runner/Runner.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#pragma code_page(65001)\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#include \"winres.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (United States) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE\nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE\nBEGIN\n    \"#include \"\"winres.h\"\"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE\nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_APP_ICON            ICON                    \"resources\\\\app_icon.ico\"\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n\n#ifdef FLUTTER_BUILD_NUMBER\n#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER\n#else\n#define VERSION_AS_NUMBER 1,0,0\n#endif\n\n#ifdef FLUTTER_BUILD_NAME\n#define VERSION_AS_STRING #FLUTTER_BUILD_NAME\n#else\n#define VERSION_AS_STRING \"1.0.0\"\n#endif\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION VERSION_AS_NUMBER\n PRODUCTVERSION VERSION_AS_NUMBER\n FILEFLAGSMASK VS_FFI_FILEFLAGSMASK\n#ifdef _DEBUG\n FILEFLAGS VS_FF_DEBUG\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS VOS__WINDOWS32\n FILETYPE VFT_APP\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"040904e4\"\n        BEGIN\n            VALUE \"CompanyName\", \"com.example\" \"\\0\"\n            VALUE \"FileDescription\", \"example\" \"\\0\"\n            VALUE \"FileVersion\", VERSION_AS_STRING \"\\0\"\n            VALUE \"InternalName\", \"example\" \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright (C) 2022 com.example. All rights reserved.\" \"\\0\"\n            VALUE \"OriginalFilename\", \"example.exe\" \"\\0\"\n            VALUE \"ProductName\", \"example\" \"\\0\"\n            VALUE \"ProductVersion\", VERSION_AS_STRING \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x409, 1252\n    END\nEND\n\n#endif    // English (United States) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n"
  },
  {
    "path": "example/windows/runner/flutter_window.cpp",
    "content": "#include \"flutter_window.h\"\n\n#include <optional>\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nFlutterWindow::FlutterWindow(const flutter::DartProject& project)\n    : project_(project) {}\n\nFlutterWindow::~FlutterWindow() {}\n\nbool FlutterWindow::OnCreate() {\n  if (!Win32Window::OnCreate()) {\n    return false;\n  }\n\n  RECT frame = GetClientArea();\n\n  // The size here must match the window dimensions to avoid unnecessary surface\n  // creation / destruction in the startup path.\n  flutter_controller_ = std::make_unique<flutter::FlutterViewController>(\n      frame.right - frame.left, frame.bottom - frame.top, project_);\n  // Ensure that basic setup of the controller was successful.\n  if (!flutter_controller_->engine() || !flutter_controller_->view()) {\n    return false;\n  }\n  RegisterPlugins(flutter_controller_->engine());\n  SetChildContent(flutter_controller_->view()->GetNativeWindow());\n  return true;\n}\n\nvoid FlutterWindow::OnDestroy() {\n  if (flutter_controller_) {\n    flutter_controller_ = nullptr;\n  }\n\n  Win32Window::OnDestroy();\n}\n\nLRESULT\nFlutterWindow::MessageHandler(HWND hwnd, UINT const message,\n                              WPARAM const wparam,\n                              LPARAM const lparam) noexcept {\n  // Give Flutter, including plugins, an opportunity to handle window messages.\n  if (flutter_controller_) {\n    std::optional<LRESULT> result =\n        flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,\n                                                      lparam);\n    if (result) {\n      return *result;\n    }\n  }\n\n  switch (message) {\n    case WM_FONTCHANGE:\n      flutter_controller_->engine()->ReloadSystemFonts();\n      break;\n  }\n\n  return Win32Window::MessageHandler(hwnd, message, wparam, lparam);\n}\n"
  },
  {
    "path": "example/windows/runner/flutter_window.h",
    "content": "#ifndef RUNNER_FLUTTER_WINDOW_H_\n#define RUNNER_FLUTTER_WINDOW_H_\n\n#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n\n#include <memory>\n\n#include \"win32_window.h\"\n\n// A window that does nothing but host a Flutter view.\nclass FlutterWindow : public Win32Window {\n public:\n  // Creates a new FlutterWindow hosting a Flutter view running |project|.\n  explicit FlutterWindow(const flutter::DartProject& project);\n  virtual ~FlutterWindow();\n\n protected:\n  // Win32Window:\n  bool OnCreate() override;\n  void OnDestroy() override;\n  LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,\n                         LPARAM const lparam) noexcept override;\n\n private:\n  // The project to run.\n  flutter::DartProject project_;\n\n  // The Flutter instance hosted by this window.\n  std::unique_ptr<flutter::FlutterViewController> flutter_controller_;\n};\n\n#endif  // RUNNER_FLUTTER_WINDOW_H_\n"
  },
  {
    "path": "example/windows/runner/main.cpp",
    "content": "#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n#include <windows.h>\n\n#include \"flutter_window.h\"\n#include \"utils.h\"\n\nint APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,\n                      _In_ wchar_t *command_line, _In_ int show_command) {\n  // Attach to console when present (e.g., 'flutter run') or create a\n  // new console when running with a debugger.\n  if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {\n    CreateAndAttachConsole();\n  }\n\n  // Initialize COM, so that it is available for use in the library and/or\n  // plugins.\n  ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);\n\n  flutter::DartProject project(L\"data\");\n\n  std::vector<std::string> command_line_arguments =\n      GetCommandLineArguments();\n\n  project.set_dart_entrypoint_arguments(std::move(command_line_arguments));\n\n  FlutterWindow window(project);\n  Win32Window::Point origin(10, 10);\n  Win32Window::Size size(1280, 720);\n  if (!window.CreateAndShow(L\"example\", origin, size)) {\n    return EXIT_FAILURE;\n  }\n  window.SetQuitOnClose(true);\n\n  ::MSG msg;\n  while (::GetMessage(&msg, nullptr, 0, 0)) {\n    ::TranslateMessage(&msg);\n    ::DispatchMessage(&msg);\n  }\n\n  ::CoUninitialize();\n  return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "example/windows/runner/resource.h",
    "content": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by Runner.rc\n//\n#define IDI_APP_ICON                    101\n\n// Next default values for new objects\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NEXT_RESOURCE_VALUE        102\n#define _APS_NEXT_COMMAND_VALUE         40001\n#define _APS_NEXT_CONTROL_VALUE         1001\n#define _APS_NEXT_SYMED_VALUE           101\n#endif\n#endif\n"
  },
  {
    "path": "example/windows/runner/runner.exe.manifest",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n  <application xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n    <windowsSettings>\n      <dpiAwareness xmlns=\"http://schemas.microsoft.com/SMI/2016/WindowsSettings\">PerMonitorV2</dpiAwareness>\n    </windowsSettings>\n  </application>\n  <compatibility xmlns=\"urn:schemas-microsoft-com:compatibility.v1\">\n    <application>\n      <!-- Windows 10 -->\n      <supportedOS Id=\"{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}\"/>\n      <!-- Windows 8.1 -->\n      <supportedOS Id=\"{1f676c76-80e1-4239-95bb-83d0f6d0da78}\"/>\n      <!-- Windows 8 -->\n      <supportedOS Id=\"{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}\"/>\n      <!-- Windows 7 -->\n      <supportedOS Id=\"{35138b9a-5d96-4fbd-8e2d-a2440225f93a}\"/>\n    </application>\n  </compatibility>\n</assembly>\n"
  },
  {
    "path": "example/windows/runner/utils.cpp",
    "content": "#include \"utils.h\"\n\n#include <flutter_windows.h>\n#include <io.h>\n#include <stdio.h>\n#include <windows.h>\n\n#include <iostream>\n\nvoid CreateAndAttachConsole() {\n  if (::AllocConsole()) {\n    FILE *unused;\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stdout)) {\n      _dup2(_fileno(stdout), 1);\n    }\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stderr)) {\n      _dup2(_fileno(stdout), 2);\n    }\n    std::ios::sync_with_stdio();\n    FlutterDesktopResyncOutputStreams();\n  }\n}\n\nstd::vector<std::string> GetCommandLineArguments() {\n  // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.\n  int argc;\n  wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);\n  if (argv == nullptr) {\n    return std::vector<std::string>();\n  }\n\n  std::vector<std::string> command_line_arguments;\n\n  // Skip the first argument as it's the binary name.\n  for (int i = 1; i < argc; i++) {\n    command_line_arguments.push_back(Utf8FromUtf16(argv[i]));\n  }\n\n  ::LocalFree(argv);\n\n  return command_line_arguments;\n}\n\nstd::string Utf8FromUtf16(const wchar_t* utf16_string) {\n  if (utf16_string == nullptr) {\n    return std::string();\n  }\n  int target_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      -1, nullptr, 0, nullptr, nullptr);\n  if (target_length == 0) {\n    return std::string();\n  }\n  std::string utf8_string;\n  utf8_string.resize(target_length);\n  int converted_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      -1, utf8_string.data(),\n      target_length, nullptr, nullptr);\n  if (converted_length == 0) {\n    return std::string();\n  }\n  return utf8_string;\n}\n"
  },
  {
    "path": "example/windows/runner/utils.h",
    "content": "#ifndef RUNNER_UTILS_H_\n#define RUNNER_UTILS_H_\n\n#include <string>\n#include <vector>\n\n// Creates a console for the process, and redirects stdout and stderr to\n// it for both the runner and the Flutter library.\nvoid CreateAndAttachConsole();\n\n// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string\n// encoded in UTF-8. Returns an empty std::string on failure.\nstd::string Utf8FromUtf16(const wchar_t* utf16_string);\n\n// Gets the command line arguments passed in as a std::vector<std::string>,\n// encoded in UTF-8. Returns an empty std::vector<std::string> on failure.\nstd::vector<std::string> GetCommandLineArguments();\n\n#endif  // RUNNER_UTILS_H_\n"
  },
  {
    "path": "example/windows/runner/win32_window.cpp",
    "content": "#include \"win32_window.h\"\n\n#include <flutter_windows.h>\n\n#include \"resource.h\"\n\nnamespace {\n\nconstexpr const wchar_t kWindowClassName[] = L\"FLUTTER_RUNNER_WIN32_WINDOW\";\n\n// The number of Win32Window objects that currently exist.\nstatic int g_active_window_count = 0;\n\nusing EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);\n\n// Scale helper to convert logical scaler values to physical using passed in\n// scale factor\nint Scale(int source, double scale_factor) {\n  return static_cast<int>(source * scale_factor);\n}\n\n// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.\n// This API is only needed for PerMonitor V1 awareness mode.\nvoid EnableFullDpiSupportIfAvailable(HWND hwnd) {\n  HMODULE user32_module = LoadLibraryA(\"User32.dll\");\n  if (!user32_module) {\n    return;\n  }\n  auto enable_non_client_dpi_scaling =\n      reinterpret_cast<EnableNonClientDpiScaling*>(\n          GetProcAddress(user32_module, \"EnableNonClientDpiScaling\"));\n  if (enable_non_client_dpi_scaling != nullptr) {\n    enable_non_client_dpi_scaling(hwnd);\n    FreeLibrary(user32_module);\n  }\n}\n\n}  // namespace\n\n// Manages the Win32Window's window class registration.\nclass WindowClassRegistrar {\n public:\n  ~WindowClassRegistrar() = default;\n\n  // Returns the singleton registar instance.\n  static WindowClassRegistrar* GetInstance() {\n    if (!instance_) {\n      instance_ = new WindowClassRegistrar();\n    }\n    return instance_;\n  }\n\n  // Returns the name of the window class, registering the class if it hasn't\n  // previously been registered.\n  const wchar_t* GetWindowClass();\n\n  // Unregisters the window class. Should only be called if there are no\n  // instances of the window.\n  void UnregisterWindowClass();\n\n private:\n  WindowClassRegistrar() = default;\n\n  static WindowClassRegistrar* instance_;\n\n  bool class_registered_ = false;\n};\n\nWindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;\n\nconst wchar_t* WindowClassRegistrar::GetWindowClass() {\n  if (!class_registered_) {\n    WNDCLASS window_class{};\n    window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);\n    window_class.lpszClassName = kWindowClassName;\n    window_class.style = CS_HREDRAW | CS_VREDRAW;\n    window_class.cbClsExtra = 0;\n    window_class.cbWndExtra = 0;\n    window_class.hInstance = GetModuleHandle(nullptr);\n    window_class.hIcon =\n        LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));\n    window_class.hbrBackground = 0;\n    window_class.lpszMenuName = nullptr;\n    window_class.lpfnWndProc = Win32Window::WndProc;\n    RegisterClass(&window_class);\n    class_registered_ = true;\n  }\n  return kWindowClassName;\n}\n\nvoid WindowClassRegistrar::UnregisterWindowClass() {\n  UnregisterClass(kWindowClassName, nullptr);\n  class_registered_ = false;\n}\n\nWin32Window::Win32Window() {\n  ++g_active_window_count;\n}\n\nWin32Window::~Win32Window() {\n  --g_active_window_count;\n  Destroy();\n}\n\nbool Win32Window::CreateAndShow(const std::wstring& title,\n                                const Point& origin,\n                                const Size& size) {\n  Destroy();\n\n  const wchar_t* window_class =\n      WindowClassRegistrar::GetInstance()->GetWindowClass();\n\n  const POINT target_point = {static_cast<LONG>(origin.x),\n                              static_cast<LONG>(origin.y)};\n  HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);\n  UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);\n  double scale_factor = dpi / 96.0;\n\n  HWND window = CreateWindow(\n      window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,\n      Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),\n      Scale(size.width, scale_factor), Scale(size.height, scale_factor),\n      nullptr, nullptr, GetModuleHandle(nullptr), this);\n\n  if (!window) {\n    return false;\n  }\n\n  return OnCreate();\n}\n\n// static\nLRESULT CALLBACK Win32Window::WndProc(HWND const window,\n                                      UINT const message,\n                                      WPARAM const wparam,\n                                      LPARAM const lparam) noexcept {\n  if (message == WM_NCCREATE) {\n    auto window_struct = reinterpret_cast<CREATESTRUCT*>(lparam);\n    SetWindowLongPtr(window, GWLP_USERDATA,\n                     reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams));\n\n    auto that = static_cast<Win32Window*>(window_struct->lpCreateParams);\n    EnableFullDpiSupportIfAvailable(window);\n    that->window_handle_ = window;\n  } else if (Win32Window* that = GetThisFromHandle(window)) {\n    return that->MessageHandler(window, message, wparam, lparam);\n  }\n\n  return DefWindowProc(window, message, wparam, lparam);\n}\n\nLRESULT\nWin32Window::MessageHandler(HWND hwnd,\n                            UINT const message,\n                            WPARAM const wparam,\n                            LPARAM const lparam) noexcept {\n  switch (message) {\n    case WM_DESTROY:\n      window_handle_ = nullptr;\n      Destroy();\n      if (quit_on_close_) {\n        PostQuitMessage(0);\n      }\n      return 0;\n\n    case WM_DPICHANGED: {\n      auto newRectSize = reinterpret_cast<RECT*>(lparam);\n      LONG newWidth = newRectSize->right - newRectSize->left;\n      LONG newHeight = newRectSize->bottom - newRectSize->top;\n\n      SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,\n                   newHeight, SWP_NOZORDER | SWP_NOACTIVATE);\n\n      return 0;\n    }\n    case WM_SIZE: {\n      RECT rect = GetClientArea();\n      if (child_content_ != nullptr) {\n        // Size and position the child window.\n        MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,\n                   rect.bottom - rect.top, TRUE);\n      }\n      return 0;\n    }\n\n    case WM_ACTIVATE:\n      if (child_content_ != nullptr) {\n        SetFocus(child_content_);\n      }\n      return 0;\n  }\n\n  return DefWindowProc(window_handle_, message, wparam, lparam);\n}\n\nvoid Win32Window::Destroy() {\n  OnDestroy();\n\n  if (window_handle_) {\n    DestroyWindow(window_handle_);\n    window_handle_ = nullptr;\n  }\n  if (g_active_window_count == 0) {\n    WindowClassRegistrar::GetInstance()->UnregisterWindowClass();\n  }\n}\n\nWin32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {\n  return reinterpret_cast<Win32Window*>(\n      GetWindowLongPtr(window, GWLP_USERDATA));\n}\n\nvoid Win32Window::SetChildContent(HWND content) {\n  child_content_ = content;\n  SetParent(content, window_handle_);\n  RECT frame = GetClientArea();\n\n  MoveWindow(content, frame.left, frame.top, frame.right - frame.left,\n             frame.bottom - frame.top, true);\n\n  SetFocus(child_content_);\n}\n\nRECT Win32Window::GetClientArea() {\n  RECT frame;\n  GetClientRect(window_handle_, &frame);\n  return frame;\n}\n\nHWND Win32Window::GetHandle() {\n  return window_handle_;\n}\n\nvoid Win32Window::SetQuitOnClose(bool quit_on_close) {\n  quit_on_close_ = quit_on_close;\n}\n\nbool Win32Window::OnCreate() {\n  // No-op; provided for subclasses.\n  return true;\n}\n\nvoid Win32Window::OnDestroy() {\n  // No-op; provided for subclasses.\n}\n"
  },
  {
    "path": "example/windows/runner/win32_window.h",
    "content": "#ifndef RUNNER_WIN32_WINDOW_H_\n#define RUNNER_WIN32_WINDOW_H_\n\n#include <windows.h>\n\n#include <functional>\n#include <memory>\n#include <string>\n\n// A class abstraction for a high DPI-aware Win32 Window. Intended to be\n// inherited from by classes that wish to specialize with custom\n// rendering and input handling\nclass Win32Window {\n public:\n  struct Point {\n    unsigned int x;\n    unsigned int y;\n    Point(unsigned int x, unsigned int y) : x(x), y(y) {}\n  };\n\n  struct Size {\n    unsigned int width;\n    unsigned int height;\n    Size(unsigned int width, unsigned int height)\n        : width(width), height(height) {}\n  };\n\n  Win32Window();\n  virtual ~Win32Window();\n\n  // Creates and shows a win32 window with |title| and position and size using\n  // |origin| and |size|. New windows are created on the default monitor. Window\n  // sizes are specified to the OS in physical pixels, hence to ensure a\n  // consistent size to will treat the width height passed in to this function\n  // as logical pixels and scale to appropriate for the default monitor. Returns\n  // true if the window was created successfully.\n  bool CreateAndShow(const std::wstring& title,\n                     const Point& origin,\n                     const Size& size);\n\n  // Release OS resources associated with window.\n  void Destroy();\n\n  // Inserts |content| into the window tree.\n  void SetChildContent(HWND content);\n\n  // Returns the backing Window handle to enable clients to set icon and other\n  // window properties. Returns nullptr if the window has been destroyed.\n  HWND GetHandle();\n\n  // If true, closing this window will quit the application.\n  void SetQuitOnClose(bool quit_on_close);\n\n  // Return a RECT representing the bounds of the current client area.\n  RECT GetClientArea();\n\n protected:\n  // Processes and route salient window messages for mouse handling,\n  // size change and DPI. Delegates handling of these to member overloads that\n  // inheriting classes can handle.\n  virtual LRESULT MessageHandler(HWND window,\n                                 UINT const message,\n                                 WPARAM const wparam,\n                                 LPARAM const lparam) noexcept;\n\n  // Called when CreateAndShow is called, allowing subclass window-related\n  // setup. Subclasses should return false if setup fails.\n  virtual bool OnCreate();\n\n  // Called when Destroy is called.\n  virtual void OnDestroy();\n\n private:\n  friend class WindowClassRegistrar;\n\n  // OS callback called by message pump. Handles the WM_NCCREATE message which\n  // is passed when the non-client area is being created and enables automatic\n  // non-client DPI scaling so that the non-client area automatically\n  // responsponds to changes in DPI. All other messages are handled by\n  // MessageHandler.\n  static LRESULT CALLBACK WndProc(HWND const window,\n                                  UINT const message,\n                                  WPARAM const wparam,\n                                  LPARAM const lparam) noexcept;\n\n  // Retrieves a class instance pointer for |window|\n  static Win32Window* GetThisFromHandle(HWND const window) noexcept;\n\n  bool quit_on_close_ = false;\n\n  // window handle for top level window.\n  HWND window_handle_ = nullptr;\n\n  // window handle for hosted content.\n  HWND child_content_ = nullptr;\n};\n\n#endif  // RUNNER_WIN32_WINDOW_H_\n"
  },
  {
    "path": "flutter_qjs.iml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" inherit-compiler-output=\"true\">\n    <exclude-output />\n    <content url=\"file://$MODULE_DIR$\">\n      <sourceFolder url=\"file://$MODULE_DIR$/lib\" isTestSource=\"false\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.idea\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/build\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/.dart_tool\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/.pub\" />\n      <excludeFolder url=\"file://$MODULE_DIR$/example/build\" />\n    </content>\n    <orderEntry type=\"jdk\" jdkName=\"11\" jdkType=\"JavaSDK\" />\n    <orderEntry type=\"sourceFolder\" forTests=\"false\" />\n    <orderEntry type=\"library\" name=\"Dart SDK\" level=\"project\" />\n    <orderEntry type=\"library\" name=\"Flutter Plugins\" level=\"project\" />\n  </component>\n</module>"
  },
  {
    "path": "ios/.gitignore",
    "content": ".idea/\n.vagrant/\n.sconsign.dblite\n.svn/\n\n.DS_Store\n*.swp\nprofile\n\nDerivedData/\nbuild/\nGeneratedPluginRegistrant.h\nGeneratedPluginRegistrant.m\n\n.generated/\n\n*.pbxuser\n*.mode1v3\n*.mode2v3\n*.perspectivev3\n\n!default.pbxuser\n!default.mode1v3\n!default.mode2v3\n!default.perspectivev3\n\nxcuserdata\n\n*.moved-aside\n\n*.pyc\n*sync/\nIcon?\n.tags*\n\n/Flutter/Generated.xcconfig\n/Flutter/flutter_export_environment.sh"
  },
  {
    "path": "ios/Assets/.gitkeep",
    "content": ""
  },
  {
    "path": "ios/Classes/FlutterQjsPlugin.h",
    "content": "#import <Flutter/Flutter.h>\n\n@interface FlutterQjsPlugin : NSObject<FlutterPlugin>\n@end\n"
  },
  {
    "path": "ios/Classes/FlutterQjsPlugin.m",
    "content": "#import \"FlutterQjsPlugin.h\"\n#if __has_include(<flutter_qjs/flutter_qjs-Swift.h>)\n#import <flutter_qjs/flutter_qjs-Swift.h>\n#else\n// Support project import fallback if the generated compatibility header\n// is not copied when this plugin is created as a library.\n// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816\n#import \"flutter_qjs-Swift.h\"\n#endif\n\n@implementation FlutterQjsPlugin\n+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {\n  [SwiftFlutterQjsPlugin registerWithRegistrar:registrar];\n}\n@end\n"
  },
  {
    "path": "ios/Classes/SwiftFlutterQjsPlugin.swift",
    "content": "import Flutter\nimport UIKit\n\npublic class SwiftFlutterQjsPlugin: NSObject, FlutterPlugin {\n  public static func register(with registrar: FlutterPluginRegistrar) {\n    let channel = FlutterMethodChannel(name: \"flutter_qjs\", binaryMessenger: registrar.messenger())\n    let instance = SwiftFlutterQjsPlugin()\n    registrar.addMethodCallDelegate(instance, channel: channel)\n  }\n\n  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {\n    result(\"iOS \" + UIDevice.current.systemVersion)\n  }\n}\n"
  },
  {
    "path": "ios/flutter_qjs.podspec",
    "content": "#\n# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.\n# Run `pod lib lint flutter_qjs.podspec' to validate before publishing.\n#\nPod::Spec.new do |s|\n  s.name             = 'flutter_qjs'\n  s.version          = '0.0.1'\n  s.summary          = 'A quickjs engine for flutter.'\n  s.description      = <<-DESC\nThis plugin is a simple js engine for flutter using the `quickjs` project. Plugin currently supports all the platforms except web!\n                       DESC\n  s.homepage         = 'https://github.com/ekibun/flutter_qjs'\n  s.license          = { :file => '../LICENSE' }\n  s.author           = { 'ekibun' => 'soekibun@gmail.com' }\n  s.source           = { :path => '.' }\n  s.compiler_flags = '-DDUMP_LEAKS'\n  s.source_files = ['Classes/**/*', 'cxx/*.{c,cpp}']\n  s.dependency 'Flutter'\n  s.platform = :ios, '8.0'\n\n  # Flutter.framework does not contain a i386 slice.\n  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }\n  s.prepare_command = 'sh ../cxx/prebuild.sh'\n  s.swift_version = '5.0'\nend\n"
  },
  {
    "path": "lib/flutter_qjs.dart",
    "content": "import 'dart:async';\nimport 'dart:ffi';\nimport 'dart:io';\nimport 'dart:isolate';\nimport 'dart:typed_data';\nimport 'package:ffi/ffi.dart';\nimport 'src/ffi.dart';\nexport 'src/ffi.dart' show JSEvalFlag, JSRef;\n\npart 'src/engine.dart';\npart 'src/isolate.dart';\npart 'src/wrapper.dart';\npart 'src/object.dart';\n"
  },
  {
    "path": "lib/src/engine.dart",
    "content": "/*\n * @Description: quickjs engine\n * @Author: ekibun\n * @Date: 2020-08-08 08:29:09\n * @LastEditors: ekibun\n * @LastEditTime: 2020-10-06 23:47:13\n */\npart of '../flutter_qjs.dart';\n\n/// Handler function to manage js module.\ntypedef _JsModuleHandler = String Function(String name);\n\n/// Handler to manage unhandled promise rejection.\ntypedef _JsHostPromiseRejectionHandler = void Function(dynamic reason);\n\n/// Quickjs engine for flutter.\nclass FlutterQjs {\n  Pointer<JSRuntime>? _rt;\n  Pointer<JSContext>? _ctx;\n\n  /// Max stack size for quickjs.\n  final int? stackSize;\n\n  /// Max stack size for quickjs.\n  final int? timeout;\n\n  /// Max memory for quickjs.\n  final int? memoryLimit;\n\n  /// Message Port for event loop. Close it to stop dispatching event loop.\n  ReceivePort port = ReceivePort();\n\n  /// Handler function to manage js module.\n  final _JsModuleHandler? moduleHandler;\n\n  /// Handler function to manage js module.\n  final _JsHostPromiseRejectionHandler? hostPromiseRejectionHandler;\n\n  FlutterQjs({\n    this.moduleHandler,\n    this.stackSize,\n    this.timeout,\n    this.memoryLimit,\n    this.hostPromiseRejectionHandler,\n  });\n\n  _ensureEngine() {\n    if (_rt != null) return;\n    final rt = jsNewRuntime((ctx, type, ptr) {\n      try {\n        switch (type) {\n          case JSChannelType.METHON:\n            final pdata = ptr.cast<Pointer<JSValue>>();\n            final argc = pdata.elementAt(1).value.cast<Int32>().value;\n            final pargs = [];\n            for (var i = 0; i < argc; ++i) {\n              pargs.add(_jsToDart(\n                ctx,\n                Pointer.fromAddress(\n                  pdata.elementAt(2).value.address + sizeOfJSValue * i,\n                ),\n              ));\n            }\n            final JSInvokable func = _jsToDart(\n              ctx,\n              pdata.elementAt(3).value,\n            );\n            return _dartToJs(\n                ctx,\n                func.invoke(\n                  pargs,\n                  _jsToDart(ctx, pdata.elementAt(0).value),\n                ));\n          case JSChannelType.MODULE:\n            if (moduleHandler == null) throw JSError('No ModuleHandler');\n            final ret = moduleHandler!(\n              ptr.cast<Utf8>().toDartString(),\n            ).toNativeUtf8();\n            Future.microtask(() {\n              malloc.free(ret);\n            });\n            return ret.cast();\n          case JSChannelType.PROMISE_TRACK:\n            final err = _parseJSException(ctx, ptr);\n            if (hostPromiseRejectionHandler != null) {\n              hostPromiseRejectionHandler!(err);\n            } else {\n              print('unhandled promise rejection: $err');\n            }\n            return nullptr;\n          case JSChannelType.FREE_OBJECT:\n            final rt = ctx.cast<JSRuntime>();\n            _DartObject.fromAddress(rt, ptr.address)?.free();\n            return nullptr;\n        }\n        throw JSError('call channel with wrong type');\n      } catch (e) {\n        if (type == JSChannelType.FREE_OBJECT) {\n          print('DartObject release error: $e');\n          return nullptr;\n        }\n        if (type == JSChannelType.MODULE) {\n          print('host Promise Rejection Handler error: $e');\n          return nullptr;\n        }\n        final throwObj = _dartToJs(ctx, e);\n        final err = jsThrow(ctx, throwObj);\n        jsFreeValue(ctx, throwObj);\n        if (type == JSChannelType.MODULE) {\n          jsFreeValue(ctx, err);\n          return nullptr;\n        }\n        return err;\n      }\n    }, timeout ?? 0, port);\n    final stackSize = this.stackSize ?? 0;\n    if (stackSize > 0) jsSetMaxStackSize(rt, stackSize);\n    final memoryLimit = this.memoryLimit ?? 0;\n    if (memoryLimit > 0) jsSetMemoryLimit(rt, memoryLimit);\n    _rt = rt;\n    _ctx = jsNewContext(rt);\n  }\n\n  /// Free Runtime and Context which can be recreate when evaluate again.\n  close() {\n    final rt = _rt;\n    final ctx = _ctx;\n    _rt = null;\n    _ctx = null;\n    if (ctx != null) jsFreeContext(ctx);\n    if (rt == null) return;\n    _executePendingJob();\n    try {\n      jsFreeRuntime(rt);\n    } on String catch (e) {\n      throw JSError(e);\n    }\n  }\n\n  void _executePendingJob() {\n    final rt = _rt;\n    final ctx = _ctx;\n    if (rt == null || ctx == null) return;\n    while (true) {\n      int err = jsExecutePendingJob(rt);\n      if (err <= 0) {\n        if (err < 0) print(_parseJSException(ctx));\n        break;\n      }\n    }\n  }\n\n  /// Dispatch JavaScript Event loop.\n  Future<void> dispatch() async {\n    await for (final _ in port) {\n      _executePendingJob();\n    }\n  }\n\n  /// Evaluate js script.\n  dynamic evaluate(\n    String command, {\n    String? name,\n    int? evalFlags,\n  }) {\n    _ensureEngine();\n    final ctx = _ctx!;\n    final jsval = jsEval(\n      ctx,\n      command,\n      name ?? '<eval>',\n      evalFlags ?? JSEvalFlag.GLOBAL,\n    );\n    if (jsIsException(jsval) != 0) {\n      jsFreeValue(ctx, jsval);\n      throw _parseJSException(ctx);\n    }\n    final result = _jsToDart(ctx, jsval);\n    jsFreeValue(ctx, jsval);\n    return result;\n  }\n}\n"
  },
  {
    "path": "lib/src/ffi.dart",
    "content": "/*\n * @Description: ffi\n * @Author: ekibun\n * @Date: 2020-09-19 10:29:04\n * @LastEditors: ekibun\n * @LastEditTime: 2020-12-02 11:14:35\n */\nimport 'dart:ffi';\nimport 'dart:io';\nimport 'dart:isolate';\nimport 'package:ffi/ffi.dart';\n\nextension ListFirstWhere<T> on Iterable<T> {\n  T? firstWhereOrNull(bool Function(T) test) {\n    try {\n      return firstWhere(test);\n    } on StateError {\n      return null;\n    }\n  }\n}\n\nabstract class JSRef {\n  int _refCount = 0;\n  void dup() {\n    _refCount++;\n  }\n\n  void free() {\n    _refCount--;\n    if (_refCount < 0) destroy();\n  }\n\n  void destroy();\n\n  static void freeRecursive(dynamic obj) {\n    _callRecursive(obj, (ref) => ref.free());\n  }\n\n  static void dupRecursive(dynamic obj) {\n    _callRecursive(obj, (ref) => ref.dup());\n  }\n\n  static void _callRecursive(\n    dynamic obj,\n    void Function(JSRef) cb, [\n    Set? cache,\n  ]) {\n    if (obj == null) return;\n    if (cache == null) cache = Set();\n    if (cache.contains(obj)) return;\n    if (obj is List) {\n      cache.add(obj);\n      List.from(obj).forEach((e) => _callRecursive(e, cb, cache));\n    }\n    if (obj is Map) {\n      cache.add(obj);\n      obj.values.toList().forEach((e) => _callRecursive(e, cb, cache));\n    }\n    if (obj is JSRef) {\n      cb(obj);\n    }\n  }\n}\n\nabstract class JSRefLeakable {}\n\nclass JSEvalFlag {\n  static const GLOBAL = 0 << 0;\n  static const MODULE = 1 << 0;\n}\n\nclass JSChannelType {\n  static const METHON = 0;\n  static const MODULE = 1;\n  static const PROMISE_TRACK = 2;\n  static const FREE_OBJECT = 3;\n}\n\nclass JSProp {\n  static const CONFIGURABLE = (1 << 0);\n  static const WRITABLE = (1 << 1);\n  static const ENUMERABLE = (1 << 2);\n  static const C_W_E = (CONFIGURABLE | WRITABLE | ENUMERABLE);\n}\n\nclass JSTag {\n  static const FIRST = -11; /* first negative tag */\n  static const BIG_DECIMAL = -11;\n  static const BIG_INT = -10;\n  static const BIG_FLOAT = -9;\n  static const SYMBOL = -8;\n  static const STRING = -7;\n  static const MODULE = -3; /* used internally */\n  static const FUNCTION_BYTECODE = -2; /* used internally */\n  static const OBJECT = -1;\n\n  static const INT = 0;\n  static const BOOL = 1;\n  static const NULL = 2;\n  static const UNDEFINED = 3;\n  static const UNINITIALIZED = 4;\n  static const CATCH_OFFSET = 5;\n  static const EXCEPTION = 6;\n  static const FLOAT64 = 7;\n}\n\nabstract class JSValue extends Opaque {}\n\nabstract class JSContext extends Opaque {}\n\nabstract class JSRuntime extends Opaque {}\n\nabstract class JSPropertyEnum extends Opaque {}\n\nfinal DynamicLibrary _qjsLib = Platform.environment['FLUTTER_TEST'] == 'true'\n    ? (Platform.isWindows\n        ? DynamicLibrary.open('test/build/Debug/ffiquickjs.dll')\n        : Platform.isMacOS\n            ? DynamicLibrary.open('test/build/libffiquickjs.dylib')\n            : DynamicLibrary.open('test/build/libffiquickjs.so'))\n    : (Platform.isWindows\n        ? DynamicLibrary.open('flutter_qjs_plugin.dll')\n        : Platform.isAndroid\n            ? DynamicLibrary.open('libqjs.so')\n            : DynamicLibrary.process());\n\n/// DLLEXPORT JSValue *jsThrow(JSContext *ctx, JSValue *obj)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> obj,\n) jsThrow = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsThrow')\n    .asFunction();\n\n/// JSValue *jsEXCEPTION()\nfinal Pointer<JSValue> Function() jsEXCEPTION = _qjsLib\n    .lookup<NativeFunction<Pointer<JSValue> Function()>>('jsEXCEPTION')\n    .asFunction();\n\n/// JSValue *jsUNDEFINED()\nfinal Pointer<JSValue> Function() jsUNDEFINED = _qjsLib\n    .lookup<NativeFunction<Pointer<JSValue> Function()>>('jsUNDEFINED')\n    .asFunction();\n\ntypedef _JSChannel = Pointer<JSValue> Function(\n    Pointer<JSContext> ctx, int method, Pointer<JSValue> argv);\ntypedef _JSChannelNative = Pointer<JSValue> Function(\n    Pointer<JSContext> ctx, IntPtr method, Pointer<JSValue> argv);\n\n/// JSRuntime *jsNewRuntime(JSChannel channel)\nfinal Pointer<JSRuntime> Function(\n  Pointer<NativeFunction<_JSChannelNative>>,\n  int,\n) _jsNewRuntime = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSRuntime> Function(\n      Pointer<NativeFunction<_JSChannelNative>>,\n      Int64,\n    )>>('jsNewRuntime')\n    .asFunction();\n\nclass _RuntimeOpaque {\n  final _JSChannel _channel;\n  List<JSRef> _ref = [];\n  final ReceivePort _port;\n  int? _dartObjectClassId;\n  _RuntimeOpaque(this._channel, this._port);\n\n  int? get dartObjectClassId => _dartObjectClassId;\n\n  void addRef(JSRef ref) => _ref.add(ref);\n\n  bool removeRef(JSRef ref) => _ref.remove(ref);\n\n  JSRef? getRef(bool Function(JSRef ref) test) {\n    return _ref.firstWhereOrNull(test);\n  }\n}\n\nfinal Map<Pointer<JSRuntime>, _RuntimeOpaque> runtimeOpaques = Map();\n\nPointer<JSValue>? channelDispacher(\n  Pointer<JSContext> ctx,\n  int type,\n  Pointer<JSValue> argv,\n) {\n  final rt = type == JSChannelType.FREE_OBJECT\n      ? ctx.cast<JSRuntime>()\n      : jsGetRuntime(ctx);\n  return runtimeOpaques[rt]?._channel(ctx, type, argv);\n}\n\nPointer<JSRuntime> jsNewRuntime(\n  _JSChannel callback,\n  int timeout,\n  ReceivePort port,\n) {\n  final rt = _jsNewRuntime(Pointer.fromFunction(channelDispacher), timeout);\n  runtimeOpaques[rt] = _RuntimeOpaque(callback, port);\n  return rt;\n}\n\n/// DLLEXPORT void jsSetMaxStackSize(JSRuntime *rt, size_t stack_size)\nfinal void Function(\n  Pointer<JSRuntime>,\n  int,\n) jsSetMaxStackSize = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSRuntime>,\n      IntPtr,\n    )>>('jsSetMaxStackSize')\n    .asFunction();\n\n/// DLLEXPORT void jsSetMemoryLimit(JSRuntime *rt, size_t limit);\nfinal void Function(\n  Pointer<JSRuntime>,\n  int,\n) jsSetMemoryLimit = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSRuntime>,\n      IntPtr,\n    )>>('jsSetMemoryLimit')\n    .asFunction();\n\n/// void jsFreeRuntime(JSRuntime *rt)\nfinal void Function(\n  Pointer<JSRuntime>,\n) _jsFreeRuntime = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSRuntime>,\n    )>>('jsFreeRuntime')\n    .asFunction();\n\nvoid jsFreeRuntime(\n  Pointer<JSRuntime> rt,\n) {\n  final referenceleak = <String>[];\n  final opaque = runtimeOpaques[rt];\n  if (opaque != null) {\n    while (true) {\n      final ref = opaque._ref.firstWhereOrNull((ref) => ref is JSRefLeakable);\n      if (ref == null) break;\n      ref.destroy();\n      runtimeOpaques[rt]?._ref.remove(ref);\n    }\n    while (opaque._ref.isNotEmpty) {\n      final ref = opaque._ref.first;\n      final objStrs = ref.toString().split('\\n');\n      final objStr = objStrs.length > 0 ? objStrs[0] + \" ...\" : objStrs[0];\n      referenceleak.add(\n          \"  ${identityHashCode(ref)}\\t${ref._refCount + 1}\\t${ref.runtimeType.toString()}\\t$objStr\");\n      ref.destroy();\n    }\n  }\n  _jsFreeRuntime(rt);\n  if (referenceleak.length > 0) {\n    throw ('reference leak:\\n    ADDR\\tREF\\tTYPE\\tPROP\\n' +\n        referenceleak.join('\\n'));\n  }\n}\n\n/// JSValue *jsNewCFunction(JSContext *ctx, JSValue *funcData)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> funcData,\n) jsNewCFunction = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsNewCFunction')\n    .asFunction();\n\n/// JSContext *jsNewContext(JSRuntime *rt)\nfinal Pointer<JSContext> Function(\n  Pointer<JSRuntime> rt,\n) _jsNewContext = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSContext> Function(\n      Pointer<JSRuntime>,\n    )>>('jsNewContext')\n    .asFunction();\n\nPointer<JSContext> jsNewContext(Pointer<JSRuntime> rt) {\n  final ctx = _jsNewContext(rt);\n  if (ctx.address == 0) throw Exception('Context create failed!');\n  final runtimeOpaque = runtimeOpaques[rt];\n  if (runtimeOpaque == null) throw Exception('Runtime has been released!');\n  runtimeOpaque._dartObjectClassId = jsNewClass(ctx, 'DartObject');\n  return ctx;\n}\n\n/// void jsFreeContext(JSContext *ctx)\nfinal void Function(\n  Pointer<JSContext>,\n) jsFreeContext = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSContext>,\n    )>>('jsFreeContext')\n    .asFunction();\n\n/// JSRuntime *jsGetRuntime(JSContext *ctx)\nfinal Pointer<JSRuntime> Function(\n  Pointer<JSContext>,\n) jsGetRuntime = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSRuntime> Function(\n      Pointer<JSContext>,\n    )>>('jsGetRuntime')\n    .asFunction();\n\n/// JSValue *jsEval(JSContext *ctx, const char *input, size_t input_len, const char *filename, int eval_flags)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<Utf8> input,\n  int inputLen,\n  Pointer<Utf8> filename,\n  int evalFlags,\n) _jsEval = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<Utf8>,\n      IntPtr,\n      Pointer<Utf8>,\n      Int32,\n    )>>('jsEval')\n    .asFunction();\n\nPointer<JSValue> jsEval(\n  Pointer<JSContext> ctx,\n  String input,\n  String filename,\n  int evalFlags,\n) {\n  final utf8input = input.toNativeUtf8();\n  final utf8filename = filename.toNativeUtf8();\n  final val = _jsEval(\n    ctx,\n    utf8input,\n    utf8input.length,\n    utf8filename,\n    evalFlags,\n  );\n  malloc.free(utf8input);\n  malloc.free(utf8filename);\n  runtimeOpaques[jsGetRuntime(ctx)]?._port.sendPort.send(#eval);\n  return val;\n}\n\n/// DLLEXPORT int32_t jsValueGetTag(JSValue *val)\nfinal int Function(\n  Pointer<JSValue> val,\n) jsValueGetTag = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSValue>,\n    )>>('jsValueGetTag')\n    .asFunction();\n\n/// void *jsValueGetPtr(JSValue *val)\nfinal int Function(\n  Pointer<JSValue> val,\n) jsValueGetPtr = _qjsLib\n    .lookup<\n        NativeFunction<\n            IntPtr Function(\n      Pointer<JSValue>,\n    )>>('jsValueGetPtr')\n    .asFunction();\n\n/// DLLEXPORT bool jsTagIsFloat64(int32_t tag)\nfinal int Function(\n  int val,\n) jsTagIsFloat64 = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Int32,\n    )>>('jsTagIsFloat64')\n    .asFunction();\n\n/// JSValue *jsNewBool(JSContext *ctx, int val)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  int val,\n) jsNewBool = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Int32,\n    )>>('jsNewBool')\n    .asFunction();\n\n/// JSValue *jsNewInt64(JSContext *ctx, int64_t val)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  int val,\n) jsNewInt64 = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Int64,\n    )>>('jsNewInt64')\n    .asFunction();\n\n/// JSValue *jsNewFloat64(JSContext *ctx, double val)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  double val,\n) jsNewFloat64 = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Double,\n    )>>('jsNewFloat64')\n    .asFunction();\n\n/// JSValue *jsNewString(JSContext *ctx, const char *str)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<Utf8> str,\n) _jsNewString = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<Utf8>,\n    )>>('jsNewString')\n    .asFunction();\n\nPointer<JSValue> jsNewString(\n  Pointer<JSContext> ctx,\n  String str,\n) {\n  final utf8str = str.toNativeUtf8();\n  final jsStr = _jsNewString(ctx, utf8str);\n  malloc.free(utf8str);\n  return jsStr;\n}\n\n/// JSValue *jsNewArrayBufferCopy(JSContext *ctx, const uint8_t *buf, size_t len)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<Uint8> buf,\n  int len,\n) jsNewArrayBufferCopy = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<Uint8>,\n      IntPtr,\n    )>>('jsNewArrayBufferCopy')\n    .asFunction();\n\n/// JSValue *jsNewArray(JSContext *ctx)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n) jsNewArray = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n    )>>('jsNewArray')\n    .asFunction();\n\n/// JSValue *jsNewObject(JSContext *ctx)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n) jsNewObject = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n    )>>('jsNewObject')\n    .asFunction();\n\n/// void jsFreeValue(JSContext *ctx, JSValue *val, int32_t free)\nfinal void Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n  int free,\n) _jsFreeValue = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n      Int32,\n    )>>('jsFreeValue')\n    .asFunction();\n\nvoid jsFreeValue(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val, {\n  bool free = true,\n}) {\n  _jsFreeValue(ctx, val, free ? 1 : 0);\n}\n\n/// void jsFreeValue(JSRuntime *rt, JSValue *val, int32_t free)\nfinal void Function(\n  Pointer<JSRuntime> rt,\n  Pointer<JSValue> val,\n  int free,\n) _jsFreeValueRT = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSRuntime>,\n      Pointer<JSValue>,\n      Int32,\n    )>>('jsFreeValueRT')\n    .asFunction();\n\nvoid jsFreeValueRT(\n  Pointer<JSRuntime> rt,\n  Pointer<JSValue> val, {\n  bool free = true,\n}) {\n  _jsFreeValueRT(rt, val, free ? 1 : 0);\n}\n\n/// JSValue *jsDupValue(JSContext *ctx, JSValueConst *v)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsDupValue = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsDupValue')\n    .asFunction();\n\n/// JSValue *jsDupValueRT(JSRuntime *rt, JSValue *v)\nfinal Pointer<JSValue> Function(\n  Pointer<JSRuntime> rt,\n  Pointer<JSValue> val,\n) jsDupValueRT = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSRuntime>,\n      Pointer<JSValue>,\n    )>>('jsDupValueRT')\n    .asFunction();\n\n/// int32_t jsToBool(JSContext *ctx, JSValueConst *val)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsToBool = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsToBool')\n    .asFunction();\n\n/// int64_t jsToFloat64(JSContext *ctx, JSValueConst *val)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsToInt64 = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int64 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsToInt64')\n    .asFunction();\n\n/// double jsToFloat64(JSContext *ctx, JSValueConst *val)\nfinal double Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsToFloat64 = _qjsLib\n    .lookup<\n        NativeFunction<\n            Double Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsToFloat64')\n    .asFunction();\n\n/// const char *jsToCString(JSContext *ctx, JSValue *val)\nfinal Pointer<Utf8> Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) _jsToCString = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<Utf8> Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsToCString')\n    .asFunction();\n\n/// void jsFreeCString(JSContext *ctx, const char *ptr)\nfinal void Function(\n  Pointer<JSContext> ctx,\n  Pointer<Utf8> val,\n) jsFreeCString = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSContext>,\n      Pointer<Utf8>,\n    )>>('jsFreeCString')\n    .asFunction();\n\nString jsToCString(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) {\n  final ptr = _jsToCString(ctx, val);\n  if (ptr.address == 0) throw Exception('JSValue cannot convert to string');\n  final str = ptr.toDartString();\n  jsFreeCString(ctx, ptr);\n  return str;\n}\n\n/// DLLEXPORT uint32_t jsNewClass(JSContext *ctx, const char *name)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<Utf8> name,\n) _jsNewClass = _qjsLib\n    .lookup<\n        NativeFunction<\n            Uint32 Function(\n      Pointer<JSContext>,\n      Pointer<Utf8>,\n    )>>('jsNewClass')\n    .asFunction();\n\nint jsNewClass(\n  Pointer<JSContext> ctx,\n  String name,\n) {\n  final utf8name = name.toNativeUtf8();\n  final val = _jsNewClass(\n    ctx,\n    utf8name,\n  );\n  malloc.free(utf8name);\n  return val;\n}\n\n/// DLLEXPORT JSValue *jsNewObjectClass(JSContext *ctx, uint32_t QJSClassId, void *opaque)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  int classId,\n  int opaque,\n) jsNewObjectClass = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Uint32,\n      IntPtr,\n    )>>('jsNewObjectClass')\n    .asFunction();\n\n/// DLLEXPORT void *jsGetObjectOpaque(JSValue *obj, uint32_t classid)\nfinal int Function(\n  Pointer<JSValue> obj,\n  int classid,\n) jsGetObjectOpaque = _qjsLib\n    .lookup<\n        NativeFunction<\n            IntPtr Function(\n      Pointer<JSValue>,\n      Uint32,\n    )>>('jsGetObjectOpaque')\n    .asFunction();\n\n/// uint8_t *jsGetArrayBuffer(JSContext *ctx, size_t *psize, JSValueConst *obj)\nfinal Pointer<Uint8> Function(\n  Pointer<JSContext> ctx,\n  Pointer<IntPtr> psize,\n  Pointer<JSValue> val,\n) jsGetArrayBuffer = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<Uint8> Function(\n      Pointer<JSContext>,\n      Pointer<IntPtr>,\n      Pointer<JSValue>,\n    )>>('jsGetArrayBuffer')\n    .asFunction();\n\n/// int32_t jsIsFunction(JSContext *ctx, JSValueConst *val)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsIsFunction = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsIsFunction')\n    .asFunction();\n\n/// int32_t jsIsPromise(JSContext *ctx, JSValueConst *val)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsIsPromise = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsIsPromise')\n    .asFunction();\n\n/// int32_t jsIsArray(JSContext *ctx, JSValueConst *val)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsIsArray = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsIsArray')\n    .asFunction();\n\n/// DLLEXPORT int32_t jsIsError(JSContext *ctx, JSValueConst *val);\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsIsError = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsIsError')\n    .asFunction();\n\n/// DLLEXPORT JSValue *jsNewError(JSContext *ctx);\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n) jsNewError = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n    )>>('jsNewError')\n    .asFunction();\n\n/// JSValue *jsGetProperty(JSContext *ctx, JSValueConst *this_obj,\n///                           JSAtom prop)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> thisObj,\n  int prop,\n) jsGetProperty = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n      Uint32,\n    )>>('jsGetProperty')\n    .asFunction();\n\n/// int jsDefinePropertyValue(JSContext *ctx, JSValueConst *this_obj,\n///                           JSAtom prop, JSValue *val, int flags)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> thisObj,\n  int prop,\n  Pointer<JSValue> val,\n  int flag,\n) jsDefinePropertyValue = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n      Uint32,\n      Pointer<JSValue>,\n      Int32,\n    )>>('jsDefinePropertyValue')\n    .asFunction();\n\n/// void jsFreeAtom(JSContext *ctx, JSAtom v)\nfinal void Function(\n  Pointer<JSContext> ctx,\n  int v,\n) jsFreeAtom = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSContext>,\n      Uint32,\n    )>>('jsFreeAtom')\n    .asFunction();\n\n/// JSAtom jsValueToAtom(JSContext *ctx, JSValueConst *val)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> val,\n) jsValueToAtom = _qjsLib\n    .lookup<\n        NativeFunction<\n            Uint32 Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsValueToAtom')\n    .asFunction();\n\n/// JSValue *jsAtomToValue(JSContext *ctx, JSAtom val)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  int val,\n) jsAtomToValue = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Uint32,\n    )>>('jsAtomToValue')\n    .asFunction();\n\n/// int jsGetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab,\n///                           uint32_t *plen, JSValueConst *obj, int flags)\nfinal int Function(\n  Pointer<JSContext> ctx,\n  Pointer<Pointer<JSPropertyEnum>> ptab,\n  Pointer<Uint32> plen,\n  Pointer<JSValue> obj,\n  int flags,\n) jsGetOwnPropertyNames = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSContext>,\n      Pointer<Pointer<JSPropertyEnum>>,\n      Pointer<Uint32>,\n      Pointer<JSValue>,\n      Int32,\n    )>>('jsGetOwnPropertyNames')\n    .asFunction();\n\n/// JSAtom jsPropertyEnumGetAtom(JSPropertyEnum *ptab, int i)\nfinal int Function(\n  Pointer<JSPropertyEnum> ptab,\n  int i,\n) jsPropertyEnumGetAtom = _qjsLib\n    .lookup<\n        NativeFunction<\n            Uint32 Function(\n      Pointer<JSPropertyEnum>,\n      Int32,\n    )>>('jsPropertyEnumGetAtom')\n    .asFunction();\n\n/// uint32_t sizeOfJSValue()\nfinal int Function() _sizeOfJSValue = _qjsLib\n    .lookup<NativeFunction<Uint32 Function()>>('sizeOfJSValue')\n    .asFunction();\n\nfinal sizeOfJSValue = _sizeOfJSValue();\n\n/// void setJSValueList(JSValue *list, int i, JSValue *val)\nfinal void Function(\n  Pointer<JSValue> list,\n  int i,\n  Pointer<JSValue> val,\n) setJSValueList = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSValue>,\n      Uint32,\n      Pointer<JSValue>,\n    )>>('setJSValueList')\n    .asFunction();\n\n/// JSValue *jsCall(JSContext *ctx, JSValueConst *func_obj, JSValueConst *this_obj,\n///                 int argc, JSValueConst *argv)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> funcObj,\n  Pointer<JSValue> thisObj,\n  int argc,\n  Pointer<JSValue> argv,\n) _jsCall = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n      Pointer<JSValue>,\n      Int32,\n      Pointer<JSValue>,\n    )>>('jsCall')\n    .asFunction();\n\nPointer<JSValue> jsCall(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> funcObj,\n  Pointer<JSValue> thisObj,\n  List<Pointer<JSValue>> argv,\n) {\n  final jsArgs = calloc<Uint8>(\n    argv.length > 0 ? sizeOfJSValue * argv.length : 1,\n  ).cast<JSValue>();\n  for (int i = 0; i < argv.length; ++i) {\n    Pointer<JSValue> jsArg = argv[i];\n    setJSValueList(jsArgs, i, jsArg);\n  }\n  final func1 = jsDupValue(ctx, funcObj);\n  final _thisObj = thisObj;\n  final jsRet = _jsCall(ctx, funcObj, _thisObj, argv.length, jsArgs);\n  jsFreeValue(ctx, func1);\n  malloc.free(jsArgs);\n  runtimeOpaques[jsGetRuntime(ctx)]?._port.sendPort.send(#call);\n  return jsRet;\n}\n\n/// int jsIsException(JSValueConst *val)\nfinal int Function(\n  Pointer<JSValue> val,\n) jsIsException = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSValue>,\n    )>>('jsIsException')\n    .asFunction();\n\n/// JSValue *jsGetException(JSContext *ctx)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n) jsGetException = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n    )>>('jsGetException')\n    .asFunction();\n\n/// int jsExecutePendingJob(JSRuntime *rt)\nfinal int Function(\n  Pointer<JSRuntime> ctx,\n) jsExecutePendingJob = _qjsLib\n    .lookup<\n        NativeFunction<\n            Int32 Function(\n      Pointer<JSRuntime>,\n    )>>('jsExecutePendingJob')\n    .asFunction();\n\n/// JSValue *jsNewPromiseCapability(JSContext *ctx, JSValue *resolving_funcs)\nfinal Pointer<JSValue> Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> resolvingFuncs,\n) jsNewPromiseCapability = _qjsLib\n    .lookup<\n        NativeFunction<\n            Pointer<JSValue> Function(\n      Pointer<JSContext>,\n      Pointer<JSValue>,\n    )>>('jsNewPromiseCapability')\n    .asFunction();\n\n/// void jsFree(JSContext *ctx, void *ptab)\nfinal void Function(\n  Pointer<JSContext> ctx,\n  Pointer<JSPropertyEnum> ptab,\n) jsFree = _qjsLib\n    .lookup<\n        NativeFunction<\n            Void Function(\n      Pointer<JSContext>,\n      Pointer<JSPropertyEnum>,\n    )>>('jsFree')\n    .asFunction();\n"
  },
  {
    "path": "lib/src/isolate.dart",
    "content": "/*\n * @Description: isolate\n * @Author: ekibun\n * @Date: 2020-10-02 13:49:03\n * @LastEditors: ekibun\n * @LastEditTime: 2020-10-03 22:21:31\n */\npart of '../flutter_qjs.dart';\n\ntypedef dynamic _Decode(Map obj);\nList<_Decode> _decoders = [\n  JSError._decode,\n  IsolateFunction._decode,\n];\n\nabstract class _IsolateEncodable {\n  Map _encode();\n}\n\ndynamic _encodeData(dynamic data, {Map<dynamic, dynamic>? cache}) {\n  if (cache == null) cache = Map();\n  if (cache.containsKey(data)) return cache[data];\n  if (data is Error || data is Exception)\n    return _encodeData(JSError(data), cache: cache);\n  if (data is _IsolateEncodable) return data._encode();\n  if (data is List) {\n    final ret = [];\n    cache[data] = ret;\n    for (int i = 0; i < data.length; ++i) {\n      ret.add(_encodeData(data[i], cache: cache));\n    }\n    return ret;\n  }\n  if (data is Map) {\n    final ret = {};\n    cache[data] = ret;\n    for (final entry in data.entries) {\n      ret[_encodeData(entry.key, cache: cache)] =\n          _encodeData(entry.value, cache: cache);\n    }\n    return ret;\n  }\n  if (data is Future) {\n    final futurePort = ReceivePort();\n    data.then((value) {\n      futurePort.first.then((port) {\n        futurePort.close();\n        (port as SendPort).send(_encodeData(value));\n      });\n    }, onError: (e) {\n      futurePort.first.then((port) {\n        futurePort.close();\n        (port as SendPort).send({#error: _encodeData(e)});\n      });\n    });\n    return {\n      #jsFuturePort: futurePort.sendPort,\n    };\n  }\n  return data;\n}\n\ndynamic _decodeData(dynamic data, {Map<dynamic, dynamic>? cache}) {\n  if (cache == null) cache = Map();\n  if (cache.containsKey(data)) return cache[data];\n  if (data is List) {\n    final ret = [];\n    cache[data] = ret;\n    for (int i = 0; i < data.length; ++i) {\n      ret.add(_decodeData(data[i], cache: cache));\n    }\n    return ret;\n  }\n  if (data is Map) {\n    for (final decoder in _decoders) {\n      final decodeObj = decoder(data);\n      if (decodeObj != null) return decodeObj;\n    }\n    if (data.containsKey(#jsFuturePort)) {\n      SendPort port = data[#jsFuturePort];\n      final futurePort = ReceivePort();\n      port.send(futurePort.sendPort);\n      final futureCompleter = Completer();\n      futureCompleter.future.catchError((e) {});\n      futurePort.first.then((value) {\n        futurePort.close();\n        if (value is Map && value.containsKey(#error)) {\n          futureCompleter.completeError(_decodeData(value[#error]));\n        } else {\n          futureCompleter.complete(_decodeData(value));\n        }\n      });\n      return futureCompleter.future;\n    }\n    final ret = {};\n    cache[data] = ret;\n    for (final entry in data.entries) {\n      ret[_decodeData(entry.key, cache: cache)] =\n          _decodeData(entry.value, cache: cache);\n    }\n    return ret;\n  }\n  return data;\n}\n\nvoid _runJsIsolate(Map spawnMessage) async {\n  SendPort sendPort = spawnMessage[#port];\n  ReceivePort port = ReceivePort();\n  sendPort.send(port.sendPort);\n  final qjs = FlutterQjs(\n    stackSize: spawnMessage[#stackSize],\n    timeout: spawnMessage[#timeout],\n    memoryLimit: spawnMessage[#memoryLimit],\n    hostPromiseRejectionHandler: (reason) {\n      sendPort.send({\n        #type: #hostPromiseRejection,\n        #reason: _encodeData(reason),\n      });\n    },\n    moduleHandler: (name) {\n      final ptr = calloc<Pointer<Utf8>>();\n      ptr.value = Pointer.fromAddress(ptr.address);\n      sendPort.send({\n        #type: #module,\n        #name: name,\n        #ptr: ptr.address,\n      });\n      while (ptr.value.address == ptr.address) sleep(Duration(microseconds: 1));\n      final ret = ptr.value;\n      malloc.free(ptr);\n      if (ret.address == -1) throw JSError('Module Not found');\n      final retString = ret.toDartString();\n      malloc.free(ret);\n      return retString;\n    },\n  );\n  port.listen((msg) async {\n    var data;\n    SendPort? msgPort = msg[#port];\n    try {\n      switch (msg[#type]) {\n        case #evaluate:\n          data = await qjs.evaluate(\n            msg[#command],\n            name: msg[#name],\n            evalFlags: msg[#flag],\n          );\n          break;\n        case #close:\n          data = false;\n          qjs.port.close();\n          qjs.close();\n          port.close();\n          data = true;\n          break;\n      }\n      if (msgPort != null) msgPort.send(_encodeData(data));\n    } catch (e) {\n      if (msgPort != null)\n        msgPort.send({\n          #error: _encodeData(e),\n        });\n    }\n  });\n  await qjs.dispatch();\n}\n\ntypedef _JsAsyncModuleHandler = Future<String> Function(String name);\n\nclass IsolateQjs {\n  Future<SendPort>? _sendPort;\n\n  /// Max stack size for quickjs.\n  final int? stackSize;\n\n  /// Max stack size for quickjs.\n  final int? timeout;\n\n  /// Max memory for quickjs.\n  final int? memoryLimit;\n\n  /// Asynchronously handler to manage js module.\n  final _JsAsyncModuleHandler? moduleHandler;\n\n  /// Handler function to manage js module.\n  final _JsHostPromiseRejectionHandler? hostPromiseRejectionHandler;\n\n  /// Quickjs engine runing on isolate thread.\n  ///\n  /// Pass handlers to implement js-dart interaction and resolving modules. The `methodHandler` is\n  /// used in isolate, so **the handler function must be a top-level function or a static method**.\n  IsolateQjs({\n    this.moduleHandler,\n    this.stackSize,\n    this.timeout,\n    this.memoryLimit,\n    this.hostPromiseRejectionHandler,\n  });\n\n  _ensureEngine() {\n    if (_sendPort != null) return;\n    ReceivePort port = ReceivePort();\n    Isolate.spawn(\n      _runJsIsolate,\n      {\n        #port: port.sendPort,\n        #stackSize: stackSize,\n        #timeout: timeout,\n        #memoryLimit: memoryLimit,\n      },\n      errorsAreFatal: true,\n    );\n    final completer = Completer<SendPort>();\n    port.listen((msg) async {\n      if (msg is SendPort && !completer.isCompleted) {\n        completer.complete(msg);\n        return;\n      }\n      switch (msg[#type]) {\n        case #hostPromiseRejection:\n          try {\n            final err = _decodeData(msg[#reason]);\n            if (hostPromiseRejectionHandler != null) {\n              hostPromiseRejectionHandler!(err);\n            } else {\n              print('unhandled promise rejection: $err');\n            }\n          } catch (e) {\n            print('host Promise Rejection Handler error: $e');\n          }\n          break;\n        case #module:\n          final ptr = Pointer<Pointer>.fromAddress(msg[#ptr]);\n          try {\n            ptr.value = (await moduleHandler!(msg[#name])).toNativeUtf8();\n          } catch (e) {\n            ptr.value = Pointer.fromAddress(-1);\n          }\n          break;\n      }\n    }, onDone: () {\n      close();\n      if (!completer.isCompleted)\n        completer.completeError(JSError('isolate close'));\n    });\n    _sendPort = completer.future;\n  }\n\n  /// Free Runtime and close isolate thread that can be recreate when evaluate again.\n  close() {\n    final sendPort = _sendPort;\n    _sendPort = null;\n    if (sendPort == null) return;\n    final ret = sendPort.then((sendPort) async {\n      final closePort = ReceivePort();\n      sendPort.send({\n        #type: #close,\n        #port: closePort.sendPort,\n      });\n      final result = await closePort.first;\n      closePort.close();\n      if (result is Map && result.containsKey(#error))\n        throw _decodeData(result[#error]);\n      return _decodeData(result);\n    });\n    return ret;\n  }\n\n  /// Evaluate js script.\n  Future<dynamic> evaluate(\n    String command, {\n    String? name,\n    int? evalFlags,\n  }) async {\n    _ensureEngine();\n    final evaluatePort = ReceivePort();\n    final sendPort = await _sendPort!;\n    sendPort.send({\n      #type: #evaluate,\n      #command: command,\n      #name: name,\n      #flag: evalFlags,\n      #port: evaluatePort.sendPort,\n    });\n    final result = await evaluatePort.first;\n    evaluatePort.close();\n    if (result is Map && result.containsKey(#error))\n      throw _decodeData(result[#error]);\n    return _decodeData(result);\n  }\n}\n"
  },
  {
    "path": "lib/src/object.dart",
    "content": "/*\n * @Description: wrap object\n * @Author: ekibun\n * @Date: 2020-10-02 13:49:03\n * @LastEditors: ekibun\n * @LastEditTime: 2020-10-03 22:21:31\n */\npart of '../flutter_qjs.dart';\n\n/// js invokable\nabstract class JSInvokable extends JSRef {\n  dynamic invoke(List args, [dynamic thisVal]);\n\n  static dynamic _wrap(dynamic func) {\n    return func is JSInvokable\n        ? func\n        : func is Function\n            ? _DartFunction(func)\n            : func;\n  }\n}\n\nclass _DartFunction extends JSInvokable {\n  final Function _func;\n  _DartFunction(this._func);\n\n  @override\n  invoke(List args, [thisVal]) {\n    /// wrap this into function\n    final passThis =\n        RegExp('{.*thisVal.*}').hasMatch(_func.runtimeType.toString());\n    final ret =\n        Function.apply(_func, args, passThis ? {#thisVal: thisVal} : null);\n    JSRef.freeRecursive(args);\n    JSRef.freeRecursive(thisVal);\n    return ret;\n  }\n\n  @override\n  String toString() {\n    return _func.toString();\n  }\n\n  @override\n  destroy() {}\n}\n\n/// implement this to capture js object release.\n\nclass _DartObject extends JSRef implements JSRefLeakable {\n  Object? _obj;\n  Pointer<JSContext>? _ctx;\n  _DartObject(Pointer<JSContext> ctx, dynamic obj) {\n    _ctx = ctx;\n    _obj = obj;\n    if (obj is JSRef) obj.dup();\n    runtimeOpaques[jsGetRuntime(ctx)]?.addRef(this);\n  }\n\n  static _DartObject? fromAddress(Pointer<JSRuntime> rt, int val) {\n    return runtimeOpaques[rt]?.getRef((e) => identityHashCode(e) == val)\n        as _DartObject?;\n  }\n\n  @override\n  String toString() {\n    if (_ctx == null) return \"DartObject(released)\";\n    return _obj.toString();\n  }\n\n  @override\n  void destroy() {\n    final ctx = _ctx;\n    final obj = _obj;\n    _ctx = null;\n    _obj = null;\n    if (ctx == null) return;\n    runtimeOpaques[jsGetRuntime(ctx)]?.removeRef(this);\n    if (obj is JSRef) obj.free();\n  }\n}\n\n/// JS Error wrapper\nclass JSError extends _IsolateEncodable {\n  late String message;\n  late String stack;\n  JSError(message, [stack]) {\n    if (message is JSError) {\n      this.message = message.message;\n      this.stack = message.stack;\n    } else {\n      this.message = message.toString();\n      this.stack = (stack ?? StackTrace.current).toString();\n    }\n  }\n\n  @override\n  String toString() {\n    return stack.isEmpty ? message.toString() : \"$message\\n$stack\";\n  }\n\n  static JSError? _decode(Map obj) {\n    if (obj.containsKey(#jsError))\n      return JSError(obj[#jsError], obj[#jsErrorStack]);\n    return null;\n  }\n\n  @override\n  Map _encode() {\n    return {\n      #jsError: message,\n      #jsErrorStack: stack,\n    };\n  }\n}\n\n/// JS Object reference\n/// call [release] to release js object.\nclass _JSObject extends JSRef {\n  Pointer<JSValue>? _val;\n  Pointer<JSContext>? _ctx;\n\n  /// Create\n  _JSObject(Pointer<JSContext> ctx, Pointer<JSValue> val) {\n    this._ctx = ctx;\n    final rt = jsGetRuntime(ctx);\n    this._val = jsDupValue(ctx, val);\n    runtimeOpaques[rt]?.addRef(this);\n  }\n\n  @override\n  void destroy() {\n    final ctx = _ctx;\n    final val = _val;\n    _val = null;\n    _ctx = null;\n    if (ctx == null || val == null) return;\n    final rt = jsGetRuntime(ctx);\n    runtimeOpaques[rt]?.removeRef(this);\n    jsFreeValue(ctx, val);\n  }\n\n  @override\n  String toString() {\n    if (_ctx == null || _val == null) return \"JSObject(released)\";\n    return jsToCString(_ctx!, _val!);\n  }\n}\n\n/// JS function wrapper\nclass _JSFunction extends _JSObject implements JSInvokable, _IsolateEncodable {\n  _JSFunction(Pointer<JSContext> ctx, Pointer<JSValue> val) : super(ctx, val);\n\n  @override\n  invoke(List<dynamic> arguments, [dynamic thisVal]) {\n    final jsRet = _invoke(arguments, thisVal);\n    final ctx = _ctx!;\n    bool isException = jsIsException(jsRet) != 0;\n    if (isException) {\n      jsFreeValue(ctx, jsRet);\n      throw _parseJSException(ctx);\n    }\n    final ret = _jsToDart(ctx, jsRet);\n    jsFreeValue(ctx, jsRet);\n    return ret;\n  }\n\n  Pointer<JSValue> _invoke(List<dynamic> arguments, [dynamic thisVal]) {\n    final ctx = _ctx;\n    final val = _val;\n    if (ctx == null || val == null)\n      throw JSError(\"InternalError: JSValue released\");\n    final args = arguments\n        .map(\n          (e) => _dartToJs(ctx, e),\n        )\n        .toList();\n    final jsThis = _dartToJs(ctx, thisVal);\n    final jsRet = jsCall(ctx, val, jsThis, args);\n    jsFreeValue(ctx, jsThis);\n    for (final jsArg in args) {\n      jsFreeValue(ctx, jsArg);\n    }\n    return jsRet;\n  }\n\n  @override\n  Map _encode() {\n    return IsolateFunction._new(this)._encode();\n  }\n}\n\n/// Dart function wrapper for isolate\nclass IsolateFunction extends JSInvokable implements _IsolateEncodable {\n  int? _isolateId;\n  SendPort? _port;\n  JSInvokable? _invokable;\n  IsolateFunction._fromId(this._isolateId, this._port);\n\n  IsolateFunction._new(this._invokable) {\n    _handlers.add(this);\n  }\n  IsolateFunction(Function func) : this._new(_DartFunction(func));\n\n  static ReceivePort? _invokeHandler;\n  static Set<IsolateFunction> _handlers = Set();\n\n  static get _handlePort {\n    if (_invokeHandler == null) {\n      _invokeHandler = ReceivePort();\n      _invokeHandler!.listen((msg) async {\n        final msgPort = msg[#port];\n        try {\n          final handler = _handlers.firstWhereOrNull(\n            (v) => identityHashCode(v) == msg[#handler],\n          );\n          if (handler == null) throw JSError('handler released');\n          final ret = _encodeData(await handler._handle(msg[#msg]));\n          if (msgPort != null) msgPort.send(ret);\n        } catch (e) {\n          final err = _encodeData(e);\n          if (msgPort != null)\n            msgPort.send({\n              #error: err,\n            });\n        }\n      });\n    }\n    return _invokeHandler!.sendPort;\n  }\n\n  _send(msg) async {\n    final port = _port;\n    if (port == null) return _handle(msg);\n    final evaluatePort = ReceivePort();\n    port.send({\n      #handler: _isolateId,\n      #msg: msg,\n      #port: evaluatePort.sendPort,\n    });\n    final result = await evaluatePort.first;\n    if (result is Map && result.containsKey(#error))\n      throw _decodeData(result[#error]);\n    return _decodeData(result);\n  }\n\n  _destroy() {\n    _handlers.remove(this);\n    _invokable?.free();\n    _invokable = null;\n  }\n\n  _handle(msg) async {\n    switch (msg) {\n      case #dup:\n        _refCount++;\n        return null;\n      case #free:\n        _refCount--;\n        if (_refCount < 0) _destroy();\n        return null;\n      case #destroy:\n        _destroy();\n        return null;\n    }\n    final List args = _decodeData(msg[#args]);\n    final thisVal = _decodeData(msg[#thisVal]);\n    return _invokable?.invoke(args, thisVal);\n  }\n\n  @override\n  Future invoke(List positionalArguments, [thisVal]) async {\n    final List dArgs = _encodeData(positionalArguments);\n    final dThisVal = _encodeData(thisVal);\n    return _send({\n      #args: dArgs,\n      #thisVal: dThisVal,\n    });\n  }\n\n  static IsolateFunction? _decode(Map obj) {\n    if (obj.containsKey(#jsFunctionPort))\n      return IsolateFunction._fromId(\n        obj[#jsFunctionId],\n        obj[#jsFunctionPort],\n      );\n    return null;\n  }\n\n  @override\n  Map _encode() {\n    return {\n      #jsFunctionId: _isolateId ?? identityHashCode(this),\n      #jsFunctionPort: _port ?? IsolateFunction._handlePort,\n    };\n  }\n\n  int _refCount = 0;\n\n  @override\n  dup() {\n    _send(#dup);\n  }\n\n  @override\n  free() {\n    _send(#free);\n  }\n\n  @override\n  void destroy() {\n    _send(#destroy);\n  }\n}\n"
  },
  {
    "path": "lib/src/wrapper.dart",
    "content": "/*\n * @Description: wrapper\n * @Author: ekibun\n * @Date: 2020-09-19 22:07:47\n * @LastEditors: ekibun\n * @LastEditTime: 2020-12-02 11:14:03\n */\npart of '../flutter_qjs.dart';\n\ndynamic _parseJSException(Pointer<JSContext> ctx, [Pointer<JSValue>? perr]) {\n  final e = perr ?? jsGetException(ctx);\n  var err;\n  try {\n    err = _jsToDart(ctx, e);\n  } catch (exception) {\n    err = exception;\n  }\n  if (perr == null) jsFreeValue(ctx, e);\n  return err;\n}\n\nvoid _definePropertyValue(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> obj,\n  dynamic key,\n  dynamic val, {\n  Map<dynamic, Pointer<JSValue>>? cache,\n}) {\n  final jsAtomVal = _dartToJs(ctx, key, cache: cache);\n  final jsAtom = jsValueToAtom(ctx, jsAtomVal);\n  jsDefinePropertyValue(\n    ctx,\n    obj,\n    jsAtom,\n    _dartToJs(ctx, val, cache: cache),\n    JSProp.C_W_E,\n  );\n  jsFreeAtom(ctx, jsAtom);\n  jsFreeValue(ctx, jsAtomVal);\n}\n\nPointer<JSValue> _jsGetPropertyValue(\n  Pointer<JSContext> ctx,\n  Pointer<JSValue> obj,\n  dynamic key, {\n  Map<dynamic, Pointer<JSValue>>? cache,\n}) {\n  final jsAtomVal = _dartToJs(ctx, key, cache: cache);\n  final jsAtom = jsValueToAtom(ctx, jsAtomVal);\n  final jsProp = jsGetProperty(ctx, obj, jsAtom);\n  jsFreeAtom(ctx, jsAtom);\n  jsFreeValue(ctx, jsAtomVal);\n  return jsProp;\n}\n\nPointer<JSValue> _dartToJs(Pointer<JSContext> ctx, dynamic val,\n    {Map<dynamic, Pointer<JSValue>>? cache}) {\n  if (val == null) return jsUNDEFINED();\n  if (val is Error) return _dartToJs(ctx, JSError(val, val.stackTrace));\n  if (val is Exception) return _dartToJs(ctx, JSError(val));\n  if (val is JSError) {\n    final ret = jsNewError(ctx);\n    _definePropertyValue(ctx, ret, \"name\", \"\");\n    _definePropertyValue(ctx, ret, \"message\", val.message);\n    _definePropertyValue(ctx, ret, \"stack\", val.stack);\n    return ret;\n  }\n  if (val is _JSObject) return jsDupValue(ctx, val._val!);\n  if (val is Future) {\n    final resolvingFunc = malloc<Uint8>(sizeOfJSValue * 2).cast<JSValue>();\n    final resolvingFunc2 =\n        Pointer<JSValue>.fromAddress(resolvingFunc.address + sizeOfJSValue);\n    final ret = jsNewPromiseCapability(ctx, resolvingFunc);\n    final _JSFunction res = _jsToDart(ctx, resolvingFunc);\n    final _JSFunction rej = _jsToDart(ctx, resolvingFunc2);\n    jsFreeValue(ctx, resolvingFunc, free: false);\n    jsFreeValue(ctx, resolvingFunc2, free: false);\n    malloc.free(resolvingFunc);\n    final refRes = _DartObject(ctx, res);\n    final refRej = _DartObject(ctx, rej);\n    res.free();\n    rej.free();\n    val.then((value) {\n      res.invoke([value]);\n    }, onError: (e) {\n      rej.invoke([e]);\n    }).whenComplete(() {\n      refRes.free();\n      refRej.free();\n    });\n    return ret;\n  }\n  if (cache == null) cache = Map();\n  if (val is bool) return jsNewBool(ctx, val ? 1 : 0);\n  if (val is int) return jsNewInt64(ctx, val);\n  if (val is double) return jsNewFloat64(ctx, val);\n  if (val is String) return jsNewString(ctx, val);\n  if (val is Uint8List) {\n    final ptr = malloc<Uint8>(val.length);\n    final byteList = ptr.asTypedList(val.length);\n    byteList.setAll(0, val);\n    final ret = jsNewArrayBufferCopy(ctx, ptr, val.length);\n    malloc.free(ptr);\n    return ret;\n  }\n  if (cache.containsKey(val)) {\n    return jsDupValue(ctx, cache[val]!);\n  }\n  if (val is List) {\n    final ret = jsNewArray(ctx);\n    cache[val] = ret;\n    for (int i = 0; i < val.length; ++i) {\n      _definePropertyValue(ctx, ret, i, val[i], cache: cache);\n    }\n    return ret;\n  }\n  if (val is Map) {\n    final ret = jsNewObject(ctx);\n    cache[val] = ret;\n    for (MapEntry<dynamic, dynamic> entry in val.entries) {\n      _definePropertyValue(ctx, ret, entry.key, entry.value, cache: cache);\n    }\n    return ret;\n  }\n  // wrap Function to JSInvokable\n  final valWrap = JSInvokable._wrap(val);\n  final dartObjectClassId =\n      runtimeOpaques[jsGetRuntime(ctx)]?.dartObjectClassId ?? 0;\n  if (dartObjectClassId == 0) return jsUNDEFINED();\n  final dartObject = jsNewObjectClass(\n    ctx,\n    dartObjectClassId,\n    identityHashCode(_DartObject(ctx, valWrap)),\n  );\n  if (valWrap is JSInvokable) {\n    final ret = jsNewCFunction(ctx, dartObject);\n    jsFreeValue(ctx, dartObject);\n    return ret;\n  }\n  return dartObject;\n}\n\ndynamic _jsToDart(Pointer<JSContext> ctx, Pointer<JSValue> val,\n    {Map<int, dynamic>? cache}) {\n  if (cache == null) cache = Map();\n  final tag = jsValueGetTag(val);\n  if (jsTagIsFloat64(tag) != 0) {\n    return jsToFloat64(ctx, val);\n  }\n  switch (tag) {\n    case JSTag.BOOL:\n      return jsToBool(ctx, val) != 0;\n    case JSTag.INT:\n      return jsToInt64(ctx, val);\n    case JSTag.STRING:\n      return jsToCString(ctx, val);\n    case JSTag.OBJECT:\n      final rt = jsGetRuntime(ctx);\n      final dartObjectClassId = runtimeOpaques[rt]?.dartObjectClassId;\n      if (dartObjectClassId != null) {\n        final dartObject = _DartObject.fromAddress(\n            rt, jsGetObjectOpaque(val, dartObjectClassId));\n        if (dartObject != null) return dartObject._obj;\n      }\n      final psize = malloc<IntPtr>();\n      final buf = jsGetArrayBuffer(ctx, psize, val);\n      final size = psize.value;\n      malloc.free(psize);\n      if (buf.address != 0) {\n        return Uint8List.fromList(buf.asTypedList(size));\n      }\n      final valptr = jsValueGetPtr(val);\n      if (cache.containsKey(valptr)) {\n        return cache[valptr];\n      }\n      if (jsIsFunction(ctx, val) != 0) {\n        return _JSFunction(ctx, val);\n      } else if (jsIsError(ctx, val) != 0) {\n        final err = jsToCString(ctx, val);\n        final pstack = _jsGetPropertyValue(ctx, val, 'stack');\n        final stack =\n            jsToBool(ctx, pstack) != 0 ? jsToCString(ctx, pstack) : null;\n        jsFreeValue(ctx, pstack);\n        return JSError(err, stack);\n      } else if (jsIsPromise(ctx, val) != 0) {\n        final jsPromiseThen = _jsGetPropertyValue(ctx, val, 'then');\n        final _JSFunction promiseThen =\n            _jsToDart(ctx, jsPromiseThen, cache: cache);\n        jsFreeValue(ctx, jsPromiseThen);\n        final completer = Completer();\n        completer.future.catchError((e) {});\n        final jsPromise = _JSObject(ctx, val);\n        final jsRet = promiseThen._invoke([\n          (v) {\n            JSRef.dupRecursive(v);\n            if (!completer.isCompleted) completer.complete(v);\n          },\n          (e) {\n            JSRef.dupRecursive(e);\n            if (!completer.isCompleted) completer.completeError(e);\n          },\n        ], jsPromise);\n        jsPromise.free();\n        promiseThen.free();\n        final isException = jsIsException(jsRet) != 0;\n        jsFreeValue(ctx, jsRet);\n        if (isException) throw _parseJSException(ctx);\n        return completer.future;\n      } else if (jsIsArray(ctx, val) != 0) {\n        final jslength = _jsGetPropertyValue(ctx, val, 'length');\n        final length = jsToInt64(ctx, jslength);\n        final ret = [];\n        cache[valptr] = ret;\n        for (var i = 0; i < length; ++i) {\n          final jsProp = _jsGetPropertyValue(ctx, val, i);\n          ret.add(_jsToDart(ctx, jsProp, cache: cache));\n          jsFreeValue(ctx, jsProp);\n        }\n        return ret;\n      } else {\n        final ptab = malloc<Pointer<JSPropertyEnum>>();\n        final plen = malloc<Uint32>();\n        if (jsGetOwnPropertyNames(ctx, ptab, plen, val, -1) != 0) {\n          malloc.free(plen);\n          malloc.free(ptab);\n          return null;\n        }\n        final len = plen.value;\n        malloc.free(plen);\n        final ret = Map();\n        cache[valptr] = ret;\n        for (var i = 0; i < len; ++i) {\n          final jsAtom = jsPropertyEnumGetAtom(ptab.value, i);\n          final jsAtomValue = jsAtomToValue(ctx, jsAtom);\n          final jsProp = jsGetProperty(ctx, val, jsAtom);\n          ret[_jsToDart(ctx, jsAtomValue, cache: cache)] =\n              _jsToDart(ctx, jsProp, cache: cache);\n          jsFreeValue(ctx, jsAtomValue);\n          jsFreeValue(ctx, jsProp);\n          jsFreeAtom(ctx, jsAtom);\n        }\n        jsFree(ctx, ptab.value);\n        malloc.free(ptab);\n        return ret;\n      }\n    default:\n  }\n  return null;\n}\n"
  },
  {
    "path": "linux/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.10)\n\ninclude(\"${CMAKE_CURRENT_SOURCE_DIR}/../cxx/quickjs.cmake\")\ntarget_compile_options(quickjs PRIVATE \"-fPIC\")\n\nset(PROJECT_NAME \"flutter_qjs\")\nproject(${PROJECT_NAME} LANGUAGES CXX)\n\nset(PLUGIN_NAME \"${PROJECT_NAME}_plugin\")\n\nadd_library(${PLUGIN_NAME} SHARED\n  \"${PLUGIN_NAME}.cc\"\n  \"${CXX_LIB_DIR}/ffi.cpp\"\n)\n\napply_standard_settings(${PLUGIN_NAME})\ntarget_compile_features(${PLUGIN_NAME} PUBLIC cxx_std_17)\nset_target_properties(${PLUGIN_NAME} PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)\ntarget_include_directories(${PLUGIN_NAME} INTERFACE\n  \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\ntarget_link_libraries(${PLUGIN_NAME} PRIVATE flutter)\ntarget_link_libraries(${PLUGIN_NAME} PRIVATE quickjs)\ntarget_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK)\n\n# List of absolute paths to libraries that should be bundled with the plugin\nset(flutter_qjs_bundled_libraries\n  \"\"\n  PARENT_SCOPE\n)\n"
  },
  {
    "path": "linux/flutter_qjs_plugin.cc",
    "content": "/*\n * @Description: \n * @Author: ekibun\n * @Date: 2020-08-17 21:37:11\n * @LastEditors: ekibun\n * @LastEditTime: 2020-09-21 18:28:35\n */\n#include \"include/flutter_qjs/flutter_qjs_plugin.h\"\n\n#include <flutter_linux/flutter_linux.h>\n#include <gtk/gtk.h>\n\n#define FLUTTER_QJS_PLUGIN(obj)                                     \\\n  (G_TYPE_CHECK_INSTANCE_CAST((obj), flutter_qjs_plugin_get_type(), \\\n                              FlutterQjsPlugin))\n\nstruct _FlutterQjsPlugin\n{\n  GObject parent_instance;\n};\n\nG_DEFINE_TYPE(FlutterQjsPlugin, flutter_qjs_plugin, g_object_get_type())\n\nstatic void flutter_qjs_plugin_dispose(GObject *object)\n{\n  G_OBJECT_CLASS(flutter_qjs_plugin_parent_class)->dispose(object);\n}\n\nstatic void flutter_qjs_plugin_class_init(FlutterQjsPluginClass *klass)\n{\n  G_OBJECT_CLASS(klass)->dispose = flutter_qjs_plugin_dispose;\n}\n\nstatic void flutter_qjs_plugin_init(FlutterQjsPlugin *self) {}\n\nvoid flutter_qjs_plugin_register_with_registrar(FlPluginRegistrar *registrar)\n{\n}\n"
  },
  {
    "path": "linux/include/flutter_qjs/flutter_qjs_plugin.h",
    "content": "#ifndef FLUTTER_PLUGIN_FLUTTER_QJS_PLUGIN_H_\n#define FLUTTER_PLUGIN_FLUTTER_QJS_PLUGIN_H_\n\n#include <flutter_linux/flutter_linux.h>\n\nG_BEGIN_DECLS\n\n#ifdef FLUTTER_PLUGIN_IMPL\n#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility(\"default\")))\n#else\n#define FLUTTER_PLUGIN_EXPORT\n#endif\n\ntypedef struct _FlutterQjsPlugin FlutterQjsPlugin;\ntypedef struct {\n  GObjectClass parent_class;\n} FlutterQjsPluginClass;\n\nFLUTTER_PLUGIN_EXPORT GType flutter_qjs_plugin_get_type();\n\nFLUTTER_PLUGIN_EXPORT void flutter_qjs_plugin_register_with_registrar(\n    FlPluginRegistrar* registrar);\n\nG_END_DECLS\n\n#endif  // FLUTTER_PLUGIN_FLUTTER_QJS_PLUGIN_H_\n"
  },
  {
    "path": "macos/Classes/FlutterQjsPlugin.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\npublic class FlutterQjsPlugin: NSObject, FlutterPlugin {\n  public static func register(with registrar: FlutterPluginRegistrar) {\n    let channel = FlutterMethodChannel(name: \"flutter_qjs\", binaryMessenger: registrar.messenger)\n    let instance = FlutterQjsPlugin()\n    registrar.addMethodCallDelegate(instance, channel: channel)\n  }\n\n  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {\n    switch call.method {\n    case \"getPlatformVersion\":\n      result(\"macOS \" + ProcessInfo.processInfo.operatingSystemVersionString)\n    default:\n      result(FlutterMethodNotImplemented)\n    }\n  }\n}\n"
  },
  {
    "path": "macos/flutter_qjs.podspec",
    "content": "#\n# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.\n# Run `pod lib lint flutter_qjs.podspec' to validate before publishing.\n#\nPod::Spec.new do |s|\n  s.name             = 'flutter_qjs'\n  s.version          = '0.0.1'\n  s.summary          = 'A quickjs engine for flutter.'\n  s.description      = <<-DESC\nThis plugin is a simple js engine for flutter using the `quickjs` project. Plugin currently supports all the platforms except web!\n                       DESC\n  s.homepage         = 'https://github.com/ekibun/flutter_qjs'\n  s.license          = { :file => '../LICENSE' }\n  s.author           = { 'ekibun' => 'soekibun@gmail.com' }\n  s.source           = { :path => '.' }\n  s.compiler_flags = '-DDUMP_LEAKS'\n  s.source_files = ['Classes/**/*', 'cxx/*.{c,cpp}']\n  s.dependency 'FlutterMacOS'\n\n  s.platform = :osx, '10.11'\n  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }\n  s.vendored_libraries = 'build/Debug/libffiquickjs.dylib'\n  s.prepare_command = 'sh ../cxx/prebuild.sh'\n  s.swift_version = '5.0'\nend\n"
  },
  {
    "path": "pubspec.yaml",
    "content": "name: flutter_qjs\ndescription: This plugin is a simple js engine for flutter using the `quickjs` project. Plugin currently supports all the platforms except web!\nversion: 0.3.7\nhomepage: https://github.com/ekibun/flutter_qjs\n\nenvironment:\n  sdk: \">=2.12.0-0 <3.0.0\"\n  flutter: \">=1.20.0\"\n\ndependencies:\n  flutter:\n    sdk: flutter\n  ffi: ^1.0.0\n\ndev_dependencies:\n  flutter_test:\n    sdk: flutter\n  flutter_tools:\n    sdk: flutter\n\n# For information on the generic Dart part of this file, see the\n# following page: https://dart.dev/tools/pub/pubspec\n\n# The following section is specific to Flutter.\nflutter:\n  # This section identifies this Flutter project as a plugin project.\n  # The 'pluginClass' and Android 'package' identifiers should not ordinarily\n  # be modified. They are used by the tooling to maintain consistency when\n  # adding or updating assets for this project.\n  plugin:\n    implements: flutter_qjs\n    platforms:\n    # This plugin project was generated without specifying any\n    # platforms with the `--platform` argument. If you see the `fake_platform` map below, remove it and\n    # then add platforms following the instruction here:\n    # https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms\n    # -------------------\n      windows:\n        pluginClass: FlutterQjsPlugin\n      linux:\n        pluginClass: FlutterQjsPlugin\n      android:\n        pluginClass: FlutterQjsPlugin\n        package: soko.ekibun.flutter_qjs\n      macos:\n        pluginClass: FlutterQjsPlugin\n      ios:\n        pluginClass: FlutterQjsPlugin\n    # -------------------\n\n  # To add assets to your plugin package, add an assets section, like this:\n  # assets:\n  #   - images/a_dot_burr.jpeg\n  #   - images/a_dot_ham.jpeg\n  #\n  # For details regarding assets in packages, see\n  # https://flutter.dev/assets-and-images/#from-packages\n  #\n  # An image asset can refer to one or more resolution-specific \"variants\", see\n  # https://flutter.dev/assets-and-images/#resolution-aware.\n\n  # To add custom fonts to your plugin package, add a fonts section here,\n  # in this \"flutter\" section. Each entry in this list should have a\n  # \"family\" key with the font family name, and a \"fonts\" key with a\n  # list giving the asset and other descriptors for the font. For\n  # example:\n  # fonts:\n  #   - family: Schyler\n  #     fonts:\n  #       - asset: fonts/Schyler-Regular.ttf\n  #       - asset: fonts/Schyler-Italic.ttf\n  #         style: italic\n  #   - family: Trajan Pro\n  #     fonts:\n  #       - asset: fonts/TrajanPro.ttf\n  #       - asset: fonts/TrajanPro_Bold.ttf\n  #         weight: 700\n  #\n  # For details regarding fonts in packages, see\n  # https://flutter.dev/custom-fonts/#from-packages\n"
  },
  {
    "path": "test/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.7 FATAL_ERROR)\nproject(ffiquickjs LANGUAGES CXX)\n\ninclude(\"${CMAKE_CURRENT_SOURCE_DIR}/../cxx/quickjs.cmake\")\n\nIF (CMAKE_SYSTEM_NAME MATCHES \"Linux\")\n    target_compile_options(quickjs PRIVATE \"-fPIC\")\nENDIF ()\n\nadd_library(ffiquickjs SHARED ${CXX_LIB_DIR}/ffi.cpp)\ntarget_compile_features(ffiquickjs PUBLIC cxx_std_17)\ntarget_link_libraries(ffiquickjs PRIVATE quickjs)"
  },
  {
    "path": "test/flutter_qjs_test.dart",
    "content": "/*\n * @Description: unit test\n * @Author: ekibun\n * @Date: 2020-09-06 13:02:46\n * @LastEditors: ekibun\n * @LastEditTime: 2020-10-07 00:11:27\n */\nimport 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\n\nimport 'package:flutter_qjs/flutter_qjs.dart';\nimport 'package:flutter_test/flutter_test.dart';\nimport 'package:flutter_tools/src/base/io.dart';\nimport 'package:flutter_tools/src/base/logger.dart';\nimport 'package:flutter_tools/src/base/terminal.dart';\nimport 'package:flutter_tools/src/base/platform.dart';\nimport 'package:flutter_tools/src/windows/visual_studio.dart';\nimport 'package:file/local.dart';\nimport 'package:process/process.dart';\n\ndynamic myFunction(String args, {thisVal}) {\n  return [thisVal, args];\n}\n\nFuture testEvaluate(qjs) async {\n  dynamic wrapFunction = await qjs.evaluate(\n    'async (a) => a',\n    name: '<testWrap>',\n  );\n  dynamic testWrap = await wrapFunction.invoke([wrapFunction]);\n  await wrapFunction.free();\n  final wrapNull = await testWrap.invoke([null]);\n  expect(wrapNull, null, reason: 'wrap null');\n  final primities = [0, 1, 0.1, true, false, 'str'];\n  final wrapPrimities = await testWrap.invoke([primities]);\n  for (int i = 0; i < primities.length; i++) {\n    expect(wrapPrimities[i], primities[i], reason: 'wrap primities');\n  }\n  final jsError = JSError('test Error');\n  final wrapJsError = await testWrap.invoke([jsError]);\n  expect(jsError.message, (wrapJsError as JSError).message,\n      reason: 'wrap JSError');\n\n  expect(wrapNull, null, reason: 'wrap null');\n  final a = {};\n  a['a'] = a;\n  final wrapA = await testWrap.invoke([a]);\n  expect(wrapA['a'], wrapA, reason: 'recursive object');\n  dynamic testThis = await qjs.evaluate(\n    '(function (func, arg) { return func.call(this, arg) })',\n    name: '<testThis>',\n  );\n  final funcRet = await testThis.invoke([myFunction, 'arg'], {'name': 'this'});\n  testThis.free();\n  expect(funcRet[0]['name'], 'this', reason: 'js function this');\n  expect(funcRet[1], 'arg', reason: 'js function argument');\n  List promises = await testWrap.invoke([\n    await qjs.evaluate(\n      '[Promise.reject(\"reject\"), Promise.resolve(\"resolve\"), new Promise(() => {})]',\n      name: '<promises>',\n    )\n  ]);\n  await testWrap.free();\n  for (final promise in promises)\n    expect(promise, isInstanceOf<Future>(), reason: 'promise object');\n  try {\n    await promises[0];\n    throw 'Future not reject';\n  } catch (e) {\n    expect(e, 'reject', reason: 'promise object reject');\n  }\n  expect(await promises[1], 'resolve', reason: 'promise object resolve');\n}\n\nvoid main() async {\n  test('make', () async {\n    const platform = LocalPlatform();\n    final utf8Encoding = Encoding.getByName('utf-8');\n    String cmakePath = 'cmake';\n    if (platform.isWindows) {\n      final stdio = Stdio();\n      final vs = VisualStudio(\n          fileSystem: const LocalFileSystem(),\n          processManager: const LocalProcessManager(),\n          platform: platform,\n          logger: StdoutLogger(\n            terminal: AnsiTerminal(\n              stdio: stdio,\n              platform: platform,\n            ),\n            stdio: stdio,\n            outputPreferences: OutputPreferences(\n              wrapText: stdio.hasTerminal,\n              showColor: platform.stdoutSupportsAnsi,\n              stdio: stdio,\n            ),\n          ));\n      cmakePath = vs.cmakePath!;\n    }\n    final buildDir = './build';\n    var result = Process.runSync(\n      cmakePath,\n      ['-S', './', '-B', buildDir],\n      workingDirectory: 'test',\n      stdoutEncoding: utf8Encoding,\n      stderrEncoding: utf8Encoding,\n    );\n    stdout.write(result.stdout);\n    stderr.write(result.stderr);\n    expect(result.exitCode, 0);\n\n    result = Process.runSync(\n      cmakePath,\n      ['--build', buildDir, '--verbose'],\n      workingDirectory: 'test',\n      stdoutEncoding: utf8Encoding,\n      stderrEncoding: utf8Encoding,\n    );\n    stdout.write(result.stdout);\n    stderr.write(result.stderr);\n    expect(result.exitCode, 0);\n  });\n  test('infinite loop', () async {\n    final qjs = FlutterQjs(\n      timeout: 1000,\n    );\n    qjs.dispatch();\n    var result = await qjs.evaluate('1');\n    expect(result, 1, reason: 'eval module');\n    try {\n      await qjs.evaluate('while(true) {}');\n      throw 'Error not throw';\n    } on JSError catch (e) {\n      expect(e.message, startsWith('InternalError: interrupted'),\n          reason: 'throw interrupted');\n    }\n    await qjs.close();\n  });\n  test('memory leak', () async {\n    final qjs = FlutterQjs(\n      memoryLimit: 1000000,\n    );\n    qjs.dispatch();\n    try {\n      await qjs.evaluate('new Array(1000000).fill(0)');\n      throw 'Error not throw';\n    } on JSError catch (e) {\n      expect(e.message, startsWith('InternalError: out of memory'),\n          reason: 'throw interrupted');\n    }\n    await qjs.close();\n  });\n  test('module', () async {\n    final qjs = IsolateQjs(\n      moduleHandler: (name) async {\n        return 'export default \"test module\"';\n      },\n    );\n    await qjs.evaluate('''\n      import handlerData from 'test';\n      export default {\n        data: handlerData\n      };\n      ''', name: 'evalModule', evalFlags: JSEvalFlag.MODULE);\n    var result = await qjs.evaluate('import(\"evalModule\")');\n    expect(result['default']['data'], 'test module', reason: 'eval module');\n    await qjs.close();\n  });\n  test('data conversion', () async {\n    final qjs = FlutterQjs(\n      hostPromiseRejectionHandler: (_) {},\n    );\n    qjs.dispatch();\n    await testEvaluate(qjs);\n    await qjs.close();\n  });\n  test('isolate conversion', () async {\n    final qjs = IsolateQjs(\n      hostPromiseRejectionHandler: (_) {},\n    );\n    await testEvaluate(qjs);\n    await qjs.close();\n  });\n  test('isolate bind this', () async {\n    final qjs = IsolateQjs();\n    JSInvokable? localVar;\n    JSInvokable setToGlobal = await qjs\n        .evaluate('(name, func)=>{ this[name] = func }', name: '<eval>');\n    final func = IsolateFunction((args) {\n      localVar = args..dup();\n      return args.invoke([]);\n    });\n    await setToGlobal.invoke([\"test\", func..dup()]);\n    func.free();\n    setToGlobal.free();\n    final testFuncRet = await qjs.evaluate('test(()=>\"ret\")', name: '<eval>');\n    expect(await localVar?.invoke([]), 'ret', reason: 'bind function');\n    localVar?.free();\n    expect(testFuncRet, 'ret', reason: 'bind function args return');\n    await qjs.close();\n  });\n  test('reference leak', () async {\n    final qjs = FlutterQjs();\n    await qjs.evaluate('()=>{}', name: '<eval>');\n    try {\n      qjs.close();\n      throw 'Error not throw';\n    } on JSError catch (e) {\n      expect(e.message, startsWith('reference leak:'),\n          reason: 'throw reference leak');\n    }\n  });\n  test('stack overflow', () async {\n    final qjs = FlutterQjs();\n    try {\n      qjs.evaluate('a=()=>a();a();', name: '<eval>');\n      throw 'Error not throw';\n    } on JSError catch (e) {\n      expect(e.message, 'InternalError: stack overflow',\n          reason: 'throw stack overflow');\n    }\n    qjs.close();\n  });\n  test('host promise rejection', () async {\n    final completer = Completer();\n    final qjs = FlutterQjs(\n      hostPromiseRejectionHandler: (reason) {\n        completer.complete(reason);\n      },\n    );\n    qjs.dispatch();\n    qjs.evaluate(\n        '(() => { Promise.resolve().then(() => { throw \"unhandle\" }) })()',\n        name: '<eval>');\n    Future.delayed(Duration(seconds: 10)).then((value) {\n      if (!completer.isCompleted) completer.completeError('not host reject');\n    });\n    expect(await completer.future, 'unhandle',\n        reason: 'host promise rejection');\n    qjs.close();\n  });\n}\n"
  },
  {
    "path": "windows/.gitignore",
    "content": "flutter/\n\n# Visual Studio user-specific files.\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# Visual Studio build-related files.\nx64/\nx86/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n"
  },
  {
    "path": "windows/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.15)\ninclude(\"${CMAKE_CURRENT_SOURCE_DIR}/../cxx/quickjs.cmake\")\n\nset(PROJECT_NAME \"flutter_qjs\")\nproject(${PROJECT_NAME} LANGUAGES CXX)\nadd_compile_options(\"$<$<CXX_COMPILER_ID:MSVC>:/utf-8>\")\n\nset(PLUGIN_NAME \"${PROJECT_NAME}_plugin\")\n\nadd_library(${PLUGIN_NAME} SHARED\n  \"${PLUGIN_NAME}.cpp\"\n  \"${CXX_LIB_DIR}/ffi.cpp\"\n)\napply_standard_settings(${PLUGIN_NAME})\nset_target_properties(${PLUGIN_NAME} PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)\ntarget_include_directories(${PLUGIN_NAME} INTERFACE\n  \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\ntarget_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin quickjs)\n\n# List of absolute paths to libraries that should be bundled with the plugin\nset(flutter_qjs_bundled_libraries\n  \"\"\n  PARENT_SCOPE\n)\n"
  },
  {
    "path": "windows/flutter_qjs_plugin.cpp",
    "content": "/*\n * @Description: empty plugin\n * @Author: ekibun\n * @Date: 2020-08-25 21:09:20\n * @LastEditors: ekibun\n * @LastEditTime: 2020-09-20 16:00:15\n */\n#include \"include/flutter_qjs/flutter_qjs_plugin.h\"\n\n// This must be included before many other Windows headers.\n#include <windows.h>\n\n#include <flutter/plugin_registrar_windows.h>\n\nnamespace\n{\n\n  class FlutterQjsPlugin : public flutter::Plugin\n  {\n  public:\n    static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar);\n\n    FlutterQjsPlugin();\n\n    virtual ~FlutterQjsPlugin();\n  };\n\n  // static\n  void FlutterQjsPlugin::RegisterWithRegistrar(\n      flutter::PluginRegistrarWindows *registrar) {}\n\n  FlutterQjsPlugin::FlutterQjsPlugin() {}\n\n  FlutterQjsPlugin::~FlutterQjsPlugin() {}\n} // namespace\n\nvoid FlutterQjsPluginRegisterWithRegistrar(\n    FlutterDesktopPluginRegistrarRef registrar)\n{\n  FlutterQjsPlugin::RegisterWithRegistrar(\n      flutter::PluginRegistrarManager::GetInstance()\n          ->GetRegistrar<flutter::PluginRegistrarWindows>(registrar));\n}\n"
  },
  {
    "path": "windows/include/flutter_qjs/flutter_qjs_plugin.h",
    "content": "#ifndef FLUTTER_PLUGIN_FLUTTER_QJS_PLUGIN_H_\n#define FLUTTER_PLUGIN_FLUTTER_QJS_PLUGIN_H_\n\n#include <flutter_plugin_registrar.h>\n\n#ifdef FLUTTER_PLUGIN_IMPL\n#define FLUTTER_PLUGIN_EXPORT __declspec(dllexport)\n#else\n#define FLUTTER_PLUGIN_EXPORT __declspec(dllimport)\n#endif\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\nFLUTTER_PLUGIN_EXPORT void FlutterQjsPluginRegisterWithRegistrar(\n    FlutterDesktopPluginRegistrarRef registrar);\n\n#if defined(__cplusplus)\n}  // extern \"C\"\n#endif\n\n#endif  // FLUTTER_PLUGIN_FLUTTER_QJS_PLUGIN_H_\n"
  }
]